[Pkg-shadow-devel] Bug#304934: marked as done ([ALEXANDER] passwd: there should be a way to override PASS_MAX_DAYS in useradd)

Debian Bug Tracking System owner@bugs.debian.org
Sun, 01 May 2005 16:33:06 -0700


Your message dated Mon, 2 May 2005 02:30:08 +0300
with message-id <20050501233007.GB8791@cherokee.kiev.ua>
and subject line there should be a way to override PASS_MAX_DAYS in useradd
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 16 Apr 2005 16:54:07 +0000
>From mh+debian-bugs@zugschlus.de Sat Apr 16 09:54:06 2005
Return-path: <mh+debian-bugs@zugschlus.de>
Received: from 5301d.unt0.torres.l21.ma.zugschlus.de (torres.int.l21.ma.zugschlus.de) [217.151.83.1] (Debian-exim)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DMqYY-00028X-00; Sat, 16 Apr 2005 09:54:06 -0700
Received: from lefler.int.l21.ma.zugschlus.de ([192.168.130.38]:57990)
	by torres.int.l21.ma.zugschlus.de with esmtp (Exim 4.50)
	id 1DMqYW-0003GD-Hk; Sat, 16 Apr 2005 18:54:04 +0200
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Marc Haber <mh+debian-bugs@zugschlus.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: passwd: please add command line option to override PASS_MAX_DAYS
X-Mailer: reportbug 3.9
Date: Sat, 16 Apr 2005 18:54:04 +0200
Message-Id: <E1DMqYW-0003GD-Hk@torres.int.l21.ma.zugschlus.de>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: passwd
Version: 1:4.0.3-31sarge2
Severity: wishlist

Hi,

when PASS_MAX_DAYS is set in login.defs, useradd creates accounts that
expires. This causes adduser to create _system_ accounts that expire,
which is bad.

Please provide a command line option for useradd so that adduser can
tell useradd to create a non-expiring account.

Greetings
Marc

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-zgserver
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages passwd depends on:
ii  libc6                   2.3.2.ds1-20     GNU C Library: Shared libraries an
ii  libpam-modules          0.76-22          Pluggable Authentication Modules f
ii  libpam0g                0.76-22          Pluggable Authentication Modules l
ii  login                   1:4.0.3-31sarge2 system login tools

-- debconf information excluded

---------------------------------------
Received: (at 304934-done) by bugs.debian.org; 1 May 2005 23:27:16 +0000
>From arg@online.com.ua Sun May 01 16:27:16 2005
Return-path: <arg@online.com.ua>
Received: from cluster2.uol.ua (cluster1.uol.ua) [195.123.61.210] (root)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DSNqG-0008Sh-00; Sun, 01 May 2005 16:27:16 -0700
Received: from [194.242.118.125] (account arg@online.com.ua HELO localhost)
  by cluster1.uol.ua ( Ukraine Online SMTP 4.2.8)
  with ESMTP-TLS id 18892941; Mon, 02 May 2005 02:43:53 +0300
Date: Mon, 2 May 2005 02:30:08 +0300
From: Alexander Gattin <arg@online.com.ua>
To: 304934-done@bugs.debian.org
Cc: Marc Haber <mh+debian-bugs@zugschlus.de>, 298883@bugs.debian.org
Subject: there should be a way to override PASS_MAX_DAYS in useradd
Message-ID: <20050501233007.GB8791@cherokee.kiev.ua>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Delivered-To: 304934-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 
X-CrossAssassin-Score: 2

Hi!

I just forgot about a "secret" -O option in
useradd. :)
You can use it to override whatever values from
login.defs

For example, regarding bug #298883, use of:
> `useradd -O PASS_MAX_DAYS=99999 usr298883`
will solve your problem (other solution, that you have
currently implemented, involves `chage`).

Thus closing the bug.

The problem with -O option is a Tomasz's desire to
rename it to -K for sake of unfication with Solaris:

On Thu, Mar 24, 2005 at 11:31:45PM +0100, Tomasz Kłoczko wrote:
> I see some good things in shadow like tools in Solaris and some things I 
> want to integrate on shadow.
...
> All above variables can be used by "useradd -K <key>=<value>".
...
> Current shadow useradd have undocumented -O option. Fragment from
> useradd source code:
> 
>                 case 'O':
>                         /*
>                          * override login.defs defaults (-O name=value)
>                          * example: -O UID_MIN=100 -O UID_MAX=499
>                          * note: -O UID_MIN=10,UID_MAX=499 doesn't work yet
>                          */
>                         cp = strchr (optarg, '=');
>                         if (!cp) {
>                                 fprintf (stderr,
>                                          _("%s: -O requires NAME=VALUE\n"),
>                                          Prog);
>                                 exit (E_BAD_ARG);
>                         }
>                         /* terminate name, point to value */
>                         *cp++ = '\0';
>                         if (putdef_str (optarg, cp) < 0)
>                                 exit (E_BAD_ARG);
>                         break;
> 
> IMO it will be good kill -O an move this to -K.

P.S. now you know the alternatives, at least. ;)

-- 
WBR,
xrgtn