Existing user, the decent way:
sudo usermod -a -G sudo username
Yes you can create another account who will have the same power as root user,
Use the command ,
useradd -ou 0 newrootuser
passwd newrootuser
After this user(newrootuser) will work as root user
Create additional root-level accounts by running these commands from a terminal session:
sudo su newrootuser
useradd -G root newrootuser
passwd newrootuser
id
(you should see something similar to: uid=1001(newusername) gid=1001(newusername) groups=0(root)
usermod username -o -u 0 -g 0
(in the usermod command string, the first switch is the letter “O”. The characters following the -u and -g switches are each “zero”)
id
(now you should see something similar to: uid=0(root) gid=0(root) groups=0(root)
ubuntu - add new user with root access in Linux - Server Fault
|
ubuntu - add new user with root access in Linux - Server Fault
You can edit the
|
No Comments