Operating System - HP-UX
1833017 Members
2307 Online
110048 Solutions
New Discussion

Re: SUDO REQUIRES PASSWORD

 
frederick hannah
Super Advisor

SUDO REQUIRES PASSWORD

Why does sudo prompt me for a password on some commands and not another? The userid is ops. The server runs 11.i.

4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: SUDO REQUIRES PASSWORD

To really answer that we would have to see the sudoers file.

sudo can be configured to behave in just this fashion. There are options to require passwords sometimes and to not require passwords at other times.

It sounds like that is how this was set up.

If you did not set up sudo on this machine, talk to the person that did.
Jeff_Traigle
Honored Contributor

Re: SUDO REQUIRES PASSWORD

Which commands prompt for a password? What's the exact command line used when it prompts for the password?
--
Jeff Traigle
Jeff_Traigle
Honored Contributor

Re: SUDO REQUIRES PASSWORD

And I notice your User_Alias and Cmnd_Alias are both OPS. Might work this way based on context, but I would personally rather keep the alias names unique throughout the file so would call them OPS_USERS and OPS_CMDS, respectively. Reduces human interpretation confusion if nothing else.
--
Jeff Traigle
Manuel Contreras
Regular Advisor

Re: SUDO REQUIRES PASSWORD

your password prompts, are you prompted every time you run the same sudo cmd or is it random?
there is a time-limit/delay the sudo remembers and will not prompt you until that time-limit has expired.
this got me a while back when I was explaining sudo to someone, why it would prompt you in the beginning and not subsequent sudo cmds....unless there was a delay when cmd. was entered.