2

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.

2

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

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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