ユーザー管理 (Vine Linux)

ユーザーの追加とパスワードの設定

ユーザーの追加

# /usr/sbin/useradd USERNAME
# /usr/sbin/useradd -s /bin/tcsh USERNAME ← ログインシェルを/bin/tcshにする場合 # /usr/sbin/useradd -s /sbin/nologin USERNAME ← ログインシェルが不要な場合

パスワードの設定・変更

# passwd USERNAME


ログインシェルの変更

ログインシェルの変更

# chsh -s /bin/tcsh USERNAME/bin/tcshに変更する場合


グループの設定

/etc/groupに次のような一行を追加する

# vi /etc/group
GROUPNAME:x:ID:USERNAME1,USERNAME2


rootになれるユーザーを制限する

/etc/login.defsを編集してルートになれるグループを指定する。

# vi /etc/login.defs
SU_GROUPNAME_ONLY yes

/etc/pam.d/suを編集する。

# vi /etc/pam.d/su
auth required /lib/security/pam_GROUPNAME.so use_uid ← 行頭の#を削除する)

※セキュリティ確保のため必ず制限しておきましょう。

▲ページ先頭へ

スポンサード リンク