"su - root" giving incorrect password but normal root login works.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
"su - root" giving incorrect password but normal root login works.
Hi i am having same problem as i can login to root from GUI and from ssh but when i switch user to oracle or any other then i try to come back by su - and it gives me incorrect password error
Hi i am having same problem as i can login to root from GUI and from ssh but when i switch user to oracle or any other then i try to come back by su - and it gives me incorrect password error
Do not continue an old thread (which is not even yours), but instead open a new one.
Did you try the solutions suggested above before posting? If yes, then what's result?
Hi, i have tried to do those things that are already discussed but still i am not able to connect via root use after switching to any other user. some people suggest it has something to do with su i tried to set visudo for user oracle like
oracle ALL=(ALL) ALL
but still oracle to root switching is not working giving me incorrect password error.
There's difference between su (switch user) and sudo (superuser do). Both are different so don't confuse with them.
However, once login as root user and edit /etc/shadow file. Remove encrypted password for root user i.e. 2nd entry against root user (marked in red) leave it blank as:
Save and close the file and then invoke passwd command to reset root's password.
Then again login as any normal user and try su - root or su - or su and use new password for login.
sudo is actually 'substitute user do', in relation to su 'substitute user' (or switch user).
In both cases, assuming you have the setup/passwd, you can move from one user to ANY other user, not just root. http://linux.die.net/man/8/sudo http://linux.die.net/man/1/su
Yes i understand this but the problem is when i switch user from root to other user it connect to it but after this when i try to switch back to root by su - or su it asked me password and when i give password it shows incorrect password but i can connect with same password to GUI mode or by ssh
so what is the problem i cannot switch back to root?
If you've gone from any user (eg root) -> another user (eg oracle), then just exit that other user (oracle) session.
su and sudo both open a new session, they don't kill/replace the original session.
the problem occurs when i login to user oracle and after that for some reason i try to connect to root through terminal and it gives me incorrect password error.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.