Difference between revisions of "Create Another Root Linux"

From MS Computech
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
[root@fedora ~]# adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M root2  
 
[root@fedora ~]# adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M root2  
 
[root@fedora ~]# passwd root2
 
[root@fedora ~]# passwd root2
 
 
Changing password for user root2.
 
Changing password for user root2.
 
 
New UNIX password:
 
New UNIX password:
 
 
Retype new UNIX password:
 
Retype new UNIX password:
 
 
passwd: all authentication tokens updated successfully.  
 
passwd: all authentication tokens updated successfully.  
 
[root@fedora ~]# id root2
 
[root@fedora ~]# id root2
 
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
 
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
 
[root@fedora ~]# less /etc/group
 
[root@fedora ~]# less /etc/group
 
 
root:x:0:root,root2
 
root:x:0:root,root2
 
 
bin:x:1:root,bin,daemon,root2
 
bin:x:1:root,bin,daemon,root2
 
 
daemon:x:2:root,bin,daemon,root2
 
daemon:x:2:root,bin,daemon,root2
 
 
sys:x:3:root,bin,adm,root2
 
sys:x:3:root,bin,adm,root2
 
 
adm:x:4:root,adm,daemon,root2
 
adm:x:4:root,adm,daemon,root2
 
 
disk:x:6:root,root2
 
disk:x:6:root,root2
 
 
wheel:x:10:root,root2
 
wheel:x:10:root,root2
 
login as: root2
 
login as: root2
 
 
[email protected]'s password:
 
[email protected]'s password:
 
 
Last login: Thu Nov 24 23:48:49 2005 from 10.7.0.112
 
Last login: Thu Nov 24 23:48:49 2005 from 10.7.0.112
 
 
Could not chdir to home directory /home/root2: No such file or directory
 
Could not chdir to home directory /home/root2: No such file or directory
 
 
-bash-3.00#
 
-bash-3.00#
 
 
-bash-3.00#
 
-bash-3.00#
 
 
-bash-3.00# su –
 
-bash-3.00# su –
 
 
[root@fedora ~]#  
 
[root@fedora ~]#  
 +
</pre>
 +
'''Create extra root user account to your Linux box on debian.'''
 
<pre>
 
<pre>
 +
useradd userxxx
 +
nano /etc/passwd
 +
</pre>
 +
Edit userid
 +
<pre>
 +
userxxx:x:0:0::/home/systemx:/bin/bash
 +
</pre>
 
----------------------------------------------------------
 
----------------------------------------------------------
  
 
[http://www.labtestproject.com/create_root_user_account Source]
 
[http://www.labtestproject.com/create_root_user_account Source]

Latest revision as of 15:17, 17 March 2012

Create extra root user account to your Linux box.

[root@fedora ~]# adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M root2 
[root@fedora ~]# passwd root2
Changing password for user root2.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully. 
[root@fedora ~]# id root2
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
[root@fedora ~]# less /etc/group
root:x:0:root,root2
bin:x:1:root,bin,daemon,root2
daemon:x:2:root,bin,daemon,root2
sys:x:3:root,bin,adm,root2
adm:x:4:root,adm,daemon,root2
disk:x:6:root,root2
wheel:x:10:root,root2
login as: root2
[email protected]'s password:
Last login: Thu Nov 24 23:48:49 2005 from 10.7.0.112
Could not chdir to home directory /home/root2: No such file or directory
-bash-3.00#
-bash-3.00#
-bash-3.00# su –
[root@fedora ~]# 

Create extra root user account to your Linux box on debian.

useradd userxxx
nano /etc/passwd

Edit userid

userxxx:x:0:0::/home/systemx:/bin/bash

Source