Ubuntu 16.04 LTS : kich hoat tai khoan root

The root Account in Ubuntu is disabled by default because his password is not set. But if you'd like to use root Account by some reason, it's possible to use like follows.
[1] The user account added during installation is set an administrative account with Sudo, so it's easy to get root account's shell like follows.

xerus@dlp:~$ sudo -s 
[sudo] password for xerus: # own password
root@dlp:~# # switched

Or it's possible to switch to root account with su command to set root account's password.

xerus@dlp:~$ sudo passwd root 
[sudo] password for xerus: # own password
Enter new UNIX password: # set root password
Retype new UNIX password: # confirm
passwd: password updated successfully
xerus@dlp:~$ su - 
Password:# input root password
root@dlp:~## switched

* The examples on this site shows as a root account. If you use Sudo, add "sudo" on the head of commands. It had better to limit user if you enable root account. For using by Sudo, it's possible to limit to prohibit shells in sudoers config, refer to details about Sudo Settings. [3] For limit to do su command, set like follows.

root@dlp:~# vi /etc/pam.d/su
# line 15: uncomment and add a group which is allow to do su command
auth   required   pam_wheel.so   group=adm
root@dlp:~# usermod -G adm ubuntu 
  • 2 istifadəçi bunu faydalı hesab edir
Bu cavab sizə kömək etdi?

Uyğun məqalələr

Ubuntu 16.04 LTS : cai dat

[1] Insert a disk for installation of Ubuntu 16.04 and reboot your computer. Next, Choose...

Ubuntu 16.04 LTS : tao user

[1]If you'd like to add new user, Add like follows. # add a new user "ubuntu" xerus@dlp:~$ sudo...

Ubuntu 16.04 LTS : cau hinh network

[1] Change to static IP addres if you use Ubuntu as a server. "ens3" is different on each...

Ubuntu 16.04 LTS : cau hinh tat mo cac dich vu he thong

[1] It's possible to make sure services' status like follows. # display the list of services...

Ubuntu 16.04 LTS : cap nhat he thong

[1] Update System. # Update List first root@dlp:~# aptitude update Hit...