Difference between revisions of "Create Another Root Linux"
From MS Computech
(Created page with ''''Create extra root user account to your Linux box.''' The ‘root’ account with user id 0 is the most powerful user in Linux and Unix system. This article show the st…') |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''Create extra root user account to your Linux box.''' | '''Create extra root user account to your Linux box.''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<pre> | <pre> | ||
− | + | [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> | </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