Centos – Change shell on Cent OS 5 to rssh: “Shell not changed”

centosshell

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.

Best Answer

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

Related Topic