FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 02-05-2012, 09:53 PM
Sébastien Leblanc
 
Default ntp settings

On Sun, Feb 5, 2012 at 17:40, Lukas Fleischer <archlinux@cryptocrack.de> wrote:
> visudo(8) does more than locking. It performs basic syntax checks after
> editing and tells you if (and where) any errors were found. It's the
> right tool for this job, so why bother with workarounds if using another
> editor is as simple as setting "$VISUAL" or "$EDITOR" (which you should
> do in your shell rc file anyway if you're not used to using vi(1))?

$EDITOR is already set in my .bashrc. I always tried to run it this way:
~ $ sudo visudo
but it never worked.

Even putting vars before invoking sudo does not work:
~*$ EDITOR=nano VISUAL=nano sudo visudo

I just found out that sudo clears (at least some) environment
variables and you have to put this variable after 'sudo'.

~ $ sudo EDITOR=nano visudo

I did not use visudo because I never bothered trying to make it work
with nano. Thanks to you, I now know how.

--
Sébastien Leblanc
 
Old 02-05-2012, 10:39 PM
Mountpeaks
 
Default ntp settings

I use scite to edit sudoers) and it doesn't seem like work well and lets me save a file with errors. Where vi shall not

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

"Sébastien Leblanc" <leblancsebas@gmail.com> wrote:

Myself being a non-vi user, I find that visudo is hard for people used
to nano. Besides, use of visudo is only critical for systems where no
one knows the root password (default Ubuntu for example). If you know
the root password and are on a generally single user system where
there is no risk that two people would be modifying the sudoers file
at the same time, don't be afraid to edit /etc/sudoers with nano. If
you manage to break sudo, you can always fix it with su -c "nano
/etc/sudoers" and by typing the root password.

--
Sébastien Leblanc
 
Old 02-05-2012, 11:59 PM
Ralf Mardorf
 
Default ntp settings

On Sun, 2012-02-05 at 17:53 -0500, Sébastien Leblanc wrote:
> ~ $ sudo EDITOR=nano visudo

Since you can't use sudo, as long as it isn't set, the best way is to go
with the Wiki:

"The command is run as root:

# EDITOR="nano" visudo" https://wiki.archlinux.org/index.php/Sudo

OT:
On Sun, 2012-02-05 at 17:21 -0500, Sébastien Leblanc wrote:
use of visudo is only critical for systems where no
> one knows the root password (default Ubuntu for example).

$ sudo passwd root



Cheers!
Ralf
 

Thread Tools




All times are GMT. The time now is 10:17 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org