Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed rssh on CentOS 5 from RPMForge. Then I tried to change the shell to rssh to one existing user like this:

[root@ddinvps ofertoza]# chsh -s /usr/bin/rssh ofertoza
Changing shell for ofertoza.
Warning: "/usr/bin/rssh" is not listed in /etc/shells
Shell not changed.

OK, I added /usr/bin/rssh to /etc/shells and now I don't get the warning, just this:

[root@ddinvps ofertoza]# chsh -s /usr/bin/rssh ofertoza
Changing shell for ofertoza.
Shell not changed.

Any ideas why would this happen? It's a normal user with /home/ofertoza as home dir. I want to use rssh to restrict the access for sftp/scp to only that dir where will reside the files of one website.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

just edit and change the /bin/bash into /usr/bin/rssh directly on /etc/passwd

share|improve this answer
add comment

The man page for usermod gives the following option:

-s, --shell SHELL
        The name of the user's new login shell. Setting this field to blank
        causes the system to select the default login shell.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.