- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: visudo
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
05-16-2005 06:22 AM
05-16-2005 06:22 AM
#visudo
.
.
.
Cmnd_Alias restart=/sbin/shutdown -r 0 #***line 26
username ALL=restart #*** line 27
>>> sudoers file: syntax error, line 26 <<<
>>> sudoers file: syntax error, line 27 <<<
What now?
"Cmnd_Alias" is the cause of this error, bcause when i remove this line, all other things work fine.
plz let me know the correct synatx of Cmnd_Alias
Regards
Maaz
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 07:37 AM
05-16-2005 07:37 AM
Re: visudo
Comment out lines 26 & 27, are you still getting errors?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 05:11 PM
05-16-2005 05:11 PM
Re: visudo
i have attached the /etc/sudoers file. plz check it.
Thanks
Maaz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 05:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 06:13 PM
05-16-2005 06:13 PM
Re: visudo
Cmnd_Alias variable should be uppercase letter, so the correct syntax is Cmnd_Alias RESTART=/sbin/shutdown -r 0
here is the snip from man page of sudoers
Each alias definition is of the form
Alias_Type NAME = item1, item2, ...
where Alias_Type is one of User_Alias, Runas_Alias, Host_Alias, or Cmnd_Alias. A NAME is a string of uppercase letters, numbers, and underscore characters (â _â ). A NAME must start with an uppercase letter. It is possible to put several alias definitions of the same type on a single line, joined by a colon (â :â ). E.g.,
Alias_Type NAME = item1, item2, item3 : NAME = item4, item5
for more information check man sudoers
R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2005 06:06 AM
05-17-2005 06:06 AM
Re: visudo
Thanks to All
Regards
Maaz