Bug#304934: [Pkg-shadow-devel] Bug#304934: there should be a way to override PASS_MAX_DAYS in useradd

Alexander Gattin Alexander Gattin <arg@online.com.ua>, 304934@bugs.debian.org
Sat, 7 May 2005 21:58:19 +0300


Hi, Marc!

On Mon, May 02, 2005 at 07:20:29AM +0200, Marc Haber wrote:
> On Mon, May 02, 2005 at 02:30:08AM +0300, Alexander Gattin wrote:
> > 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.
> 
> Reopening. Please document this option. I cannot use a secret,
> undocumented option.

Actually it is documented, although in TFS. ;) It's not
a passage about TFS being self-obvious :), there's
really a comment by Tomasz.

Anyway, I don't object reopening the bug, especcially
because we have a problem with -O/-K (more on this
below). And also because I agree that it's better to
have a documentation in "binary distribution" form,
i.e. in man/info/html/README/whatever pages (just pick
any you like ;)).

> > The problem with -O option is a Tomasz's desire to
> > rename it to -K for sake of unfication with Solaris:
> 
> So we can/need to wait until it is renamed, then document it,

This depends on you.
Currently I see the next in adduser:
> Depends: ... passwd (>=961025)

Dependency on such an antique version of passwd looks
strange for me (do you really test adduser against
it?), but if you want to choose as old a passwd as
possible for the dependency, then probably you should
use chage instead of -O/-K, because chage is in passwd
since ages (a working version since 970616-1, AFAIU?).

I may check when the -O was introduced. I think it's
too a very old option, and if you choose to start
relying on "-O" when we document it, you can still
declare dependency on an old passwd (I think about
2000xxxx). Of course, upcoming switch to "-K" can force
us to support _both_ options for some time, but it's
not a big problem.

If you choose to wait for "-K" being introduced and
documented, then be prepared for long wait. First we
need to sync with upstream (4.0.8 currently), and
after that it's still not clear when Tomasz will switch
to "-K". Moreover you will need to make dependency on
the very new pesswd, smth. like:
> Depends: ... passwd (>=1:4.0.10-1)

-- 
WBR,
xrgtn