Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

adduser error updating to latest version on Ubuntu 18.04 #106

Open
sGoico opened this issue Jan 19, 2022 · 1 comment
Open

adduser error updating to latest version on Ubuntu 18.04 #106

sGoico opened this issue Jan 19, 2022 · 1 comment

Comments

@sGoico
Copy link

sGoico commented Jan 19, 2022

When upgrading from 1.3.0 to 1.4.2 on an Ubuntu Server 18.04 I got the following errors:

`+ adduser --system --home /var/lib/octorpki --shell /usr/sbin/nologin --disable-login --group octorpki
Unknown option: disable-login
adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
[--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID]
[--disabled-password] [--disabled-login] [--add_extra_groups]
[--encrypt-home] USER
Add a normal user

adduser --system [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
[--gecos GECOS] [--group | --ingroup GROUP | --gid ID] [--disabled-password]
[--disabled-login] [--add_extra_groups] USER
Add a system user

adduser --group [--gid ID] GROUP
addgroup [--gid ID] GROUP
Add a user group

addgroup --system [--gid ID] GROUP
Add a system group

adduser USER GROUP
Add an existing user to an existing group

general options:
--quiet | -q don't give process information to stdout
--force-badname allow usernames which do not match the
NAME_REGEX[_SYSTEM] configuration variable
--extrausers uses extra users as the database
--help | -h usage message
--version | -v version number and copyright
--conf | -c FILE use FILE as configuration file
`
I created the user without the --disable-login option but that was not enough, the service wouldn't come up. After a little debugging I found that the unit file was still trying to run the service as root.

I also had to edit /etc/systemd/system/multi-user.target.wants/octorpki.service and change

User=root
to
User=octorpki

and at last, change the owner of /srv/cache and tals to the new user: octorpki

Let me know if you can reproduce any of this or if you need more info / tests to be performed.

@jtkristoff
Copy link

--disable-login should be --disabled-login

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants