*Slackware* Adding Users to Sudoers

Users can execute commands that are usually restricted to the root account using sudo program. The sudo configuration file is /etc/sudoers.

Open /etc/sudoers file with your favorite text editor as root, then remove comment character, #, in front of line “%wheel ALL=(ALL) ALL” and save.

# visudo

or

# nano /etc/sudoers


# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

Change above line as in below and save file.

# Uncomment to allow people in group wheel to run all commands %wheel ALL=(ALL) ALL

You need to add your user name to group wheel also.

# gpasswd -a user wheel

(Replace user with your user name)

Now you can execute some privileged commands using sudo as user without becoming root with su. For example it is possible to edit system file initUsers can execute commands that are usually restricted to the root account using sudo program. The sudo configuration file is /etc/sudoers.

Open /etc/sudoers file with your favorite text editor as root, then remove comment character, #, in front of line “%wheel ALL=(ALL) ALL” and save.

# visudo

or

# nano /etc/sudoers


# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

Change above line as in below and save file.

# Uncomment to allow people in group wheel to run all commands %wheel ALL=(ALL) ALL

You need to add your user name to group wheel also.

# gpasswd -a user wheel

(Replace user with your user name)

Now you can execute some privileged commands using sudo as user without becoming root with su. For example it is possible to edit system file inittab as user executing below command.

# sudo nano /etc/inittab

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s