Re: I need to create a user that can only ftp to the system (163 Views)
Reply
Super Advisor
NDO
Posts: 531
Registered: ‎12-10-2003
Message 1 of 4 (209 Views)
Accepted Solution

I need to create a user that can only ftp to the system

Hi all!

 

I have created a user that can only ftp to a server running 11.23, and I have seen in some posts that the user start up program needs to be change from /usr/bin/sh to /usr/bin/false, but after making that modification, the user simple cannot login, using ftp client software like filezila, pls can you help.

 

NDO

Please use plain text.
Honored Contributor
Patrick Wallek
Posts: 13,720
Registered: ‎06-21-2000
Message 2 of 4 (181 Views)

Re: I need to create a user that can only ftp to the system

>> the user simple cannot login

 

What kind of error are you receiving?  

 

I have just set up an FTP only account on one of my test servers, set the shell to /bin/false and was able to login via filezilla without any problems.

 

The /etc/passwd entry from my test ID:

salary20:*:603:200:test ftp user:/support/ftpusers/salary20/./pub:/bin/false

Please use plain text.
Honored Contributor
Bill Hassell
Posts: 14,178
Registered: ‎05-29-2000
Message 3 of 4 (174 Views)

Re: I need to create a user that can only ftp to the system

[ Edited ]

You'll need to create the file: /etc/shells

Without this file, the only shells allowed to login to an ftp connection are:

 

/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh

 

The man page for getusershell(3C) lists the default shells.

Copy the above list and then add unlisted shells such as /usr/bin/false like this:

 

/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh

/usr/bin/false

Please use plain text.
Super Advisor
NDO
Posts: 531
Registered: ‎12-10-2003
Message 4 of 4 (163 Views)

Re: I need to create a user that can only ftp to the system

Hi!

 

thank you Bill, I created the /etc/shells, and now its working fine.

 

NDO

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation