Tutorial Konfigurasi Redhat & CentOS : Cara Menambah User





assalamualaikum
halo sobat life4code, sekarang kita akan belajar bagaimana cara untuk menambah user pada Redhat
sebenernya sama seperti platform2 linux lainnya seperti ubuntu, debian, linux mint, dll, oke langsung saja, pertama buka terminal, kemudian ketikkan command sebagai berikut

menambah user :
[root@localhost ~]# useradd idn     #menambah user "idn"
[root@localhost ~]# passwd idn      #memberik password untuk user "idn"
Changing password for user cent.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# exit                   #keluar ( logout )
switch ke user yang telah dibuat :
localhost login: idn                                               # input user name
password:                                                              # password
[idn@localhost ~]$ su -                                        # switch ke root
Password:                                                              # root password
[root@localhost ~]#                                              
membatasi beberapa user yang hanya bisa switch ke root :
[root@localhost ~]# usermod -G wheel idn   [root@localhost ~]# vi /etc/pam.d/su#%PAM-1.0
auth            sufficient      pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth           sufficient      pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
# uncomment the following line
auth           required       pam_wheel.so use_uid
 auth           substack       system-auth
auth            include         postlogin
account       sufficient      pam_succeed_if.so uid = 0 use_uid quiet
account       include         system-auth
password    include         system-auth
session        include         system-auth
session        include         postlogin
session        optional        pam_xauth.so
oke mungkin itu dulu sampai jumpa dilain waktu..
wassalamualaikum


0 Response to "Tutorial Konfigurasi Redhat & CentOS : Cara Menambah User "

Post a Comment