Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-30-2017, 09:06 AM   #1
Registered: Aug 2007
Posts: 37

Rep: Reputation: 15
sudo -v prompting for password

I'm trying to get a set of automated scripts to run, but part of the pre-check process calls for the command "/usr/bin/env sudo -v". This is prompting for a password even though I have a line in the sudoers file specifying that the account running the script should have passwordless sudo access.

Can anyone tell me why I'd be getting prompted for a password in this case?

Thanks in advance.

Old 08-30-2017, 09:43 AM   #2
Registered: Aug 2002
Posts: 23,257

Rep: Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986
When given the -v (validate) option, sudo will update the user's cached credentials, authenticating the user's password if necessary.
The way I interpret the -v option in your case is that nothing is cached or something is set that would require authentication which is not used for passwordless access and so your now being prompted. What is the purpose for a "pre-check"
Old 08-30-2017, 09:47 AM   #3
LQ Guru
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 6,352
Blog Entries: 3

Rep: Reputation: 3264Reputation: 3264Reputation: 3264Reputation: 3264Reputation: 3264Reputation: 3264Reputation: 3264Reputation: 3264Reputation: 3264Reputation: 3264Reputation: 3264
What is the value of timestamp_timeout for sudo for that account?

sudo -l
It should be a non-zero number if you want to avoid the password every time.

(Also, if this really is on RHEL, then you are paying for a support contract and should turn to them to get your money's worth. If you are not getting your money's worth, then you should consider moving to another distro.)



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] htaccess not prompting for password jitendra.sharma Linux - Newbie 9 03-26-2013 08:49 AM
after giving for sudo su - command,it is prompting to change root passwd amar.sree Linux - Newbie 5 01-06-2013 11:24 PM
Ssh without prompting for a password deqmacrom Linux - General 2 04-21-2005 02:13 AM
Prompting for a password with pppoe fcnewbie Mandriva 0 06-15-2004 01:36 PM
frequent password prompting jwhiz Linux - Newbie 3 12-27-2003 05:03 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration