Create extra root user account to your Linux box.

Create extra root user account to your Linux box.
 
The ‘root’ account with user id 0 is the powerful user account in Linux and Unix system.  You can create duplicate root account that have the same privileges as root account in the linux.</p>

user id for ‘root’:
 
[root@server ~]# id root
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)

 
Explanation:
uid=0(root) The user id for user 'root' is 0.
gid=0(root) the group id for user ‘root’ is 0.
groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) The user ‘root’ is belongs to all above groups.
 

[root@server ~]# less /etc/passwd
root:x:0:0:root:/root:/bin/bash
[root@server ~]# less /etc/shadow
root:$1$B2BEWv4X$Gb.QPb6I3RwCkEkz13ow21:13080:0:99999:7:::
[root@server ~]# less /etc/group
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tdisk:x:6:root
wheel:x:10:root

 
 
command:
 
[root@server ~]# adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M root2

 
-M: this option creates user without home directory. 

you need to have the administrative privilege on the system in order to issue 'adduser' command above. We can specify a password for the created user using  “passwd” command.</div> </div>

comments powered by Disqus