Add a user2008/11/26 |
[1] | Add a User for administrations. |
[root@ns ~]# useradd fedora [root@ns ~]# passwd fedora Changing password for user fedora. New UNIX password: # input password you want to set Retype new UNIX password: # verify passwd: all authentication tokens updated successfully. [root@ns ~]# # logout |
[2] | Try to switch to a user that was added in section [1]. |
ns login: fedora # input user name password: # input password [fedora@ns ~]$ su - # switch to root Password: # input password for root [root@ns ~]# # done to switching to root |
[3] | Set 'fedora' as a user that was added in section [1] be only a user who can switch to root. |
[root@ns ~]# vi /etc/group # line 11: add user wheel:x:10:root ,fedora [root@ns ~]# 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. # remove '#' that was on the head of line auth required pam_wheel.so use_uid auth include system-auth account sufficient pam_succeed_if.so uid = 0 use_uid quiet account include system-auth password include system-auth session include system-auth session optional pam_xauth.so [root@ns ~]# vi /etc/login.defs # add at the bottom SU_WHEEL_ONLY yes |
Forward email for root to a user
|
[4] | Set config to forward mails for root to a user who is a system administrator you set as. |
[root@ns ~]# vi /etc/aliases # Person who should get root's mail # bottom: remove '#' and add user name root: fedora [root@ns ~]# # set new aliases /etc/aliases: 77 aliases, longest 10 bytes, 776 bytes total |
Sponsored Link |
|