This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:sudo [2024/01/18 17:28] manu |
linux:sudo [2025/02/25 13:27] (current) manu [sudo howto] |
||
---|---|---|---|
Line 20: | Line 20: | ||
# sudo -u bin -g operator /bin/ls /whatever/directory | # sudo -u bin -g operator /bin/ls /whatever/directory | ||
- | <cli> | + | <cli prompt='>'> |
[root@aix001]/etc/sudoers.d> cat zabbix | [root@aix001]/etc/sudoers.d> cat zabbix | ||
%AIXUSERS ALL=(root) NOPASSWD: /usr/bin/vi /etc/zabbix/* | %AIXUSERS ALL=(root) NOPASSWD: /usr/bin/vi /etc/zabbix/* | ||
Line 31: | Line 31: | ||
[myaixuser01@aix001]/home/myaixuser01> sudo /etc/rc.d/init.d/zabbix-agent start | [myaixuser01@aix001]/home/myaixuser01> sudo /etc/rc.d/init.d/zabbix-agent start | ||
Zabbix agent started | Zabbix agent started | ||
+ | </cli> | ||
+ | |||
+ | Change sudo default timeout (5 min): | ||
+ | <cli prompt='>'> | ||
+ | root@nimprod /root> sudo -V | grep -i time | ||
+ | Lecture user the first time they run sudo | ||
+ | Authentication timestamp timeout: 120.0 minutes | ||
+ | Password prompt timeout: 5.0 minutes | ||
+ | Path to authentication timestamp dir: /var/run/sudo/ts | ||
+ | Type of authentication timestamp record: tty | ||
+ | Sudo log server timeout in seconds: 30 | ||
+ | |||
+ | root@nimprod /root> grep -i time /etc/sudoers | ||
+ | Defaults timestamp_timeout=120 | ||
</cli> | </cli> | ||