When I upgraded from Fedora 35 to 36 and again when upgrading to 37, upon completion of the upgrade, I was led through an account setup dialogue (no skipping it) that created a new account even though I already had one. And the login screen shows the new account, but not the old one. Any way we can get it to show the old account I’m perfectly happy with instead?
How did you do the upgrade ? Which DE are you using?
| ilikelinux Q&A Regular
December 29 |
- | - |
John Ries:
When I upgraded from Fedora 35 to 36 and again when upgrading to 37,
How did you do the upgrade ? Which DE are you using?
I used dnf system-upgrade.
Visit Topic or reply to this email to respond.
To unsubscribe from these emails, click here.
Should have asked earlier, but…
What’s a DE?
Desktop Environment = DE
If you run hostnamectl
you can see it on the Operating System line on the end in parentheses.
Or run cat /etc/redhat-release
If it is Workstation you are using the “Gnome Desktop Environment”
Can you also look at:
cat /etc/passwd | grep -e "${USER}" -e "youroldusername"
Thanks
OK.
$ hostnamectl
Static hostname: brutus-riesenhaus-local
Pretty hostname: brutus.riesenhaus.local
Icon name: computer-desktop
Chassis: desktop
Machine ID: 447b99b882b34df3852357e8dc3c3290
Boot ID: 13bd7fb191924427be7e7c02edbd5bfb
Operating System: Fedora Linux 37 (Workstation Edition)
CPE OS Name: cpe:/o:fedoraproject:fedora:37
Kernel: Linux 6.0.15-300.fc37.x86_64
Architecture: x86-64
Hardware Vendor: Dell Inc.
Hardware Model: XPS 8900
Firmware Version: 2.1.3
However, I run GNOME as little as I can get away with. I run MATE when directly at the console or XFCE through RDP (I’m currently doing the latter).
$ cat /etc/passwd | grep -e “${USER}” -e johnries
jries:x:1000:1000:John L. Ries,VMware Bellevue,xxx-xxx-xxxx,xxx-xxx-xxxx:/home/jries:/bin/ksh
johnries:x:1002:1003:John Ries:/home/johnries:/bin/bash
The first is my “real” account (the one I’ve been using on this box since 2017) and the other is the one that Fedora 37 insisted on creating.
I’d start with, GDM does not list my user anymore / gnome initial setup runs instead
Starting with the easy changing of the shell to bash followed by the rest.
Thanks
You mean this steps (last request)?:
https://discussion.fedoraproject.org/t/gdm-does-not-list-my-user-anymore-gnome-initial-setup-runs-instead/69562/9
Hopefully I’ll get to keep my ksh, but I’ve seen stupider things. I would take zsh as a reasonable compromise.
That didn’t do any good, so I quickly changed my shell back to /bin/ksh. The contents of /etc/shells are as follows:
/bin/sh
/bin/bash
/usr/bin/sh
/usr/bin/bash
/bin/ksh
/usr/bin/fish
/bin/fish
/bin/dash
/usr/bin/ksh
I would expect that with the workstation edition you manually changed your shell after the initial setup. The default shell is bash.
Each time an install or upgrade is made the system requires a default user, and it seems possible that since your users shell is not the default it creates a new user.
Within /etc/default/adduser I see this
$ cat /etc/default/useradd
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes
The users home directory and account are set up with the content of that file and the content of /etc/skel. This seems to mean that if the upgrade does not like the users shell it creates a new user. This may be a bug in dnf system-upgrade, but seems likely the source of your issues.
You said you use ksh. In /etc I see bashrc, csh.cshrc, and zshrc, but nothing with ksh.
/etc/profile also sources /etc/bashrc explicitly for interactive mode so that also would potentially mess with a default ksh shell.
I would suggest that you modify /etc/skel and /etc/default/adduser to support your preferred shell then you should be able to, on the login screen, select to log in as another user and log in as your preferred user.
This is the default content of /etc/skel and what is copied into a new users home directory.
$ ls -al /etc/skel
total 44
drwxr-xr-x. 3 root root 4096 Aug 9 08:27 .
drwxr-xr-x. 239 root root 16384 Dec 31 02:18 ..
-rw-r--r--. 1 root root 18 Nov 18 08:24 .bash_logout
-rw-r--r--. 1 root root 141 Nov 18 08:24 .bash_profile
-rw-r--r--. 1 root root 492 Nov 18 08:24 .bashrc
drwxr-xr-x. 4 root root 4096 Jul 21 18:56 .mozilla
-rw-r--r--. 1 root root 299 Jul 23 09:08 .zprofile
-rw-r--r--. 1 root root 658 Jul 23 09:08 .zshrc
The system upgrade process seems confused by the shell, but otherwise I doubt the actual user account has been altered.
The Korn Shell’s only system-wide startup script is /etc/profile, which runs only on login. A user, however, can designate one’s own session-level startup script by defining the environment variable ENV in one’s local .profile (I normally use $HOME/.kshrc). I typically use $HOME/.profile to define environment variables and shell settings; and $HOME/.kshrc to define functions and aliases.
It would make sense to take a look at /etc/skel to see if there is anything amiss. I should note that using ksh as my default shell under any Linux distro has never caused problems before.
Is there a config file somewhere that specifies a default account?
Curiously enough, I see /etc/skel/.kshrc on my machine (I’m sure I didn’t put it there). It reads as follows:
$ cat /etc/skel/.kshrc
.kshrc
Source global definitions
if [ -f /etc/kshrc ]; then
. /etc/kshrc
fi
use emacs editing mode by default
set -o emacs
User specific aliases and functions
I stand corrected on the system wide .kshrc (didn’t used to exist). It is /etc/profile and is present on my machine (again, I didn’t create it).
BTW
Anything you put into /etc/skel will be copied into the new users home directory when a new user is created. That is part of what the /usr/sbin/useradd command does. The SHELL shown in /etc/default/adduser is what is set for that user when created.
And actually you did create both the /etc/kshrc and the /etc/skel/.kshrc files. Installing the ksh package to have the korn shell available creates those files among others. It also modifies the /etc/profile to use them.
can you check permissions and such on:
sudo ls -lRZ /var/lib/[A-a]ccounts[S-s]ervice
mine looks like:
/var/lib/AccountsService:
total 0
drwxrwxr-x. 1 root root system_u:object_r:accountsd_var_lib_t:s0 14 Dec 22 11:19 icons
drwx------. 1 root root system_u:object_r:accountsd_var_lib_t:s0 14 Dec 24 11:42 users
/var/lib/AccountsService/icons:
total 180
-rw-r--r--. 1 root root system_u:object_r:accountsd_var_lib_t:s0 182418 Dec 22 11:19 grumpey
/var/lib/AccountsService/users:
total 4
-rw-------. 1 root root system_u:object_r:accountsd_var_lib_t:s0 85 Dec 24 11:42 grumpey
and also:
sudo find /var/lib/[A-a]ccounts[S-s]ervice/users -type f | xargs -t sudo cat
Make sure your old account does not say
SystemAccount=true
Thanks
[grumpey] Joe https://discussion.fedoraproject.org/u/grumpey grumpey Q&A
Regular
January 1can you check permissions and such on:
sudo ls -lRZ /var/lib/[A-a]ccounts[S-s]ervice|
mine looks like:
/var/lib/AccountsService: total 0 drwxrwxr-x. 1 root root
system_u:object_r:accountsd_var_lib_t:s0 14 Dec 22 11:19 icons
drwx------. 1 root root system_u:object_r:accountsd_var_lib_t:s0 14
Dec 24 11:42 users /var/lib/AccountsService/icons: total 180
-rw-r–r–. 1 root root system_u:object_r:accountsd_var_lib_t:s0
182418 Dec 22 11:19 grumpey /var/lib/AccountsService/users: total 4
-rw-------. 1 root root system_u:object_r:accountsd_var_lib_t:s0 85
Dec 24 11:42 grumpey |and also:
sudo find /var/lib/[A-a]ccounts[S-s]ervice/users -type f | xargs -t
sudo cat|Make sure your old account does not say
SystemAccount=true|
Thanks
Visit Topic
https://discussion.fedoraproject.org/t/the-upgrade-mechanism-forces-creation-of-unwanted-new-account/72269/17
or reply to this email to respond.To unsubscribe from these emails, click here
https://discussion.fedoraproject.org/email/unsubscribe/a6574d03d30d872d380bed9b4e86bc043162703bff0e159714a56b9db469f0de.
The first appears to be in order:
$ sudo ls -lRZ /var/lib/AccountsService|less /var/lib/AccountsService:
total 8 drwxrwxr-x. 2 root root system_u:object_r:accountsd_var_lib_t:s0
4096 Dec 27 18:21 icons drwx------. 2 root root
system_u:object_r:accountsd_var_lib_t:s0 4096 Dec 29 14:05 users
/var/lib/AccountsService/icons: total 40 -rw-r–r–. 1 root root
system_u:object_r:accountsd_var_lib_t:s0 27362 Dec 27 18:21 johnries
-rw-r–r–. 1 root root system_u:object_r:accountsd_var_lib_t:s0 9697
Nov 22 21:09 jries /var/lib/AccountsService/users: total 20 -rw-------.
1 root root unconfined_u:object_r:unlabeled_t:s0 70 Aug 2 2021 gdm
-rw-------. 1 root root unconfined_u:object_r:unlabeled_t:s0 82 Jan 17
2020 gnome-initial-setup -rw-------. 1 root root
system_u:object_r:accountsd_var_lib_t:s0 125 Dec 29 14:05 johnries
-rw-------. 1 root root system_u:object_r:accountsd_var_lib_t:s0 207 Dec
13 22:01 jries -rw-------. 1 root root
unconfined_u:object_r:unlabeled_t:s0 63 Jun 27 2021 root |
Second appears to expose the problem.|
$ sudo find /var/lib/AccountsService/users -type f | xargs -t sudo cat
[sudo] password for jries: sudo cat /var/lib/AccountsService/users/jries
/var/lib/AccountsService/users/johnries
/var/lib/AccountsService/users/gnome-initial-setup
/var/lib/AccountsService/users/root /var/lib/AccountsService/users/gdm
[org.freedesktop.DisplayManager.AccountsService]
BackgroundFile=‘/usr/share/backgrounds/default.png’ [User] Language=
Session=mate XSession=mate Icon=/var/lib/AccountsService/icons/jries
SystemAccount=true [User] Language=en_US.UTF-8 Session=plasmax11
PasswordHint= Icon=/var/lib/AccountsService/icons/johnries
SystemAccount=false [User] Language= XSession=
Icon=/run/gnome-initial-setup/.face SystemAccount=true [User] Language=
XSession= Icon=/root/.face SystemAccount=true [User] Language= XSession=
Icon=/var/lib/gdm/.face SystemAccount=true |
That was it. Changing SystemAccount to false fixed the gdm issue and I have good reason to believe it will fix the account creation issue as well. Thanks to all.