LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is the default password for su (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-the-default-password-for-su-886674/)

hitmen 06-16-2011 04:34 AM

What is the default password for su
 
I went to my bash and typed su.
I got an authentication failure when I typed in my password. The same goes for my username.

What is the default password for su?

colucix 06-16-2011 04:38 AM

It's not a default password, it's the root's password. You set it during the linux installation process. If running ubuntu, maybe you want to use sudo to get administrator privileges.

ssrameez 06-16-2011 04:45 AM

simily giving "su" or "su -" will prompt for root password.
"su <user name>" - this will prompt for user's password. if the password is correct login to the user without taking the .profile* values of the user.
"su - <username>" - this is just like the above one. But while switching to the user account, it will execute the .profile, .bash_profile accordingly.

"sudo su -" -- this will allow you to switch to root, if you are authorized to do sudo to root. This works fine in Ubuntu as colucix mentioned.

colucix 06-16-2011 04:51 AM

Or more simply
Code:

sudo -i
Detailed info here: https://help.ubuntu.com/community/RootSudo

MTK358 06-16-2011 08:20 AM

You need root's password for su.

Ubuntu sets it to random characters to prevent you from logging in as root. This is because some users might get annoyed with having to type a password every time they do administration tasks, and decide to log into their desktop as root, which is a VERY bad idea.

If you want to be able to use su or log in as root (again, logging into your desktop as root is a bad idea and never necessary), then there is a way to set root's password to one you know. Enter this command, and follow the prompts:

Code:

sudo passwd
Now you can use su.


All times are GMT -5. The time now is 09:32 PM.