Install Sudo:
Configure Sudo
#
# 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
# User alias specification
# Cmnd alias specification
# Defaults specification
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Allow people in group sysadmin to run all commands
%sysadmin ALL=(ALL) ALL
#%ateam ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
Run Sudo
Password:
hello dmspar01
root@dmspar01[/]
- Source file in /p690Basel/sudo-1.6.6.0/ sudo-1.6.6.0.bff
- Install sudo-1.6.6.0.bff :
Configure Sudo
- Create group “sysadmin” on server.
- Assign the user id to group “sysadmin” as primary group.
- Run this command by root:
- Edit it and add the group “sysadmin”
#
# 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
# User alias specification
# Cmnd alias specification
# Defaults specification
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Allow people in group sysadmin to run all commands
%sysadmin ALL=(ALL) ALL
#%ateam ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
Run Sudo
- Login by your user id:
- Run this command:
- Input your password like that:
Password:
hello dmspar01
root@dmspar01[/]
- You can use your id and password to do something like as you are root.