Operating System - HP-UX
1827894 Members
1587 Online
109969 Solutions
New Discussion

creating user with sudo access

 
SOLVED
Go to solution
Jagadesh_2
Regular Advisor

creating user with sudo access

Hi,

I need to create a user in HPUX 11.11 with sudo access. How can i go about in doing the same?
6 REPLIES 6
Darrel Louis
Honored Contributor
Solution

Re: creating user with sudo access

Jagadesh,

If you want users or groups to perform some commands with sudo you should specify this in the /etc/opt/sudo/sudoers file.

http://www.courtesan.com/sudo/sudo.html

Darrel
Jagadesh_2
Regular Advisor

Re: creating user with sudo access

Hi Darrel,

When i do swlist for sudo
# swlist -l fileset |grep -i sudo
# sudo 1.6.6 sudo
sudo.sudo-RUN

but i am not able to find sudo under /etc/opt/



Darrel Louis
Honored Contributor

Re: creating user with sudo access

Jagadesh,

Whereis sudo installed and whereis your sudoers file?
/opt/sudo
In my previous post I've included a url, did you check the Sudoers link.
Use visudo to edit the sudoers file!

When you issue the sudo command doesn't it give you a error message?

Darrel
Fabio Ettore
Honored Contributor

Re: creating user with sudo access

Hi Jagadesh,

if sudo is installed on your system you should have the utility called visudo.
Keep in mind that you will see products by swlist if they were installed by swinstall as a depot.
I said so because I installed sudo by tar file by ftp://ftp.cs.colorado.edu/pub/sudo/

Then:

cd //
visudo

and insert in the file (for example)

# User privilege specification
root ALL=(ALL) ALL
=/usr/sbin/mount

mount is an example.
This is a simple configuration.

Best regards,
Fabio
WISH? IMPROVEMENT!
Jagadesh_2
Regular Advisor

Re: creating user with sudo access

Darrel,

The location of sudo is in
/opt/sudo
/opt/sudo/etc/sudoers/sudoers

How to add the user information in to that file. There are lots of fields in sudoers file.

Darrel Louis
Honored Contributor

Re: creating user with sudo access

Hi,

You can view a comprehensive list of /etc/sudoers file options by issuing the command man sudoers.
also some examples:
http://www.linuxhomenetworking.com/linux-hn/addusers.htm

It depends what you want the users to run with sudo.

Good luck

Darrel