How to enable sudo on Debian 7.0 with the visudo command.

The visudo command is used on Linux systems to edit the /etc/sudoers file; this ensures that there are no errors before the changes are written to the actual file. As you can see below; I have added my user homer to the sudoers file. This allows me to run commands with sudo; but will still ask for my users password before running the command.

# This file MUST be edited with the 'visudo' command as root.
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
# See the man page for details on how to write a sudoers file.
Defaults	env_reset
Defaults	mail_badpass
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification

# Allow members of group sudo to execute any command

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

This is how you enable the sudo command for the normal user on Debian GNU/Linux 7.0. This is not very difficult at all; just make sure you NEVER edit the /etc/sudoers file with any other editor. Use the visudo command.

Post a Comment

Your email is kept private. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>