Today a server root user can not log in, the normal user may log in.
Normal user su to root user also error
Su:bash:No such file or directory
View the next passwd file
oracle@linux-35:~> Cat/etc/passwd|grep Root
Root:x:0:0:root:/root:cd
The root of the shell has been changed to a CD, no wonder the above fault.
It is not possible to modify the passwd file directly with an Oracle user, without modifying the permissions.
So we have to use Sudoedit.
Oracle@linux-38:/etc> Sudoedit
Usage:sudoedit [-HPSB] [-P prompt] [-u username| #uid] file [...]
Oracle@linux-38:/etc> Sudoedit passwd
We Trust your have received the usual lecture from the local System
The Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) before you type.
#3) with the great power comes great responsibility.
Root ' s password:
Will
Root:x:0:0:root:/root:cd
To
Root:x:0:0:root:/root:/bin/bash
Save exit.
Oracle@linux-35:/etc> Su-root
Password:
linux-35:~ #
Root can log in.
This paper url:http://www.bianceng.cn/os/linux/201410/45602.htm
#sudo sudo executes commands through another user (execute a command as another user), and Su is used to toggle the user and then complete the task by switching to the user, but sudo can execute the command directly behind it, such as Su Do does not need the root password can perform root assignment and execution only root can execute the corresponding command, but through Visudo to edit/etc/sudoers to achieve;
#sudoedit and sudo are almost as powerful.
sudo details please view
http://zxf261.blog.51cto.com/701797/748756