「CentOS Streamの設定」の版間の差分
提供: sha.ngri.la
(ページの作成:「==ユーザの追加== <pre> # useradd foo # passwd foo Changing password for user foo New password: Retype new password: passwd: all authentication tokens updated succ...」) |
細 (→ユーザ権限の追加) |
||
9行目: | 9行目: | ||
</pre> | </pre> | ||
===ユーザ権限の追加=== | ===ユーザ権限の追加=== | ||
− | + | <pre> | |
+ | # usermod -G wheel tara.ttm | ||
+ | # vi /etc/pam.d/su | ||
+ | </pre> | ||
<pre> | <pre> | ||
#%PAM-1.0 | #%PAM-1.0 | ||
17行目: | 20行目: | ||
#auth sufficient pam_wheel.so trust use_uid | #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 to require a user to be in the "wheel" group. | ||
− | < | + | #auth required pam_wheel.so use_uid |
+ | </pre> | ||
+ | <code>#auth required pam_wheel.so use_uid</code>をコメントをはずす。 | ||
+ | ===sshのrootログインを禁止する=== | ||
+ | <pre> | ||
+ | # vi /etc/ssh/sshd_config | ||
</pre> | </pre> | ||
+ | <code>PermitRootLogin yes</code>を<code>no</code>に変更 |
2021年9月14日 (火) 09:25時点における版
ユーザの追加
# useradd foo # passwd foo Changing password for user foo New password: Retype new password: passwd: all authentication tokens updated successfully.
ユーザ権限の追加
# usermod -G wheel tara.ttm # vi /etc/pam.d/su
#%PAM-1.0 auth required pam_env.so 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. #auth required pam_wheel.so use_uid
#auth required pam_wheel.so use_uid
をコメントをはずす。
sshのrootログインを禁止する
# vi /etc/ssh/sshd_config
PermitRootLogin yes
をno
に変更