How to use linux sudo command with visudo
This document (7001451) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 10 SP1
SUSE Linux Enterprise Desktop 10 SP2
SUSE Linux Enterprise Desktop 10 SP1
Situation
Resolution
Examples:
# Giving permissions to all users to mount and umount a cdrom device
%users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# Giving permissions to all users to turn off a server using shutdown command
%users localhost=/sbin/shutdown -h now
# Giving permissions to a specific user to turn off a server using shutdown command
username ALL=NOPASSWD:/sbin/shutdown -h now
Additional Information
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7001451
- Creation Date: 29-Sep-2008
- Modified Date:24-Feb-2021
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com