 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

9th February 2011, 09:19 PM
|
|
Registered User
|
|
Join Date: Dec 2010
Posts: 174

|
|
|
Does sudo have to ask for my password every single time?
It seems that every time I use the 'sudo' command I have to type a password. Is there a way to get 'sudo' to remember the password at least for the current session after I use it once or something like that?
Thank you.
|

9th February 2011, 09:44 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,092

|
|
|
Re: Does sudo have to ask for my password every single time?
It should last 5 minutes.
It is limited to prevent "walkup" take overs (ie. you have to step out...).
|

9th February 2011, 09:46 PM
|
|
Registered User
|
|
Join Date: Dec 2010
Posts: 174

|
|
|
Re: Does sudo have to ask for my password every single time?
For me it is not lasting even five minutes. It asks every time for a password no matter what.
|

9th February 2011, 09:47 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,092

|
|
|
Re: Does sudo have to ask for my password every single time?
Well,, it appears to be a compile time limit. I haven't found any way to
change it. There may be a way though, but so far, without looking at the
source, I've seen no configuration file that contains it.
|

9th February 2011, 09:55 PM
|
|
Registered User
|
|
Join Date: Dec 2004
Location: Cambridge, MA
Posts: 89

|
|
|
Re: Does sudo have to ask for my password every single time?
as long as you enter another sudo command within 5 minutes of the last sudo command, you won't have to enter your password. you can change the default action in /etc/sudoers. do 'man sudoers' for more information.
---------- Post added at 04:55 PM ---------- Previous post was at 04:48 PM ----------
from 'man sudoers':
Code:
timestamp_timeout
Number of minutes that can elapse before sudo will ask
for a passwd again. The default is 5. Set this to 0
to always prompt for a password. If set to a value
less than 0 the user’s timestamp will never expire.
This can be used to allow users to create or delete
their own timestamps via sudo -v and sudo -k
respectively.
and
Code:
exempt_group
Users in this group are exempt from password and PATH
requirements. This is not set by default.
|

9th February 2011, 09:58 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,092

|
|
|
Re: Does sudo have to ask for my password every single time?
Thanks - I looked for a timeout in there, but didn't find one. (nor the info
file either...)
|

9th February 2011, 10:12 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,976

|
|
|
Re: Does sudo have to ask for my password every single time?
Another thing to keep in mind that everyone probably knows, but no one has mentioned, so just in case....
If I have an xterm open, and do sudo whatever, within that xterm, I have a five minute period to do something.
However, if I then open another xterm and type sudo whatever, I will have to enter my password again. It's a separate session.
|

9th February 2011, 10:24 PM
|
|
Registered User
|
|
Join Date: Nov 2010
Location: Australia
Posts: 683

|
|
|
Re: Does sudo have to ask for my password every single time?
Yes exactly, as long as it's the same session (terminal window) it should definitely last you 5 minutes.
You can also grant yourself the no password ability in the sudoers file too... but wouldn't recommend that..
__________________
OS': Arch Linux (KDE 4.10) - Fedora 17 (MATE) - Arch Linux (E17) - now Windows-free thanks Valve!
|

10th February 2011, 04:47 AM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 23

|
|
|
Re: Does sudo have to ask for my password every single time?
Quote:
Originally Posted by ElderSnake
Yes exactly, as long as it's the same session (terminal window) it should definitely last you 5 minutes.
You can also grant yourself the no password ability in the sudoers file too... but wouldn't recommend that..
|
+1 Yeah, kind of beats the whole purpose of not logging in as root to begin with
|

10th February 2011, 02:22 PM
|
 |
Registered User
|
|
Join Date: Aug 2009
Location: College Station, TX
Posts: 501

|
|
|
Re: Does sudo have to ask for my password every single time?
Quote:
Originally Posted by thunderwinde
+1 Yeah, kind of beats the whole purpose of not logging in as root to begin with 
|
Not entirely... it means I would have to do:
sudo rm -rf /
instead of just:
rm -rf /
to ruin my whole day.
SS
|

10th February 2011, 02:52 PM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 4,976

|
|
|
Re: Does sudo have to ask for my password every single time?
It can be useful in a script, where one specifies that only command x can be run with no password. Like many things, useful, but bad if misused.
|

10th February 2011, 09:15 PM
|
|
Registered User
|
|
Join Date: Oct 2008
Posts: 492

|
|
|
Re: Does sudo have to ask for my password every single time?
Hi,
If you need a long-lasting "sudo", just open a root shell:
sudo bash
WWell,
|

11th February 2011, 05:37 AM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 23

|
|
|
Re: Does sudo have to ask for my password every single time?
Quote:
Originally Posted by SiliconSlick
Not entirely... it means I would have to do:
sudo rm -rf /
instead of just:
rm -rf /
to ruin my whole day.
SS
|
Must be a fast user if you can undo that in just one day 
---------- Post added at 09:37 PM ---------- Previous post was at 09:35 PM ----------
Quote:
Originally Posted by assen
Hi,
If you need a long-lasting "sudo", just open a root shell:
sudo bash
WWell,
|
Hmm... I might be missing something here, but how exactly would that differ from just opening a shell and logging in as root? Seems like a roundabout way to get to where 'su -' will take you.
|

11th February 2011, 07:49 AM
|
|
Registered User
|
|
Join Date: Oct 2010
Posts: 229

|
|
|
Re: Does sudo have to ask for my password every single time?
Quote:
Originally Posted by thunderwinde
Hmm... I might be missing something here, but how exactly would that differ from just opening a shell and logging in as root? Seems like a roundabout way to get to where 'su -' will take you.
|
I guess if you do not have the root password but you do have sudo privileges, this might be an option. But then you could always
|

11th February 2011, 08:07 AM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 23

|
|
|
Re: Does sudo have to ask for my password every single time?
Quote:
Originally Posted by jroa1
I guess if you do not have the root password but you do have sudo privileges, this might be an option. But then you could always
|
The logical continuation of which is:
Code:
# sudo su -
# passwd root
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 08:14 (Sunday, 19-05-2013)
|
|
 |
 |
 |
 |
|
|