1827289 Members
3178 Online
109717 Solutions
New Discussion

Re: Sudo Problem

 
frederick hannah
Super Advisor

Sudo Problem

I get "user not in sudoers files" attempting to run a command with a select userid. The userid is in the sudoers file, but it seems as thought sudo doesnt "see it". How can I resolve this issue?
11 REPLIES 11
RAC_1
Honored Contributor

Re: Sudo Problem

Does userid match exactly in sudoers file??

Can you execute the command with sudo -u "user_id" command??

Anil
There is no substitute to HARDWORK
vinodan
Advisor

Re: Sudo Problem

Dear Frederick,
What sudo -l command shows?
.Normally it should display the commands
that the particaular user is allowed to execute.

vinod
frederick hannah
Super Advisor

Re: Sudo Problem

No, i cant execute sudo - u "user_id" command without a security violation
frederick hannah
Super Advisor

Re: Sudo Problem

sudo -l states "that user is not allow to use sudo on the node." I added the users via "visudo". Did I miss a step?
RAC_1
Honored Contributor

Re: Sudo Problem

How does your sudoers line for this user looks like??

Should be as follows.

user_name "host_name" command1, command2
There is no substitute to HARDWORK
Sudeesh
Respected Contributor

Re: Sudo Problem

I faced this issue few times due to UID duplication. After logging with the user name use "id" commnd to confirm you have the same uid as specified in sudoers file.


Sudeesh
The most predictable thing in life is its unpredictability
frederick hannah
Super Advisor

Re: Sudo Problem

S,

My sudoers file doesnt have uid info in it. I will compare sudoers files on different systems to see what may be wrong in my case.
Sudeesh
Respected Contributor

Re: Sudo Problem

Hi,

I think my last post confused a bit.
As you said sudoers file will not contain any UID info.

What I wanted you to do is:

Login as the user to whom you are giving sudo access. Execute id commnad and verify the uid shown matches what the user have in /etc/passwd file. If they are diffrent, points to a UID duplication in passwd file. In such cases sudo will fail.


[rx260-01]/ >id
uid=1000(sudhi) gid=3(sys)
[rx260-01]/ >cat /etc/passwd|grep sudhi
sudhi::1000:3::/:/sbin/sh


Sudeesh


The most predictable thing in life is its unpredictability
Devender Khatana
Honored Contributor

Re: Sudo Problem

Hi,

In all such scenarios, sudoers file is found culprit. Can you post the contents here? It will help us to provide some help.

HTH,
Devender
Impossible itself mentions "I m possible"
frederick hannah
Super Advisor

Re: Sudo Problem

There is no uid conflict Sudeesh. I check "id" against" grep ahdadmin /etc/passwd. Attached is a copy of visudo. My id is ahdadmin.
Devender Khatana
Honored Contributor

Re: Sudo Problem

Hi,

The attachement is not getting opened. Just check.

Regards,
Devender
Impossible itself mentions "I m possible"