Operating System - HP-UX
1834090 Members
1875 Online
110063 Solutions
New Discussion

Re: Help "how to" using SUDO

 
SOLVED
Go to solution
Helen French
Honored Contributor

Help "how to" using SUDO

Hello there:

Sudo has been installed on one of our servers, and I am not very familiar with it.

Can someone tell me how to set it up so a user can, for instance, execute chwon on one directory area, and NOT anything else? I need to grant access to some commands, but they can only be used in restricted areas or directories. Can you tell me how?

thank you again.


Life is a promise, fulfill it!
9 REPLIES 9
Patrick Wallek
Honored Contributor

Re: Help "how to" using SUDO

The file you will want to set up is called sudoers. It's location varies according to how sudo was compiled. In my shop it is generally in /etc. There should be a sample sudoers file that came with sudo. Also attached is the sudoers from my system.
Madhu Sudhan_1
Respected Contributor
Solution

Re: Help "how to" using SUDO

You need to install the sudo product.
The software for HP-UX and documentation is available from HP-UX porting centre.
Here is the link.

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.2b1/

Hope this helps.

......Madhu
Think Positive
Victor BERRIDGE
Honored Contributor

Re: Help "how to" using SUDO

Ok,
If you have sudo installed, you should see a /etc/sudoers file.
To configure you should use the cmd /usr/local/sbin/visudo which edit ~/sudoers..
But then all depends how it has been installed (from porting center or home compiled...) for the paths...
you should have also man pages look at sudoers, sudo visudo

Victor BERRIDGE
Honored Contributor

Re: Help "how to" using SUDO

Ok,
If you have sudo installed, you should see a /etc/sudoers file.
To configure you should use the cmd /usr/local/sbin/visudo which edit ~/sudoers..
But then all depends how it has been installed (from porting center or home compiled...) for the paths...
you should have also man pages look at sudoers, sudo visudo

Rick Garland
Honored Contributor

Re: Help "how to" using SUDO

A good source of info is http://www.courteasn.com

I believe that is spelled right.

The sudoers file is what you define to give the users the appropriate rights. You can have definitions in there that only allow some users to have the access to do the chown, or some other users to become root, etc...
Rick Garland
Honored Contributor

Re: Help "how to" using SUDO

Found a sudoers file I had used in the past.

This will prevent any user from invoking sudo to become root. Also, if in a trusted environment, sudo rlogin would put the user on the remote host as root.
Rick Garland
Honored Contributor

Re: Help "how to" using SUDO

Found a sudoers file I had used in the past.

This will prevent any user from invoking sudo to become root. Also, if in a trusted environment, sudo rlogin would put the user on the remote host as root.
Helen French
Honored Contributor

Re: Help "how to" using SUDO

Thank you for the help, and file, it helped.

I was able to get it to do what I think was needed, thank you again.
scott
Life is a promise, fulfill it!
Madhu Sudhan_1
Respected Contributor

Re: Help "how to" using SUDO

Hi Scott
The best way to express thanks is, assign points.

Regards,
......Madhu
Think Positive