Results 1 to 4 of 4

Thread: how create user access ftp with vsftpd, but no login shell ?

  1. #1

    vsftpd (solved) : user access ftp without access shell/telnet

    Hi,

    I create a new user in /tmp/etc/passwd with dev/null but he can't acess ftp (login wrong).

    if i write bin/sh for this user, he can access ftp and shell with putty, but i don't want the new user access shell.

    i read in another linux forum howto vsftpd to create user with /bin/true, but the result is the same with dev/null (no ftp and no shell)

    Any idea ?
    Last edited by fbgeeks; 29-09-2008 at 23:25. Reason: solved

  2. #2
    Join Date
    Nov 2004
    Location
    Sweden
    Posts
    259

  3. #3
    Hi,
    Thanks Tamadite, for your answer, but I had already tried your howto and proftpd lag (10000ms). I don't understand why ...

    but i find a solution in the man vsftpd.conf
    with the command check_shell (Note! This option only has an effect for non-PAM builds of vsftpd. If disabled, vsftpd will not check /etc/shells for a valid user shell for local logins. )

    vsftpd.conf
    Code:
    anonymous_enable=NO
    local_enable=YES
    local_root=/tmp/mnt/disc0_3/ftp_pub
    write_enable=YES
    local_umask=022
    dirmessage_enable=YES
    xferlog_enable=YES
    connect_from_port_20=YES
    vsftpd_log_file=/var/log/vsftpd.log
    chroot_list_enable=YES
    chroot_list_file=/opt/etc/vsftpd.chroot_list
    check_shell=NO
    ls_recurse_enable=YES
    secure_chroot_dir=/opt/usr/share/empty
    and the user in /tmp/etc/passwd
    Code:
    ClintEastwood:$xxxxxxxxx.:1000:1000:FTP User:/tmp/mnt/disc0_3/ftp_pub:/dev/null
    and now user access ftp with access denied shell/telnet

  4. #4
    Use vsftpd and create a /opt/etc/profile starting with this content

    if [ `/opt/bin/whoami` != root ]; then
    echo -e "USER IS NOT ALLOWED FOR ANY TERMINAL SESSION!\nCONNECTION CLOSED!"
    exit
    fi
    So, now the user root is only able to login! Be careful when you use such things!! If you write a wrong user in the if you are not able to login anymore!!!

Similar Threads

  1. vsftpd banner
    By thE_29 in forum WL-500gP Q&A
    Replies: 9
    Last Post: 13-10-2008, 08:11
  2. vsftpd - outside access (login)
    By absolon in forum WL-500gP Q&A
    Replies: 0
    Last Post: 03-08-2008, 20:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •