[opensuse-factory] Issues with Factory repo for pwdutils
Hi, I have cross posted this message in both Factory and Packaging, as that I am not sure where exactly it belongs. Since this weekend I am seeing issues when a package is build against Factory snapshot and the %pre/%post scripts are trying to create a group/user. (The example is from lightdm) The script executed is: %pre /usr/sbin/groupadd -r lightdm 2> /dev/null || : /usr/sbin/useradd -r -o -g lightdm -s /bin/false -c "LightDM daemon" \ -d /var/lib/lightdm lightdm 2> /dev/null || : /usr/sbin/usermod -g lightdm -G lightdm -s /bin/false lightdm 2> /dev/null But the output when build against Factory snapshot is: [ 232s] configuration error - unknown item 'MOTD_FILE' (notify administrator) [ 232s] configuration error - unknown item 'ENV_ROOTPATH' (notify administrator) [ 232s] configuration error - unknown item 'PASS_MIN_LEN' (notify administrator) [ 232s] configuration error - unknown item 'GROUPADD_CMD' (notify administrator) [ 232s] configuration error - unknown item 'USERADD_CMD' (notify administrator) [ 232s] configuration error - unknown item 'USERDEL_PRECMD' (notify administrator) [ 232s] configuration error - unknown item 'USERDEL_POSTCMD' (notify administrator) [ 232s] useradd: group '1000' does not exist [ 232s] useradd: the GROUP= configuration in /etc/default/useradd will be ignored [ 232s] useradd: -o flag is only allowed with the -u flag [ 232s] Usage: useradd [options] LOGIN [ 232s] useradd -D [ 232s] useradd -D [options] [ 232s] [ 232s] Options: [ 232s] -b, --base-dir BASE_DIR base directory for the home directory of the [ 232s] new account [ 232s] -c, --comment COMMENT GECOS field of the new account [ 232s] -d, --home-dir HOME_DIR home directory of the new account [ 232s] -D, --defaults print or change default useradd configuration [ 232s] -e, --expiredate EXPIRE_DATE expiration date of the new account [ 232s] -f, --inactive INACTIVE password inactivity period of the new account [ 232s] -g, --gid GROUP name or ID of the primary group of the new [ 232s] account [ 232s] -G, --groups GROUPS list of supplementary groups of the new [ 232s] account [ 232s] -h, --help display this help message and exit [ 232s] -k, --skel SKEL_DIR use this alternative skeleton directory [ 232s] -K, --key KEY=VALUE override /etc/login.defs defaults [ 232s] -l, --no-log-init do not add the user to the lastlog and [ 232s] faillog databases [ 232s] -m, --create-home create the user's home directory [ 232s] -M, --no-create-home do not create the user's home directory [ 232s] -N, --no-user-group do not create a group with the same name as [ 232s] the user [ 232s] -o, --non-unique allow to create users with duplicate [ 232s] (non-unique) UID [ 232s] -p, --password PASSWORD encrypted password of the new account [ 232s] -r, --system create a system account [ 232s] -R, --root CHROOT_DIR directory to chroot into [ 232s] -s, --shell SHELL login shell of the new account [ 232s] -u, --uid UID user ID of the new account [ 232s] -U, --user-group create a group with the same name as the user [ 232s] -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping [ 232s] [ 232s] usermod: user 'lightdm' does not exist [ 232s] error: %pre(lightdm-1.4.0-17.1.x86_64) scriptlet failed, exit status 6 [ 232s] error: lightdm-1.4.0-17.1.x86_64: install failed Regards Raymond -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
I presume this is reason for failing (group|user)add for me groupadd is failing because of -o does not accept missing gid... anyway removing -o works for my case but maybe it works for you too Stephan Kulow (coolo) accepted request 139684 3 days ago (revision 1) FATE#314473: Replace pwdutils with shadow utilities On Sun, Nov 11, 2012 at 11:15 AM, Raymond Wooninck <tittiatcoke@gmail.com> wrote:
Hi,
I have cross posted this message in both Factory and Packaging, as that I am not sure where exactly it belongs.
Since this weekend I am seeing issues when a package is build against Factory snapshot and the %pre/%post scripts are trying to create a group/user. (The example is from lightdm)
The script executed is:
%pre /usr/sbin/groupadd -r lightdm 2> /dev/null || : /usr/sbin/useradd -r -o -g lightdm -s /bin/false -c "LightDM daemon" \ -d /var/lib/lightdm lightdm 2> /dev/null || : /usr/sbin/usermod -g lightdm -G lightdm -s /bin/false lightdm 2> /dev/null
But the output when build against Factory snapshot is:
[ 232s] configuration error - unknown item 'MOTD_FILE' (notify administrator) [ 232s] configuration error - unknown item 'ENV_ROOTPATH' (notify administrator) [ 232s] configuration error - unknown item 'PASS_MIN_LEN' (notify administrator) [ 232s] configuration error - unknown item 'GROUPADD_CMD' (notify administrator) [ 232s] configuration error - unknown item 'USERADD_CMD' (notify administrator) [ 232s] configuration error - unknown item 'USERDEL_PRECMD' (notify administrator) [ 232s] configuration error - unknown item 'USERDEL_POSTCMD' (notify administrator) [ 232s] useradd: group '1000' does not exist [ 232s] useradd: the GROUP= configuration in /etc/default/useradd will be ignored [ 232s] useradd: -o flag is only allowed with the -u flag [ 232s] Usage: useradd [options] LOGIN [ 232s] useradd -D [ 232s] useradd -D [options] [ 232s] [ 232s] Options: [ 232s] -b, --base-dir BASE_DIR base directory for the home directory of the [ 232s] new account [ 232s] -c, --comment COMMENT GECOS field of the new account [ 232s] -d, --home-dir HOME_DIR home directory of the new account [ 232s] -D, --defaults print or change default useradd configuration [ 232s] -e, --expiredate EXPIRE_DATE expiration date of the new account [ 232s] -f, --inactive INACTIVE password inactivity period of the new account [ 232s] -g, --gid GROUP name or ID of the primary group of the new [ 232s] account [ 232s] -G, --groups GROUPS list of supplementary groups of the new [ 232s] account [ 232s] -h, --help display this help message and exit [ 232s] -k, --skel SKEL_DIR use this alternative skeleton directory [ 232s] -K, --key KEY=VALUE override /etc/login.defs defaults [ 232s] -l, --no-log-init do not add the user to the lastlog and [ 232s] faillog databases [ 232s] -m, --create-home create the user's home directory [ 232s] -M, --no-create-home do not create the user's home directory [ 232s] -N, --no-user-group do not create a group with the same name as [ 232s] the user [ 232s] -o, --non-unique allow to create users with duplicate [ 232s] (non-unique) UID [ 232s] -p, --password PASSWORD encrypted password of the new account [ 232s] -r, --system create a system account [ 232s] -R, --root CHROOT_DIR directory to chroot into [ 232s] -s, --shell SHELL login shell of the new account [ 232s] -u, --uid UID user ID of the new account [ 232s] -U, --user-group create a group with the same name as the user [ 232s] -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping [ 232s] [ 232s] usermod: user 'lightdm' does not exist [ 232s] error: %pre(lightdm-1.4.0-17.1.x86_64) scriptlet failed, exit status 6 [ 232s] error: lightdm-1.4.0-17.1.x86_64: install failed
Regards
Raymond -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Sun, Nov 11, Boris Manojlovic wrote:
I presume this is reason for failing (group|user)add for me groupadd is failing because of -o does not accept missing gid... anyway removing -o works for my case but maybe it works for you too
-o without -u (useradd) or -g (groupadd) doesn't make any sense. pwdutils should have at least warned about this, that it is now rejected as error is correct. Please fix your script. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
for me like i stated was a fix and yes -o without -u(g) does not make sense too, and I'm not OP by the way i found my way arround problem On Sun, Nov 11, 2012 at 6:58 PM, Thorsten Kukuk <kukuk@suse.de> wrote:
On Sun, Nov 11, Boris Manojlovic wrote:
I presume this is reason for failing (group|user)add for me groupadd is failing because of -o does not accept missing gid... anyway removing -o works for my case but maybe it works for you too
-o without -u (useradd) or -g (groupadd) doesn't make any sense. pwdutils should have at least warned about this, that it is now rejected as error is correct. Please fix your script.
Thorsten
-- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Sun, Nov 11, Raymond Wooninck wrote:
Hi,
I have cross posted this message in both Factory and Packaging, as that I am not sure where exactly it belongs.
Since this weekend I am seeing issues when a package is build against Factory snapshot and the %pre/%post scripts are trying to create a group/user. (The example is from lightdm)
The script executed is:
%pre /usr/sbin/groupadd -r lightdm 2> /dev/null || : /usr/sbin/useradd -r -o -g lightdm -s /bin/false -c "LightDM daemon" \ -d /var/lib/lightdm lightdm 2> /dev/null || : /usr/sbin/usermod -g lightdm -G lightdm -s /bin/false lightdm 2> /dev/null
[...]
[ 232s] useradd: -o flag is only allowed with the -u flag
[...]
[ 232s] -o, --non-unique allow to create users with duplicate [ 232s] (non-unique) UID
Ok, did you ever thought about what your command line should do? Garbage in -> garbage out. And no, I will not fix fix pwdutils anymore to reject bogus command line options ;) Please fix your %pre script and don't use -o without -u <uid>, it really does not make any sense. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (3)
-
Boris Manojlovic
-
Raymond Wooninck
-
Thorsten Kukuk