Linux下賦予使用者su許可權

2021-09-01 18:17:28 字數 335 閱讀 7642

首先, 將使用者加入wheel組。 usermod -g wheel liuqiang

然後,修改/etc/pam.d/su檔案。

兩種su許可權設定方式:

1. auth required pam_wheel.so use_uid 這行去掉注釋的話,那麼只有wheel 組的人su後,輸入正確的root密碼才能使用root 許可權,不是wheel組的輸正確的root密碼也用不了root許可權,只會提示"不正確的密碼".

2. auth sufficient pam_wheel.so trust use_uid 這行注釋的話,只要是wheel組的人,su之後可以免輸入密碼,直接使用root許可權。

linux 增加使用者,賦予許可權

新增使用者 adduser test 新增乙個test使用者 passwd test 修改密碼 賦予root許可權 方法一 修改 etc sudoers 檔案,取消以下注釋 allows people in group wheel to run all commands配置項 wheel all a...

linux使用者賦予root許可權

1 新增使用者,首先用adduser命令新增乙個普通使用者,命令如下 adduser tommy 新增乙個名為tommy的使用者 passwd tommy 修改密碼 changing password for user tommy.new unix password 在這裡輸入新密碼 retype ...

linux賦予使用者root許可權

linux裡面管理員 sudo 和root許可權還是不一樣的,root是最高許可權了。賦予root許可權 方法一 修改 etc sudoers 檔案,找到下面一行,把前面的注釋 去掉 allows people in group wheel to run all commands wheel all...