Sign in as "su" - password problem

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 .

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

1 Like

set a password for root user in a single go:

sudo passwd root

Test it your root password by typing the following command: su -

[mirandam@charon ~]$ su
Password:    <--- Enter root password

[root@charon mirandam]# 
echo 'worldstream ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

[root@charon mirandam]# exit

[mirandam@charon ~]$ 
du -sh /root
du: `/root': Permission denied  <--- Fails!!!

[mirandam@charon ~]$ #
sudo du -sh /root
163M    /root                   <--- Works!!!