linux new user add

Add the user. In the following example, we will use the user name admin. The command adduser will automatically create the user, initial group, and home directory.

[root@root ~]# adduser admin
[root@root ~]# id admin
uid=10018(admin) gid=10018(admin) groups=10018(admin)
[root@root ~]# ls -lad /home/admin/
drwx—— 2 admin admin 4096 Jun 25 16:01 /home/admin/

Set the password for the admin user. When prompted, type and then retype the password.

[root@root ~]# passwd admin
Changing password for user admin.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@root ~]#

For sudo permissions for your new admin user, use the following command.

[root@root ~]# echo ‘admin ALL=(ALL) ALL’ >> /etc/sudoers

No responses yet

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir