[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I'am root user, but 'emacs /etc/sudoers' still report Buffer is read
From: |
Emanuel Berg |
Subject: |
Re: I'am root user, but 'emacs /etc/sudoers' still report Buffer is read-only: #<buffer sudoers> in modeline |
Date: |
Wed, 29 Apr 2015 22:08:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Bob Proulx <bob@proulx.com> writes:
> I highly recommend using the visudo command for
> editing the /etc/sudoers file. It will make
> a writable copy and therefore you won't need to
> toggle the read-only status.
Indeed, however because you must run Emacs with
superuser rights in order to edit /etc/sudoers (i.e.
you won't get your everyday user's Emacs configs) it
can be preferable to use something altogether
different and above all more simple, like nano, which
seems to be the default - in spite of the name (or
perhaps "vi"sudo refers to "visual" and not vi(m)).
If you are dead set on using Emacs, try
sudo EDITOR='/usr/bin/emacs -u USER' visudo
However then be aware that all tildes (~) in USER's
configs won't be /home/USER, so those have to be
changed to explicit paths unless there is yet another
way around it.
Perhaps the `user-login-name' or
`user-real-login-name' could be experimented with...
--
underground experts united
http://user.it.uu.se/~embe8573
- I'am root user, but 'emacs /etc/sudoers' still report Buffer is read-only: #<buffer sudoers> in modeline, Show Dont, 2015/04/29
- Re: I'am root user, but 'emacs /etc/sudoers' still report Buffer is read-only: #<buffer sudoers> in modeline, tomas, 2015/04/29
- Re: I'am root user, but 'emacs /etc/sudoers' still report Buffer is read-only: #<buffer sudoers> in modeline, Bob Proulx, 2015/04/29
- Re: I'am root user, but 'emacs /etc/sudoers' still report Buffer is read-only: #<buffer sudoers> in modeline, Alex Kost, 2015/04/29
- Re: I'am root user, but 'emacs /etc/sudoers' still report Buffer is read-only: #<buffer sudoers> in modeline, tomas, 2015/04/29
- Message not available