Password Prompt timer

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
Razor23259

Password Prompt timer

Post by Razor23259 »

Hello; I am new to this forum, but have been running, and loving, LM for quite awhile.

I will start to say that my question is either obvious or impossible; I don't know, simply because I can't seem to find a good way to phrase my query in a 'Google-friendly' way. The title only tells so much, and you can see how irrelevant results can surmise from it.

Anyway, I use the terminal a lot for simple things, like updating and hardware functions (like, restarting via 'init'). And There is, of course, a prompt for password. There is a certain time-frame in which it will except root commands without a password prompt, to which I'm delighted when I fall under; I only ask if there is a way to extend that time-frame (from, a minute to ten minutes, for example) for pure convenience. Once in a blue moon someone will use my computer, and about 98% of those people look at me funny when the terminal appears.

If anyone can offer a simple lesson, it would be appreciated :)

Regards, Raz
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
remoulder
Level 17
Level 17
Posts: 7621
Joined: Fri May 09, 2008 1:14 pm

Re: Password Prompt timer

Post by remoulder »

This is not really a bash question so this post would be better in a different forum. Before you make any changes wrt root access, you need to seriously read up on the implications of doing so. Whilst you may think it an inconvenience to have to enter your password there are good reasons for it, and in general you only need to be root to change entire system related things and most user things can be done without needing root permissions. To answer your question search the ubuntu forums for sudo timeout and you should find the answer.
[Edit] your original post and add [SOLVED] once your question is resolved.

“The people are my God” stressing the factor determining man’s destiny lies within man not in anything outside man, and thereby defining man as the dominator and remoulder of the world.
User avatar
xenopeek
Level 25
Level 25
Posts: 29612
Joined: Wed Jul 06, 2011 3:58 am

Re: Password Prompt timer

Post by xenopeek »

remoulder is right, be careful with this. The Ubuntu guide to this is here: https://help.ubuntu.com/community/RootS ... do_timeout. Following the link there to read how to change this, but I suggest you read the page I linked as this has a lot of useful information on sudo.

If you want to remain working on the same terminal, but want to end the timeout for sudo so the next sudo command will need a password again, run "sudo -k".
Image
Razor23259

Re: Password Prompt timer

Post by Razor23259 »

Thanks for the replies; I thought it would be on the wrong forum, but I wasn't really sure where to put it.

I'll try those suggestions, and I do know the implications of staying on root. I'm not an idiot.
User avatar
xenopeek
Level 25
Level 25
Posts: 29612
Joined: Wed Jul 06, 2011 3:58 am

Re: Password Prompt timer

Post by xenopeek »

Just a friendly warning. I can't speak for remoulder, but I know I've run things as root that I didn't mean to :wink:
Image
Locked

Return to “Scripts & Bash”