Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 07:35 PM
06-03-2003 07:35 PM
SUDO
I have install sudo utility in hpux11.00,How
do I give privilege normal user to do super
user task.
Best Regards
Ashan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 07:45 PM
06-03-2003 07:45 PM
Re: SUDO
You could start here:
http://www.courtesan.com/sudo/index.html
and look at the documentation links on this page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 07:47 PM
06-03-2003 07:47 PM
Re: SUDO
example1 :
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
# This setting may be a security risk. Osamu
# Host alias specification - not using
Host_Alias LAN = 168.192.0.0/255.255.0.0
# User alias specification - not using, but using group
User_Alias STAFF = admin
User_Alias src=admin, debian, osamu
# Cmnd alias specification
Cmnd_Alias FILEUTILS = /bin/chown, /bin/chmod, /bin/chgrp, /bin/mount, /bin/umount, /usr/bin/cdrecord
Cmnd_Alias DEBUTILS = /usr/bin/dpkg, /usr/bin/apt-get
Cmnd_Alias EDITORS = /bin/vi, /bin/emacs
# User privilege specification
root ALL = (ALL) ALL
%staff ALL = (ALL) NOPASSWD: ALL
%src ALL = (ALL) NOPASSWD: FILEUTILS, DEBUTILS, EDITORS
Defaults:%staff !lecture
Defaults:%src !lecture
Defaults:%staff !authenticate
#Defaults:admin !authenticate
Further examples can be obtained here:
http://www.courtesan.com/sudo/man/sudoers.html
Regards
Michael
"When I have trouble spelling, it's called fat finger syndrome"
http://www.courtesan.com/sudo/man/sudoers.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 10:30 PM
06-03-2003 10:30 PM
Re: SUDO
Below is sudo configuration file and bb is my
normal user,I have login as bb and try to run
sudo bb
$ sudo - bb
Sorry, sudo must be setuid root.
$
I don't know my login is correct, please advice me.
Regards
Ashan
-------------------------------------------
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
Hosti_Alias LAN = 168.232.1.250/255.255.255.0
# User alias specification
User_Alias USERS = bb
# Cmnd alias specification
Cmnd_Alias FILEUTILS = /usr/bin/ll, /usr/bin/moun, /usr/bin/umount, /usr/bin/shutdown -ry 0
# Defaults specification
Defaults:%users !|ecture
Defaults:%users !|authenticate
# User privilege specification
root ALL=(ALL) ALL
%users ALL=(ALL) NOPASSWD: FILEUTILS
# Uncomment to allow people in group wheel to run all commands
#%wheel ALL=(ALL) ALL
# Same thing without a password
#%wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 10:57 PM
06-03-2003 10:57 PM
Re: SUDO
$ id
bb
$ sudo umount /cdrom
Also it seems that you have incorrect permissions for the sudo binary.
They should be like this:
---s--x--x
To fix it as root:
# chmod 4111 sudo
Try again
Regards
Michael
"When I have trouble spelling, it's called fat finger syndrome"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2003 11:17 PM
06-03-2003 11:17 PM
Re: SUDO
Still I am get this mesg, something messing in the configuration..?
Regards
Ashan
ashan@uxadmin $Jun 4 15:12:52 uxadmin sudo: bb : parse error in /opt/sudo/etc/sudoers/sudoers near
line 9 ; TTY=pts/tb ; PWD=/ ; USER=root ; COMMAND=umount
$ id
uid=103(bb) gid=20(users)
$ sudo umount
>>> sudoers file: syntax error, line 9 <<<
>>> sudoers file: syntax error, line 19 <<<
>>> sudoers file: syntax error, line 20 <<<
>>> sudoers file: syntax error, line 21 <<<
sudo: parse error in /opt/sudo/etc/sudoers/sudoers near line 9
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2003 12:23 AM
06-04-2003 12:23 AM
Re: SUDO
U have to edit the sudoers file using /opt/sudo/sbin/visudo. when u run the above command it will edit sudoers and give the user "bb" in user previlages as
bb ALL=ALL or
bb ALL=/usr/sbin/mount,/usr/sbin/umount,/usr/bin/su ( and many more )
In user aliases u have to specify the
Save the file.
for /opt/sudo/sbin/sudo file set "set uid bit" like
chmod u+s /opt/sudo/sbin/sudo
To execute the commands as sudo user u have to type the command as /opt/sudo/sbin/sudo
ex. /opt/sudo/sbin/sudo /usr/bin/su
For the first time when u execute the command it will asks for the password confirmation of the user( i.e. bb) after submition, the command will be executed. The default duration for the session is 5 min. This can be changed or u can set without password while editing the visudoers file
for more info see the man page
Good Luck.
Kiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2003 05:01 AM
06-04-2003 05:01 AM
Re: SUDO
Hosti_Alias LAN = 168.232.1.250/255.255.255.0
should be
Host_Alias LAN = 168.232.1.250/255.255.255.0
Cmnd_Alias FILEUTILS = /usr/bin/ll, /usr/bin/moun, /usr/bin/umount, /usr/bin/shutdown -ry 0
/usr/bin/moun should be /usr/bin/mount
Be sure to edit the sudoers file with visudo. This will perform syntax checks on your file and help you correct problems with it before saving it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2003 05:01 AM
06-04-2003 05:01 AM
Re: SUDO
Hosti_Alias LAN = 168.232.1.250/255.255.255.0
should be
Host_Alias LAN = 168.232.1.250/255.255.255.0
Cmnd_Alias FILEUTILS = /usr/bin/ll, /usr/bin/moun, /usr/bin/umount, /usr/bin/shutdown -ry 0
/usr/bin/moun should be /usr/bin/mount
Be sure to edit the sudoers file with visudo. This will perform syntax checks on your file and help you correct problems with it before saving it.