Why can't I access super-user mode with su? [duplicate]
Ubuntu uses sudo
instead of an explicit root account. You can log in as root directly with sudo su
, if that's more comfortable for you.
See Advantages and Disadvantages of sudo for why Ubuntu does this.
Because you don't enable root account by default Ubuntu disable it. Enabling root by these commands:
$ sudo passwd root
[sudo] password for abc:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
and use su-
switch to root account
If you want to do root operations you can:
- Use
sudo
with your user password, and you can do everything that root user do. - Use
sudo su
with your user password to obtain root access - Use
sudo passwd
with that command are changing the root password, then you can easily access root user using su like other distros (and you can continue to use also sudo).