・ユーザーの登録

[root@centos]# useradd xxxx※xxxx と言うユーザーを追加
[root@centos]# passwd xxxx※ユーザー xxxx のパスワード設定
New UNIX password: ********※パスワード入力(* は実際には表示されません)
Retype new password: ********※パスワード入力(* は実際には表示されません)


・ユーザーの root 設定

誰でも root になれるのは問題がありますので今回登録したユーザー xxxx だけが root になれるように設定します
ここからの設定は root でログインしていないと出来ないので root に切り替えます

[root@centos]# su
password: ********※root のパスワード入力(* は実際には表示されません)

[root@centos]# usermod -G wheel xxxx※xxxx と言うユーザーをwheelグループに追加

su 設定ファイルの編集

[root@centos]# 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.
# authrequiredpam_wheel.so use_uid
※コメント解除
authrequiredpam_wheel.so use_uid

≪ 以下省略 ≫


なお、ユーザーを削除する場合
[root@centos]# userdel xxxx※xxxx と言うユーザーを削除


また、ユーザーをディレクトリごと削除する
[root@centos]# userdel -r xxxx※xxxx と言うユーザーをディレクトリごと削除