[arch-general] dbus update - /etc/passwd merge question

Rodrigo Rivas rodrigorivascosta at gmail.com
Fri Dec 14 03:37:40 EST 2012

On Fri, Dec 14, 2012 at 8:39 AM, Robbie Smith <zoqaeski at gmail.com> wrote:

> On 14/12/12 01:04, Neil Perry wrote:
>> On 13 December 2012 13:52, Robbie Smith <zoqaeski at gmail.com> wrote:
>>  vipw and vigr don't seem to do anything for me. It doesn't matter what
>>> changes I make, they both report that nothing was changed.
>>> # vipw
>>> (Makes changes in $EDITOR, writes and quits)
>>> vipw: no changes made
>>> vipw: /etc/passwd unchanged
>>> ?
>> I believe vipw and vigr will launch the file in using $EDITOR. Once you
>> have made changes it will sanity check in a sandbox style before saving to
>> the 'production' file.
>> Correct me if I'm wrong please.
>> Neil
>>  That's what it's supposed to do, according to all the documentation that
> I can find. But (for me at least), it opens a temporary file in $EDITOR
> named vi(pw|gr).XXXXXX, where XXXXXX is a random string. Upon editing the
> file and exiting the editor, instead of comparing and merging the changes
> to the production file, it does nothing. I've even made a copy of the
> production file myself (as an extra precaution), and deleted every line in
> the tmp file, and it still does nothing.

That may depend on the editor used, you didn't say what you use. I expect
that if the editor exit code is anything other than EXIT_SUCCESS (that is
0) the edition is cancelled. And some editors out there may not be mindful
about the exit status. I'd recommend to use for example "vi", that does it
right, and see what happens.

More information about the arch-general mailing list