adding a user to sudo

Chuck Hallenbeck chuckhallenbeck at gmail.com
Tue Oct 25 22:53:39 UTC 2016


Using visudo is much safer than echoing data to the sudoers file. The
visudo command lets you edit that file, and if you don't like it's
choice of editors, you can easily pick your own favorite, like this:

$ EDITOR=nano visudo

When you are finished editing, your edited file is checked for errors,
and if any are found the sudoers file will not be changed.

Imagine what would happen if you used only a single greater-than
instead of a double greater-than by mistake, when you echo something to
sudoers. Very risky, IMHO.

Chuck


On Tue, Oct 25, 2016 at 06:43:01PM -0400, Jude DaShiell wrote:
> I don't mess with visudo when an echo statement will do the job fine.
> 
> On Tue, 25 Oct 2016, Kristoffer Gustafsson wrote:
> 
> > Date: Tue, 25 Oct 2016 16:04:28
> > From: Kristoffer Gustafsson <kg.kristoffer at gmail.com>
> > Reply-To: Linux for blind general discussion <blinux-list at redhat.com>
> > To: blinux-list at redhat.com
> > Subject: adding a user to sudo
> > 
> > Hi.
> > I need to add a user to the sudoers file.
> > can you help me on how to do this?
> > I try to make a root command. for example sudo reboot.
> > then I get a message that my user doesn't exist in the sudoers file.
> > /Kristoffer
> > 
> > -- 
> > Kristoffer Gustafsson
> > Sal?ngsgatan 7a
> > tel:033-12 60 93
> > mobil: 0730-500934
> > 
> > _______________________________________________
> > Blinux-list mailing list
> > Blinux-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/blinux-list
> 
> -- 
> 
> _______________________________________________
> Blinux-list mailing list
> Blinux-list at redhat.com
> https://www.redhat.com/mailman/listinfo/blinux-list

-- 
Willoughby Ohio
   Temperature 50°F
   Conditions Mostly Cloudy
The Moon is Waning Crescent (20% of Full)




More information about the Blinux-list mailing list