/etc/default/useradd.pacnew - change in SHELL variable

Still in the process of taking care of .pacnew files and came across /etc/default/useradd.pacnew from January 16th of this year (according to the output of ls -la /etc/default/useradd.pacnew).

For the most part it’s just new text comments in the .pacnew file. The one thing I couldn’t wrap my head around is the change in the shell variable.

My original file looks like this:

# useradd defaults file for ArchLinux
# original changes by TomK
…
SHELL=/bin/zsh
…

while the .pacnew changes this one to bash:

# Default values for useradd(8)
#
# The SHELL variable specifies the default login shell on your
# system.
SHELL=/usr/bin/bash
…

I’ve searched the forum for Manjaro, ArchLinux and even the Manjaro Gitlab for any details about the change but couldn’t find any information. Why the change in the shell variable? Should I keep the original content or change this one to bash?


The only other thing that’s left is /etc/pam.d/polkit-1.pacsave. If I call pacdiff -s, it drops a warning and wants to delete the file. Should I do that or take any kind of precautions?

==> pacsave file found for /etc/pam.d/polkit-1
==> WARNING: /etc/pam.d/polkit-1 does not exist
rm: remove regular file '/etc/pam.d/polkit-1.pacsave'?

This file is only for what the default login shell will be for new users.
So it cant really hurt your current user.

But the previous file looks a bit off, including that it should be /usr/bin.
Arguably the default login shell should be bash, but you can also put /usr/bin/zsh there if you like.

( note: of course you should make sure to have the relevant shell installed )

The precaution is the pacsave.
You arent ‘supposed’ to have that file.
And the pacsave extension means it wont be active.
So if you dont have a known use for it, and things work normally, then you should be fine to remove it.

1 Like

I agree. Compared to the .pacnew file it looks kind of random/a quick fix. My original file (which I haven’t touched ever) looks like this:

# useradd defaults file for ArchLinux
# original changes by TomK
GROUP=users
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/zsh
SKEL=/etc/skel
CREATE_MAIL_SPOOL=no

That’s all. No further comments or anything. Just these 7 variable definitions.

Ah, okay. I’ll change that to bash then. Thanks :slight_smile:

Everything seems to work fine. I’ll remove it then. Thanks. :+1:

Just for some reassurance:
Save the missing comments, order, and the SHELL line, this is otherwise identical to mine.

# Default values for useradd(8)
#
# The SHELL variable specifies the default login shell on your
# system.
SHELL=/usr/bin/bash

# The default group for users
GROUP=users

# The default home directory.
HOME=/home

# The number of days after a password expires until the account is permanently
# disabled
INACTIVE=-1

# The default expire date
EXPIRE=

# The SKEL variable specifies the directory containing "skeletal" user files;
# in other words, files such as a sample .profile that will be copied to the
# new user's home directory when it is created.
SKEL=/etc/skel

# Defines whether the mail spool should be created while
# creating the account
CREATE_MAIL_SPOOL=no

Cheers :slight_smile:

And with all the comments it comes pretty close to the new .pacnew file. :slight_smile:

I wonder where this ‘TomK’ file comes from or why Manjaro installed this one back in February last year. I can find it when searching for “# original changes by TomK” in Google. At some point this had to be the standard.

Wasn’t able to find any commit or something in the Manjaro Gitlab that might explain the change.

I might guess its @Tomek

And rather old too. ex:

Found something similar but all these are over 5 years old. That’s why I thought this couldn’t have something to do with the recent .pacnew from back in January.

There wasn’t. The default shell has always been BASH, however the default in our GNOME and KDE editions is ZSH. It’s up to you which you want to use.

The upstream defaults are now in /usr/lib/pam.d/polkit-1. If you have custom changes you want to keep, then restore the pacsave file to override it. Otherwise remove the pacsave.

That may be true for gnome.
But for KDE it is (and should be) bash for the login shell.
The KDE edition makes use of konsole profiles to apply zsh to the terminal emulator.
(interactive non-login shell)

Ah yes, that’s true.

However, the OP’s profile says he’s using GNOME and he already had ZSH set as default. :wink:

Every once in a while I go for a ‘gnome’ emoji … and realize again there is not one. :face_exhaling:
:mushroom: :mage:
Oh but there is one for :fairy:. I call shenanigans.

Nope, I have nothing to do with it :wink:

Correct. I switched over from Ubuntu LTS where I used bash over the years but I don’t mind the look and feel of zsh. It’s not that big of a difference until now.

Thanks for the tip. :slight_smile: I didn’t make any custom changes to the original file (at least none I would remember) but I’ll compare the two files just in case before removing the .pacsave.

EDIT @ 00:28
I’ve compared the two files. The new file at /usr/lib/pam.d/polkit-1 seems to have gotten rid of the first four lines.

auth required pam_env.so
auth sufficient pam_fprintd.so
auth sufficient pam_unix.so try_first_pass likeauth nullok
auth required pam_deny.so

The rest of file is the same.

There is now. :grin:

:gnome:

…and so you don’t feel left out…

:kde:

…and while we’re at it…

:xfce:

2 Likes

Any more thoughts on the 4 lines above which are missing from /usr/lib/pam.d/polkit-1 compared to /etc/pam.d/polkit-1.pacsave

auth required pam_env.so
auth sufficient pam_fprintd.so
auth sufficient pam_unix.so try_first_pass likeauth nullok
auth required pam_deny.so

I haven’t added these to the original file back then. I guess they are upstream defaults.

Everything seems to work fine, so I assume the lines are not needed anymore.

Turns out that pam_fprintd is a module for fingerprints. Since my desktop PC doesn’t have a fingerprinting sensor, I think it’s okay to ditch the line. pam_env, pam_unix, pam_deny get called via system-auth in the unchanged lines which leads me to believe I can safely remove the .pacsave.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.