- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sudo ALIASES not working
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
04-15-2003 06:10 PM
04-15-2003 06:10 PM
sudo ALIASES not working
USERS someone
LOCALHOST USERS, MYSCRIPT
okay that is a lame sudoers file, but the point I am trying to make is.
in the sudoers file.
you creat an ALIAS for users to use.
but when users try to use the alias it fails.
sudo MYSCRIPT
fails :-o(
but
sudo /usr/bin/myscript
works :O(
so can someone tell me what are the users suppposed to use.
the ALIAS or the command.
and is there a fix for it, I ahve the latest sudo 1.6.7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 06:21 PM
04-15-2003 06:21 PM
Re: sudo ALIASES not working
echo $PATH
/usr/bin
$ sudo myscript
(should work)
echo $PATH
/usr/sbin
$ sudo myscript
fails ... ?
Try it out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 06:36 PM
04-15-2003 06:36 PM
Re: sudo ALIASES not working
...
Cmnd_Alias KILL = /usr/bin/kill
Cmnd_Alias PRINTING = /usr/bin/lpsched, /usr/bin/lpadmin
....
Second of all the Cmnd_Alias name (the one in uppercase letters) is not meant to be executed in the sudo command line. It's meant to be used (if needed) in other definition rules within sudoers file. In you case if you got ..
Cmnd_Alias MYSCRIPT = /usr/bin/myscript
then the user should be able to run myscript without having to provide the full path.
$ sudo myscript
For details of the syntax applicable to sudoers file take a look here..
http://www.courtesan.com/sudo/man/sudoers.html#aliases
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 03:54 AM
04-16-2003 03:54 AM
Re: sudo ALIASES not working
sudo MYSCRIPT, instead of sudo myscript
which I have to setup a path for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 06:25 AM
04-16-2003 06:25 AM
Re: sudo ALIASES not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 06:30 AM
04-16-2003 06:30 AM
Re: sudo ALIASES not working
Using the sudo Cmd_Alias as part of the sudo command doesn't make sense because multiple commands can be assigned to a sudo Cmd_Alias.
For example, assume you want a Cmd_Alias to be set for identifying both the vi and sed commands. Executing the sudo alias wouldn't know which command you wanted to execute.
jack...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 06:35 AM
04-16-2003 06:35 AM
Re: sudo ALIASES not working
Cmnd_Alias PRINTING = /usr/bin/lpsched, /usr/bin/lpadmin
we got multiple commands assigned to PRINTING.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 07:40 AM
04-16-2003 07:40 AM
Re: sudo ALIASES not working
ie. I want everyone that uses su to use "sudo su"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 07:46 AM
04-16-2003 07:46 AM