linux - How "sudo" command works? -
my understand sudo executes given command root privileges, experienced entering command in terminal sudo caches authorization. how works?
for e.g.
sudo fdisk -l [sudo] password xxxxx:
(once authorize entering password, successive sudo commands not prompting passwords)
sudo fdisk -l
(not prompting password)
sudo mount -t vfat /dev/sda1 /media/test
whether sudo wrapper su (substitute/switch user)?
man sudo
tell:
security policies may support credential caching allow user run sudo again period of time without requiring authentication. sudoers policy caches credentials 15 minutes, unless overridden in sudoers(5). running sudo -v option, user can update cached credentials without running command.
it says:
-k [command] when used alone, -k (kill) option sudo invalidates user's cached credentials. next time sudo run password required. option not require password , added allow user revoke sudo permissions .logout file. not security policies support credential caching. when used in conjunction command or option may require password, -k option cause sudo ignore user's cached credentials. result, sudo prompt password (if 1 required security policy) , not update user's cached credentials.
Comments
Post a Comment