Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • I image-builder
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Librem5
  • image-builder
  • Issues
  • #53

Closed
Open
Created Jan 20, 2020 by Sebastian Krzyszkowiak@sebastian.krzyszkowiakMaintainer

Expired root account causes troubles with some postinsts

The way we disable the root account causes troubles with configuration of some packages, like gpsd:

Setting up gpsd (3.17-7) ...
Creating/updating gpsd user account...
Your account has expired; please contact your system administrator
chfn: PAM: Authentication failure
adduser: `/bin/chfn -f GPSD system user gpsd' returned error code 1. Exiting.
Non-system user gpsd found. I will not overwrite a non-system
user.  Remove the user and reinstall gpsd.
dpkg: error processing package gpsd (--configure):
 installed gpsd package post-installation script subprocess returned error exit status 1

gpsd's postinst script looks like this:

#!/bin/bash
# postinst script for gpsd

set -e

if [ "$1" = "configure" ] ; then

    echo "Creating/updating gpsd user account..."
    adduser --system --ingroup dialout --home /run/gpsd \
            --gecos "GPSD system user" --shell /bin/false \
            --quiet --disabled-password gpsd || {
        # adduser failed. Why?
        if getent passwd gpsd >/dev/null ; then
            echo "Non-system user gpsd found. I will not overwrite a non-system" >&2
            echo "user.  Remove the user and reinstall gpsd." >&2
            exit 1
        fi
        # unknown adduser error, simply exit
        exit 1
    }


fi

#DEBHELPER#

exit 0

It also causes some commonly used patterns, like sudo su, to not work. AFAIK other systems, like Ubuntu, tend to disable root account just by disabling its password without expiring the account.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking