/etc/sudoers
Hi Gurus / All,
I have been working with sudo for quite some time now. After reading the sudo man page, I have two questions in mind. 1) When we run sudo commands, in which shell those commands are executed ? I believe it should be the shell of root. 2) What is the role of "timestamp" in sudoers. I tried to google it but could not find something informative. Any ideas people, specially on the second question. |
Quote:
Code:
man sudoers |
Quote:
I have mentioned it in my first post already that I could not get the use of timestamps in sudoers clearly in man sudoers. |
Quote:
My Apologies Anyway, You didn't understand the following from the man page ??? Quote:
|
[QUOTE=anishakaul;4019119]I missed that statement in your OP.
My Apologies QUOTE] Now worries, I will explain my doubts line by line. Code:
-v If given the -v (validate) option, sudo will update the userâs timestamp, prompting for the userâs password if necessary. This extends the sudo - Does this means that if my sudo command takes more than 5 mins, will it terminate automatically ? - Will it ask for a password even if NOPASSWD is mentioned in /etc/sudoers ? - Where this updation of user's timestamp takes place; in a dir. or file under /var/run/sudo. Code:
-k The -k (kill) option to sudo invalidates the userâs timestamp by setting the time on it to the epoch. The next time sudo is run a password will These questions might be generic, but still I need help in these. |
Quote:
To which I answered in post 4 Your new question above is not the same as in your OP ! There is a difference between: A. What is the use/role of timestamps ? B. How operating system writes the timestamps ? Your new question needs to be answered by some sysadmin ! Quote:
http://www.unixtimestamp.com/index.php ___________________________EDIT___________________________ http://wordnetweb.princeton.edu/perl/webwn?s=epoch |
Quote:
Anyways, I am wating for someone else to answer me these questions. - How the timeout is set to 5 minutes in /etc/sudoers ? - Does this means that if my sudo command takes more than 5 mins, will it terminate automatically ? - Will it ask for a password even if NOPASSWD is mentioned in /etc/sudoers ? - Where this updation of user's timestamp takes place; in a dir. or file(s) under /var/run/sudo. - When we run sudo commands, in which shell those commands are executed ? I believe it should be the shell of root. |
Quote:
How does shell/operating system write/deal with timestamps ? Quote:
|
Quote:
I guess you misunderstood the question. You gave me this link. I am NOT asking how unix deals with timestamps, what I am asking is significance of timestamps for sudo users as I have never felt the need to know it until I read "man sudo". Meanwhile, I was just going through some more links, still I have these questions. - How the timeout is set to 5 minutes in /etc/sudoers ? - Does this means that if my sudo command takes more than 5 mins, will it terminate automatically ? - Will it ask for a password even if NOPASSWD is mentioned in /etc/sudoers ? - When we run sudo commands, in which shell those commands are executed ? I believe it should be the shell of root. Anyways, thanks for the help Anisha. |
Quote:
Quote:
Quote:
Code:
CONF=/etc/sudoers Quote:
|
Quote:
Quote:
That link and this one has details regarding epoch !!! |
Quote:
|
Quote:
|
All times are GMT -5. The time now is 02:37 PM. |