Saturday, December 13, 2014

[Linux] Add user as Root

For example I will add user bejo6 as root
You need login as root first, then run this following command:


[root@linux]# /usr/sbin/useradd -u 0 -o -g root -G 1,2,3,6,10 -m bejo6
[root@linux]# passwd bejo6
[root@linux]# type your password
[root@linux]# retype your password
[root@linux]# service sshd restart


Finnaly login with new user, then check status with this command:
"whoami;id"

login as: bejo6
bejo6@bejo6.com's password:
Last login: Sat Dec 13 14:40:16 2014 from 127.0.0.1
[root@linux ~]# whoami;id
root
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),6(disk),10(wheel)
[root@linux ~]#


No comments :