sudo 的命令设置
一些命令需要 sudo 访问权。
下表列出命令使用的文件。 在此表中:
- homedirectory 是用户的主目录的完整路径。例如, /home/username。
- Shell 可以是 /bin/bsh、/bin/sh 和其他项。
- profilepath 是用户的 shell 初始化文件的完整路径。例如,homedirectory/.profile。
| 命令 | 命令所使用的文件 | 操作 | 操作系统 |
|---|---|---|---|
| cat | /var/adm/cron/at.allow /var/adm/cron/ at.deny /var/adm/cron/cron.allow /var/adm/cron/cron.deny |
协调 (reconciliation) useradd usermod userdel |
AIX |
| /etc/cron.d/at.allow /etc/cron.d/at.deny /etc/cron.d/cron.allow /etc/cron.d/cron.deny |
协调 (reconciliation) useradd usermod userdel |
Solaris | |
|
/var/adm/cron/at.allow /var/adm/cron/at.deny /var/adm/cron/cron.allow /var/adm/cron/cron.deny |
协调 (reconciliation) useradd usermod userdel |
HP-UX-Trusted HP-UX-Nontrusted |
|
|
/etc/at.allow /etc/at.deny /etc/cron.allow /etc/cron.deny |
协调 (reconciliation) useradd usermod userdel |
Linux | |
| $homedir/.profile $homedir/.bash_profile $homedir/.bash_login $homedir/.cshrc $homedir/.login |
协调 (reconciliation) |
HP-UX-Trusted HP-UX-Nontrusted Linux Solaris |
|
| /tcb/files/auth/$usernamefolder/$username, 其中 $usernamefolder 是用户名的第一个字母 |
协调 (reconciliation) | HP-UX-Trusted | |
| /etc/passwd | usermod userdel 设置主目录 |
AIX | |
| /etc/passwd | 设置 umask | Linux - NonShadow Linux - Shadow HP-UX-Trusted HP-UX-Nontrusted Solaris |
|
| /etc/passwd | 协调 (reconciliation) | Linux - NonShadow Linux - Shadow HP-UX-Trusted HP-UX-Nontrusted Solaris |
|
| /etc/passwd | 设置主目录许可权 | AIX Linux - NonShadow HP-UX-Trusted HP-UX-Nontrusted Solaris |
|
| /etc/passwd | 暂挂和复原帐户和 userdel | Linux - NonShadow | |
| /etc/passwd | 设置密码和 userdel | HP-UX-Trusted | |
| /etc/passwd | usermod | Linux - NonShadow Linux - Shadow HP-UX-Trusted HP-UX-Nontrusted Solaris |
|
| /etc/passwd | 暂挂和复原帐户和 userdel |
Linux - Shadow |
|
| /etc/shadow |
协调 (reconciliation) 更改密码 |
Linux - Shadow |
|
| /etc/shadow | 协调 (reconciliation) |
HP-UX-Nontrusted Solaris |
|
| chage | 不适用 | Useradd Usermod |
Linux |
| chgroup | /etc/group/etc/passwd | Group mod | AIX |
| chmod | /var/adm/cron/at.allow /var/adm/cron/at.deny /var/adm/cron/cron.allow /var/adm/cron/cron.deny |
设置许可权 | AIX HP-UX-Trusted HP-UX-Nontrusted Solaris |
| AIXPConnRes.sh ViosAixPConnRes.sh mkvios.sh |
设置许可权 | AIX | |
| HPNTrustPConnRes.sh | 设置许可权 | HP-UX-Nontrusted | |
| HPTrustPConnRes.sh CryptPwd |
设置许可权 | HP-UX-Trusted | |
| LinuxPConnRes.sh | 设置许可权 | Linux - NonShadow | |
| LinuxShadowPConnRes.sh | 设置许可权 | Linux - Shadow | |
| SolarisPConnRes.sh | 设置许可权 | Solaris | |
| homedirectory 资源上临时文件的位置。缺省位置是 /tmp。 |
设置许可权 | AIX Linux - NonShadow Linux - Shadow HP-UX-Trusted HP-UX-Nontrusted Solaris |
|
| /etc/at.allow /etc/at.deny /etc/cron.allow /etc/cron.deny |
useradd usermod |
Linux - NonShadow Linux - Shadow |
|
| chpasswd | /etc/passwd | 设置 LDAP 注册表的密码 | AIX |
| chrole | 不适用 | 角色修改 | AIX |
| chsec | /etc/security/lastlog | 复原帐户 | AIX |
| chuser | homedirectory 和 shell | usermod | AIX |
| cp 注: CP 命令不是通过适配器代码用于这些平台。
|
/etc/skel/local.cshrc, profilepath | Useradd Usermod |
HP UX(可信和不可信) AIX |
| /etc/csh.cshrc, profilepath | 设置 umask | Linux - NonShadow Linux - Shadow |
|
| echo | 不适用 | Useradd Usermod 暂挂 复原 协调 |
Linux Solaris AIX |
| ed | profilepath | 设置 umask | Linux - NonShadow Linux - Shadow HP-UX-Trusted HP-UX-Nontrusted Solaris |
| /var/adm/cron/at.allow /var/adm/cron/at.deny /var/adm/cron/cron.allow /var/adm/cron/cron.deny |
useradd usermod userdel |
AIX HP-UX-Trusted HP-UX-Nontrusted Solaris |
|
| /etc/at.allow /etc/at.deny /etc/cron.allow /etc/cron.deny |
useradd usermod userdel |
Linux - NonShadow Linux - Shadow |
|
| faillock | 不适用 | Useradd Usermod 协调 暂挂 复原 |
Linux |
| faillog | 不适用 | Useradd Usermod 协调 暂挂 复原 |
Linux |
| fwtmp | /var/adm/wtmp /var/adm/wtmps |
协调 (reconciliation) | HP-UX-Trusted HP-UX-Nontrusted |
| getprpw/usr/lbin/getprpw | 不适用 | Usermod 暂挂 复原 |
HP-UX (可信) |
| grep | /etc/at.allow /etc/at.deny /etc/cron.allow /etc/cron.deny |
协调 (reconciliation) | Linux - NonShadow Linux - Shadow |
| homedirectory /etc/passwd /etc/shadow /var/adm/cron/at.allow /var/adm/cron/ at.deny /var/adm/cron/cron.allow /var/adm/cron/cron.deny |
Useradd Usermod Userdel 暂挂 复原 协调 |
AIX | |
| homedirectory /etc/passwd /etc/shadow /etc/cron.d/at.allow /etc/cron.d/at.deny /etc/cron.d/cron.allow /etc/cron.d/cron.deny |
Useradd Usermod Userdel 暂挂 复原 协调 |
Solaris | |
| homedirectory /etc/passwd /etc/shadow /var/adm/cron/at.allow /var/adm/cron/at.deny /var/adm/cron/cron.allow /var/adm/cron/cron.deny |
Useradd Usermod Userdel 暂挂 复原 协调 |
HP-UX(可信和不可信) | |
| groups | /etc/group/etc/passwd | Usermod 协调 |
Linux AIX |
| groupadd | 不适用 | 添加组 |
Linux Solaris HP-UX(可信和不可信) |
| groupdel | 不适用 | 删除组 |
Linux Solaris HP-UX(可信和不可信) |
| groupmod | 不适用 | 修改组 |
Linux Solaris HP-UX(可信和不可信) |
| hostname | 不适用 | 协调 (reconciliation) |
Linux Solaris HP-UX(可信和不可信) AIX |
| kill | 不适用 | Userdel |
Linux Solaris HP-UX(可信和不可信) AIX |
| lastlog | /var/log/lastlog | 协调 (reconciliation) | Linux - NonShadow Linux - Shadow |
| logins | /etc/group/etc/passwd | 暂挂 复原 协调 |
Linux Solaris HP-UX(可信和不可信) |
| lsgroup | /etc/group/etc/passwd | Groupmod 协调 |
AIX |
| ls -la | /etc/SuSE-release /etc/redhat-release /etc/debian_version |
确定操作系统 | Linux - NonShadow Linux - Shadow |
| /tcb/files/auth/system/default | 确定操作系统 | HP-UX-Trusted | |
| /usr/ios/cli/ios.level | 确定操作系统 | AIX | |
| homedirectory | 删除主目录 | AIX | |
| profilepath | 设置 umask | Linux - NonShadow Linux - Shadow HP-UX-Trusted HP-UX-Nontrusted Solaris |
|
| /var/adm/cron/at.allow /var/adm/cron/at.deny /var/adm/cron/cron.allow /var/adm/cron/cron.deny |
useradd usermod userdel |
AIX HP-UX-Trusted HP-UX-Nontrusted Solaris |
|
| homedirectory | 协调 (reconciliation) | Linux - NonShadow Linux - Shadow HP-UX-Trusted HP-UX-Nontrusted Solaris |
|
| 资源上临时文件的位置。缺省位置为 /tmp。例如,/tmp/AIXPConnRes.sh | 协调 (reconciliation) | AIX Linux - NonShadow Linux - Shadow HP-UX-Trusted HP-UX-Nontrusted Solaris |
|
| /etc/at.allow /etc/at.deny /etc/cron.allow /etc/cron.deny |
useradd usermod userdel |
Linux - NonShadow Linux - Shadow |
|
| lsrole | 不适用 | 协调 | AIX |
| lsuser | homedirectory | 添加 修改 协调 |
AIX |
| mkdir | 资源上临时文件的位置。缺省位置是 /tmp。 | useradd usermod userdel cat |
AIX HP-UX-Trusted HP-UX-Nontrusted Solaris Linux - NonShadow Linux - Shadow |
| mkgroup | /etc/group/etc/passwd | Groupadd | AIX |
| mkrole | 不适用 | 创建角色 | AIX |
| mkuser | homedirectory | 使用主目录添加用户 | AIX |
| modprpw/usr/lbin/modprpw | 不适用 | Usermod 暂挂 复原 |
HP_UX (可信) |
| mv | homedirectory | 移动主目录 | AIX |
| pam_tally2 | 不适用 | Useradd Usermod 协调 暂挂 复原 |
Linux |
| passwd | /etc/passwd/etc/shadow | Useradd Usermod 复原 |
Linux Solaris HP-UX(可信和不可信) AIX |
| pwdadm | 不适用 | Useradd Usermod 协调 |
AIX |
| rmgroup | /etc/group | Groupdel | AIX |
| rm -rf | homedirectory | 删除主目录 | AIX |
| rmrole | 不适用 | 角色删除 | AIX |
| rmuser | 不适用 | Userdel | AIX |
| 资源上临时文件的位置。缺省位置是 /tmp。 | useradd usermod userdel cat |
AIX HP-UX-Trusted HP-UX-Nontrusted Solaris Linux - NonShadow Linux - Shadow |
|
| tee | profilepath | 设置 umask | Linux - NonShadow Linux - Shadow HP-UX-Trusted HP-UX-Nontrusted Solaris |
| /var/adm/cron/at.allow /var/adm/cron/at.deny /var/adm/cron/cron.allow /var/adm/cron/cron.deny |
useradd usermod userdel |
AIX HP-UX-Trusted HP-UX-Nontrusted Solaris |
|
| /etc/at.allow /etc/at.deny /etc/cron.allow /etc/cron.deny |
useradd usermod userdel |
Linux - NonShadow Linux - Shadow |
|
| test | /tcb/files/auth/usernamefolder/username reconScriptLoc(reconscript 的资源上用户指定的位置) |
协调 (reconciliation) |
Linux Aix Solaris HP-UX(可信和不可信) |
| useradd | homedirectory | 使用主目录添加用户 | Linux - NonShadow Linux - Shadow HP-UX-Trusted HP-UX-Nontrusted Solaris |
| userdel | homedirectory | 删除用户 |
Linux Solaris HP-UX(可信和不可信) |
| usermod | homedirectory 和 shell | Useradd Usermod |
AIX |
| usermod.sam/usr/sam/lbin/usermod.sam | 不适用 | Useradd Usermod |
HP-UX (可信和不可信) |