Skip to content

Commit

Permalink
Fix fetching higest_uid
Browse files Browse the repository at this point in the history
  • Loading branch information
matbme committed Nov 26, 2023
1 parent 378b584 commit 10c3fca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __first_setup_reset_session
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi
echo '[daemon]' > /etc/gdm3/daemon.conf


export highest_uid=$(grep -E "^UID_MIN " /etc/login.defs | sed 's/UID_MIN //')
export highest_uid=$(grep -E "^UID_MIN" /etc/login.defs | awk '{$1=$1};1' | cut -d$' ' -f2)
export REAL_USER=""

# Gets the latest added user from /etc/passwd
Expand All @@ -29,5 +29,5 @@ while read entry; do
done < <(getent passwd)

if [ -e "/var/lib/AccountsService/users/$REAL_USER" ]; then
sed 's/Session=firstsetup/Session=gnome/g' -i "/var/lib/AccountsService/users/$REAL_USER"
echo '[User]\nSession=gnome' > /var/lib/AccountsService/users/$REAL_USER
fi

0 comments on commit 10c3fca

Please sign in to comment.