HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sudoers and using #uid
Operating System - HP-UX
1827295
Members
3865
Online
109717
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
07-13-2002 09:40 AM
07-13-2002 09:40 AM
sudoers and using #uid
I have tried to get sudo to use uids instead of usernames.
I cant use the login names as they in uppercase.
However when I try to use the syntax
User_Alias MYTEST = #5000
it will not work.
However User_Alias MYTEST = abcd
does work.
It gives me syntax errors when I try #5000
Any Suggestions?
I cant use the login names as they in uppercase.
However when I try to use the syntax
User_Alias MYTEST = #5000
it will not work.
However User_Alias MYTEST = abcd
does work.
It gives me syntax errors when I try #5000
Any Suggestions?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2002 10:53 AM
07-13-2002 10:53 AM
Re: sudoers and using #uid
Hi,
According to the sudoers man page at http://www.courtesan.com/sudo/man/sudoers.html#aliases,
"A User_List is made up of one or more usernames, uids (prefixed with '#'), System groups (prefixed with '%'), netgroups (prefixed with '+') and other aliases."
However, also on the same man page,
User_List
User ::= '!'* username |
'!'* '%'group |
'!'* '+'netgroup |
'!'* User_Alias
'#'uid is not found in the expression. This is contradictory to the definition of a User_List above.
Following that, it is stated for the definition of the Runas_Alias that
"A Runas_List is similar to a User_List except that it can also contain uids (prefixed with '#') and instead of User_Aliases it can contain Runas_Aliases."
This would imply that the User_List in fact does not support '#'uid. Thus, I believe there is a typo on the man page with regards to the User_List definition, but that the User_List expression given is correct.
As such, try using Runas_Alias instead i.e.
Run_Alias MYTEST = #5000
Hope this helps. Regards.
Steven Sim Kok Leong
According to the sudoers man page at http://www.courtesan.com/sudo/man/sudoers.html#aliases,
"A User_List is made up of one or more usernames, uids (prefixed with '#'), System groups (prefixed with '%'), netgroups (prefixed with '+') and other aliases."
However, also on the same man page,
User_List
User ::= '!'* username |
'!'* '%'group |
'!'* '+'netgroup |
'!'* User_Alias
'#'uid is not found in the expression. This is contradictory to the definition of a User_List above.
Following that, it is stated for the definition of the Runas_Alias that
"A Runas_List is similar to a User_List except that it can also contain uids (prefixed with '#') and instead of User_Aliases it can contain Runas_Aliases."
This would imply that the User_List in fact does not support '#'uid. Thus, I believe there is a typo on the man page with regards to the User_List definition, but that the User_List expression given is correct.
As such, try using Runas_Alias instead i.e.
Run_Alias MYTEST = #5000
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2002 02:44 PM
07-14-2002 02:44 PM
Re: sudoers and using #uid
The problem is that the user that runs the command has a username that is all caps which is causing the problem.
I dont have a way to specify the user invoking the command.
I dont have a way to specify the user invoking the command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2002 03:37 PM
07-14-2002 03:37 PM
Re: sudoers and using #uid
Hi,
Have you considered using Restricted SAM instead of sudo to provide escalated privileges but secure access? It also allows you to a menu-like system for ease of use.
#!/usr/sbin/sam
Hope this helps. Regards.
Steven Sim Kok Leong
Have you considered using Restricted SAM instead of sudo to provide escalated privileges but secure access? It also allows you to a menu-like system for ease of use.
#!/usr/sbin/sam
Hope this helps. Regards.
Steven Sim Kok Leong
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP