Tao User tren Centos 7

[1] Tạo 1 tài khoản có tên "cent" :

[root@dlp ~]# useradd cent 
[root@dlp ~]# passwd cent
Changing password for user cent.
New UNIX password: # set password
Retype new UNIX password: # confirm
passwd: all authentication tokens updated successfully.
[root@dlp ~]# exit # logout

[2] Chuyển sang login bằng user mới tạo.

dlp login: cent                                # input user name
password: # password
[cent@dlp ~]$ su - # switch to root
Password:# root password
[root@dlp ~]# # just switched to root
 

[3] Tạo quyền cho user này có thể chuyển qua Admin. (vd này là user 'cent')

[root@dlp ~]# usermod -G wheel cent 
[root@dlp ~]# 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
 

[4] Để chuyển tiếp các email của root sang email người dùng khác, thiết lập như sau. (vd này là user 'cent')

[root@dlp ~]# vi /etc/aliases
# Person who should get root's mail
# last line: uncomment and change to a user
root: cent
[root@dlp ~]# newaliases # reload
  • 14 Người dùng thấy hướng dẫn này hữu ích
Hướng dẫn này có hữu ích?

Những hướng dẫn liên quan

Quan ly va Cau hinh cac dich vu bang systemctl tren Centos 7

6-Cấu hình các dịch vụ trên Centos 7[1] It's possible to make sure services' status like follows....

Cau hinh Network tren Centos 7

[1] Thiết lập IP tĩnh cho Server.Thay tên của card mạng "eno16777736" bằng tên của card mạng thực...

Cap nhat he thong Centos 7

7 - Cập nhật hệ thống Centos 7[1] Sau khi cài đặt xong hệ điều hành CentOS 7, bạn nên cập nhật...

Cau hinh Firewall va SELinux tren Centos 7

FireWall [1] Nếu Firewall trên máy chủ là không cần thiết (ví dụ đã có tường lửa khác đang chạy...

Huong dan cai dat CentOS 7

[1] CentOS 7.x tương thích với Red Hat Enterprise Linux 7.x. CentOS 7 được phát hành vào...