Operating System - Linux
1830938 Members
1804 Online
110017 Solutions
New Discussion

RedHat and /etc/ssh/sshd_config

 
SOLVED
Go to solution
joseph ortiz_1
New Member

RedHat and /etc/ssh/sshd_config

Hello, I'm a redhat user and own my own server and I comitted the following grave error:

in the /etc/passwd dir I changed the root shell from /sbin/bash to /sbin/nologin
which blocks to root: login, gdm, kdm, xdm, su, ssh, scp and sftp. Allows to root only sudo, ftp and email clients.

How do I reverse this and change the root shell back to /bin/bash so that I can do su - again?


Thank you for your help,
joseph ortiz
2 REPLIES 2
Alexander Chuzhoy
Honored Contributor
Solution

Re: RedHat and /etc/ssh/sshd_config

boot to init 1
then from command line type:
usermod -s /bin/bash root


to boot init 1-select the line that starts with the word "kernel" from grub menu and press "e" to edit it.Append digit 1 to it's end,press enter and then "b" to boot it.
Regards.
joseph ortiz_1
New Member

Re: RedHat and /etc/ssh/sshd_config

Thank you Alexander,

It worked!

10 points for you my friend :P


Thank you,
joseph ortiz