• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 禁止用戶ssh登錄但可使用ftp

    發表于:2007-07-04來源:作者:點擊數: 標簽:
    有時候希望某用戶只能登錄ftp而禁止其通過ssh登錄,而又不想用虛擬用戶來管理,維護一個虛擬用戶的記錄太麻煩,應該怎么辦呢? 可以通過安裝vsftpd服務,然后禁止其通過pam認證并將check_shell設置為NO,添加用戶的時候將用戶的shell設置為/bin/false,這樣既
    有時候希望某用戶只能登錄ftp而禁止其通過ssh登錄,而又不想用虛擬用戶來管理,維護一個虛擬用戶的記錄太麻煩,應該怎么辦呢?

    可以通過安裝vsftpd服務,然后禁止其通過pam認證并將check_shell設置為NO,添加用戶的時候將用戶的shell設置為/bin/false,這樣既可以禁止用戶ssh登錄又可以正常使用ftp。以下是我的/etc/pam.d/vsftpd和/etc/vsftpd.conf配置。
    /etc/pam.d/vsftpd

    # Standard behaviour for ftpd(8).
    auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=suclearcase/" target="_blank" >cceed

    # Note: vsftpd handles anonymous logins on its own. Do not enable
    # pam_ftp.so.
    # Standard blurb.
    @include common-account
    @include common-session
    @include common-auth

    #auth required pam_shells.so
    /etc/vsftpd.conf
    listen=YES
    anonymous_enable=YES
    local_enable=YES
    write_enable=YES
    dirmessage_enable=YES
    xferlog_enable=YES
    connect_from_port_20=YES
    secure_chroot_dir=/var/run/vsftpd
    pam_service_name=vsftpd
    rsa_cert_file=/etc/ssl/certs/vsftpd.pem
    check_shell=NO
    添加用戶的時候加上選項-s /bin/false即可。

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>