LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-30-2017, 09:06 AM   #1
tejama
Member
 
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.

OS: RHEL6.8
 
Old 08-30-2017, 09:43 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,611

Rep: Reputation: 4169Reputation: 4169Reputation: 4169Reputation: 4169Reputation: 4169Reputation: 4169Reputation: 4169Reputation: 4169Reputation: 4169Reputation: 4169Reputation: 4169
Quote:
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
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 5,681
Blog Entries: 3

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

Code:
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.)
 
  


Reply

Tags
sudo


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:13 PM.

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