pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/40964: pkginstall: Use of useradd under Linux is incorrect
>Number: 40964
>Category: pkg
>Synopsis: Use of useradd under Linux is incorrect
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 05 11:15:00 +0000 2009
>Originator: cheusov%tut.by@localhost
>Release: NetBSD 5.0_RC2
>Organization:
>Environment:
System: NetBSD chen.chizhovka.net 5.0_RC2 NetBSD 5.0_RC2 (GENERIC) #0: Sat Feb
14 00:17:41 EET 2009
cheusov%chen.chizhovka.net@localhost:/srv/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
First of all, look to this failure.
http://mova.org/~cheusov/pub/pkgsrc-distbb/Linux/current-destdir/logs//20090227.2003/security_policykit_policykit-0.9nb3/stage_package-install.html
It happens because -M option is passed to useradd which has no such an option.
System: Debian Sarge. /usr/sbin/useradd: 4.0.18.1-7.
The problematic commit is the following I think
--------------------------------------------------------------------------
pkginstall/usergroupfuncs.Linux:
----------------------------
revision 1.4
date: 2009/02/02 19:54:22; author: joerg; state: Exp; lines: +3 -9
Create users with -M. On Linux this gives the same behavior as NetBSD's
useradd without -M, e.g. allows creation of users without home
directory. Tested on RHEL4. From Jens Rehsack.
--------------------------------------------------------------------------
I don't know about RHEL but 'useradd' under Debian works just like NetBSD's
useradd -- it doesn't create home directory unless -m is applied.
Full usage message of Linux's useradd:
Usage: useradd [options] LOGIN
Options:
-b, --base-dir BASE_DIR base directory for the new user account
home directory
-c, --comment COMMENT set the GECOS field for the new user account
-d, --home-dir HOME_DIR home directory for the new user account
-D, --defaults print or save modified default useradd
configuration
-e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
-f, --inactive INACTIVE set password inactive after expiration
to INACTIVE
-g, --gid GROUP force use GROUP for the new user account
-G, --groups GROUPS list of supplementary groups for the new
user account
-h, --help display this help message and exit
-k, --skel SKEL_DIR specify an alternative skel directory
-K, --key KEY=VALUE overrides /etc/login.defs defaults
-m, --create-home create home directory for the new user
account
-o, --non-unique allow create user with duplicate
(non-unique) UID
-p, --password PASSWORD use encrypted password for the new user
account
-r, --system create a system account
-s, --shell SHELL the login shell for the new user account
-u, --uid UID force use the UID for the new user account
>Fix:
Unknown
Home |
Main Index |
Thread Index |
Old Index