Operating System - Tru64 Unix
1748159 Members
3900 Online
108758 Solutions
New Discussion юеВ

Re: i am getting an error when try to run sudo

 
OldSchool
Honored Contributor

Re: i am getting an error when try to run sudo

perhaps a better idea would be to define what these "other users" need to do, and give them the authority to do that, as opposed to simply giving them the ability to become root at will......
whiteSox
Frequent Advisor

Re: i am getting an error when try to run sudo

for example :

user01 hostname=NOPASSWD:ALL

unable to do /usr/local/bin/sudo su -

even when he is in the sudoers file ...
whiteSox
Frequent Advisor

Re: i am getting an error when try to run sudo

Is there a such a thing as trusted mode on tru64 ? Because i am still not sure why this is not working ?

hostname# su - user01
hostname> /usr/local/bin/sudo su -
You do not have permission to su root
Steven Schweda
Honored Contributor

Re: i am getting an error when try to run sudo

> Is there a such a thing as trusted mode on
> tru64 ?

Why ask about Tru64 in an HP-UX forum?

Why ask about "sudo" without giving any info
about which version, how it was built and/or
installed, and/or configured?
OldSchool
Honored Contributor

Re: i am getting an error when try to run sudo

"Is there a such a thing as trusted mode on tru64 ? Because i am still not sure why this is not working ?"

Don't know, and it really shouldn't matter. I believe that you've an error in the sudoers file. I appears that what you want is (where "hostname" is the actual name of the machine):

user01 hostname = ( root ) NOPASSWD: ALL

(allow user01 to become root, do anything w/o authentication

-- or possibly ----

user01 hostname = ( ALL ) NOPASSWD: ALL

(allow user01 to become anyone, do anything w/o authentication


I don't recommend either. Instead, figure out what "user01" needs to do (as whomever) and give them access to only that....
whiteSox
Frequent Advisor

Re: i am getting an error when try to run sudo

I added this line in the sudoers file and get the same error ...

user01 hostname=(ALL) NOPASSWD:ALL
OldSchool
Honored Contributor

Re: i am getting an error when try to run sudo

hmm....

I added the following on one of my boxes and it works as I described:

l00s7m fc000xsvms1=(ALL) NOPASSWD: ALL

my id (l00s7m) can do "sudo su -" on machine fc000xsvms1 (or anything else) without entering a password.

since you insist on munging the file, I can't tell if you entered the actual word "hostname" or the actual hostname of the machine (it should be the later).

You are using "visudo" to make these changes, right?
OldSchool
Honored Contributor

Re: i am getting an error when try to run sudo

make that:

my id (l00s7m) can do "sudo su -" (or anything else) on machine fc000xsvms1 (only) without entering a password, and I can bdecome any user....

whiteSox
Frequent Advisor

Re: i am getting an error when try to run sudo

I used the hostname meaning name of the server ...what else could cause that ??
OldSchool
Honored Contributor

Re: i am getting an error when try to run sudo

try it with

user01 ALL=(ALL) NOPASSWD: ALL


and see what happens...and post the actual error message(s) if any.

all I can tell you for sure is "it works for me" (on multiple platforms)