Continuing the discussion from [Question about passwd.pacnew]

As long as I can use zsh in Konsole as default, yes.

Yes, you can. You could also add /usr/bin/zsh :person_shrugging:

(Or use the command chsh to not mess up the file with an editor.)

For now, I’d rather not mess with anything related … :slight_smile:

Since I haven’t seen it mentioned yet, I just wanted to put in a plug for vipw if you choose to directly edit /etc/passwd.

sudo vipw

or for those who prefer nano

sudo EDITOR=nano vipw
1 Like

Posting an incorrect path is a simple way to invoke Cunningham’s law
and correct path is shown in @linux-aarhaus quote from 2023

I deleted the pacnew file using the tool:

DIFFPROG=meld pacdiff -s

Glad I came here first to make sure.
This pacnew and pacsave is very confusing at times anda very annoying after big updates…

cool - this will come back at you and bite you
eventually, but : sooner than later :wink:

What do you mean?

… just wait and see
the effect

But I did what was supposed to do.
Not merge and delete the pacnew file…

Everything appear to be fine at the moment.

I don’t think that that was what you where supposed to do.

… which is exactly the same as the outcome of merging the .pacnew
change /bin/bash to /usr/bin/bash

In any case:
you have got to know what you are doing.

My current /etc/passwd/ is in first line:

root:x:0:0::/root:/bin/bash

My /etc/shells file is:

# Pathnames of valid login shells.
# See shells(5) for details.

/bin/sh
/bin/bash
/bin/rbash
/usr/bin/sh
/usr/bin/bash
/usr/bin/rbash

/bin/zsh
/usr/bin/zsh
/usr/bin/git-shell

So what should I do?

Edit your current current /etc/passwd/ file in the first line to:

root:x:0:0::/root:/usr/bin/bash

And you’ll be fine !

You have to use sudo for that, so:
sudo nano /etc/passwd
or
sudo gedit /etc/passwd

It’s not, certainly not with meld anyway. Doing a merge replaces the whole file not just that one single line. Try it yourself - let’s pretend it changed back to /bin/bash;

$ echo 'root:x:0:0::/root:/bin/bash' > passwd.pacnew
$ sudo meld /etc/passwd passwd.pacnew

See the problem? The instructions @Zesko gave are the correct way to deal with this.

I just quickly checked out meld. You realize you can copy specific lines between two sides? Replacing is not merging.

meld can’t do the job in this case -
it will not let you replace that one line from the /etc/passwd.pacnew with the corresponding line in /etc/passwd - it will replace the whole file with that one line
… or I’m too dumb to operate the program

Yes, I see.
But I never said that he was incorrect - and I said “merge” - not “use meld to do it”.

OK, I did what you suggested.

Thanks

Thats not how its supposed to work.
And I’ve certainly used meld to augment passwd.

Are y’all using the ‘merge’ option?
I dont recommend that. The point is usually to use ‘view’ and manually do the ‘merging’.

In this interaction you can replace single lines or single terms, etc.

You can click on the arrows next to the line and selectively merge those strings, etc.

Even if that was somehow broken… you can use the interface to copy/paste or simply write out the first line (etc) if necessary.

… I really dont understand what the issue is.

2 Likes