Sign in as "su" - password problem


#1

After new instal Linux Mint i can not sign in as “su” , because command line does not want to take password which I have used during installation. What should I do to make it work?
Thank you .


#2

Mint/Ubuntu Linux system’s come with undefined root password after the installation hence you cannot use su command to login to root shell as the root password is unknown. This is a default and normal behavior.

In order to access root’s command line you can execute:

$ sudo -i

After you enter your password you will be presented with root shell indicated by # character. Alternatively you can run any command with root privileges by simply prefixing any any command with sudo. Example:

$ sudo some_command

If you need to change to root shell by using the su command you first need to set root password. For example:

$ sudo passwd

After executing the above sudo command you will be first asked for your current user password. After the you will need to re-type a new root password two times. This will set a new password after which you can use the su command to access the root shell. Example:

$ su

Hope this helps

Lubos