cfrpki icon indicating copy to clipboard operation
cfrpki copied to clipboard

adduser error updating to latest version on Ubuntu 18.04

Open sGoico opened this issue 3 years ago • 1 comments

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.

sGoico avatar Jan 19 '22 20:01 sGoico

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

jtkristoff avatar Jan 25 '22 23:01 jtkristoff