Computing.Net > Forums > Solaris > FTP with Restricted Shell

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

FTP with Restricted Shell

Reply to Message Icon

Name: asad
Date: June 11, 2002 at 11:23:45 Pacific
Comment:

I am trying to use an account with the default shell in the /etc/passwd file as Restricted Shell /usr/lib/rsh. I want this account to be able to FTP into a single directory only. The problem that I am having is that I can telnet and log into the /home directory of this user and it works fine. But when I try and use this account to FTP into that same /home directory it will not allow my to login. Any ideas? Does the restricted shell prevent one from using FTP?

Please help...



Sponsored Link
Ads by Google

Response Number 1
Name: Zenon
Date: June 11, 2002 at 12:52:32 Pacific
Reply:

I have experienced the same problem. I got an incorrect login error when trying to FTP but telnet allows me in without problems.

Zenon


0

Response Number 2
Name: westwood01
Date: June 12, 2002 at 22:01:27 Pacific
Reply:

look at /etc/ftpusers and see if the user that you are trying to ftp with is listed. if so, remove that user from the file. this will allow ftp access for that user.
hope this is what you were looking for.


0

Response Number 3
Name: asad
Date: June 13, 2002 at 06:18:45 Pacific
Reply:

The user/group does not appear in the /etc/ftpusers file. When I try to login via FTP with this users it throws a login error. Thanks.


0

Response Number 4
Name: joe
Date: June 13, 2002 at 10:56:24 Pacific
Reply:

verify the shell you are trying to use is located in the /etc/shells file


0

Response Number 5
Name: asad
Date: June 14, 2002 at 11:32:10 Pacific
Reply:

well...adding that the /usr/lib/rsh to the /etc/shells file now allows me to FTP in as that user but, it does not restrict my shell to that users /home directory. It will allow me to cd to directories other than the /home directory. Any other things I could be missing? Would the .login or .profile come into play here? Thanks for all the help...appreciate it!

asad


0

Related Posts

See More



Response Number 6
Name: robo
Date: July 5, 2002 at 03:20:35 Pacific
Reply:

One way to solve this problem is:

give the user a restricted shell (for example /usr/lib/rsh; this is not the same as the remote shell /usr/bin/rsh).

Then you have to create a file /etc/shells (if it does not exist yet) where you have to put in every login shell with which "ftp" is allowed (i.e. if the user with the restricted shell is the only ftp user then the only entry is: /usr/lib/rsh. If you have another user with the Korn shell as login shell and this user should be able to "ftp" then you have to add the Korn shell as well).

In addition if you want to give the user some rights in his home dir (in this example I want that the user is able to do a "ls" command), then you can do the following:

$ mkdir /usr/rbin
$ cd /usr/rbin; ln -s /usr/bin/ls ls
Then insert the following in the user's .profile:
PATH=/usr/rbin

I hope that is the answer to your question



0

Sponsored Link
Ads by Google
Reply to Message Icon

Sendmail / Hostname probl... Pleeeeaaaassseee... Disks...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: FTP with Restricted Shell

Setting up a restricted shell www.computing.net/answers/solaris/setting-up-a-restricted-shell/4322.html

Urgency!!FTP access again www.computing.net/answers/solaris/urgencyftp-access-again/2059.html

Need help with a simple script www.computing.net/answers/solaris/need-help-with-a-simple-script/2777.html