Re: usersgroups - passwd functionality
On Fri, 7 Sep 2001, Christopher Yeoh wrote:
> Hi Stew,
>
> Stew Benedict writes:
> >
> > The usersgroups implentation of "passwd", while inline with the LSB spec,
> > does not seem to correspond to any version of the application that I'm
> > able to find. On RedHat based systems, with shadow and pam, some of the
> > specified functionality is performed by the commands "chage" and
> > "gpasswd".
>
> Which specific testcases are you seeing problems with? (btw I think
> that passwd just execs gpasswd for some functionality - which is still
> a valid implementation, just applications won't call gpasswd directly)
>
Any of the aging commands (-x, -i, -n, -w) as well as the group passwd
functionality. The version Mandrake uses is:
[stew@powerbook-cooker gi]$ rpm -qi passwd
Name : passwd Relocations: (not relocateable)
Version : 0.64.1 Vendor: MandrakeSoft
And these are the only options available:
[stew@powerbook-cooker gi]$ passwd --help Usage: passwd [OPTION...]
<accountName>
-d, --delete delete the password for the named account (root
only)
-f, --force force operation
-k, --keep-tokens keep non-expired authentication tokens
-l, --lock lock the named account (root only)
-S, --status report password status on the named account (root
only)
--stdin read new tokens from stdin (root only)
-u, --unlock unlock the named account (root only)
Help options
-?, --help Show this help message
--usage Display brief usage message
I actually also wrote a small wrapper script that passed things off to
chage and gpasswd and that picked up a few of the failures, although
the group password setting still failed. Put this in
/usr/local/bin/passwd. Sort of a kludge though.
> > Is it expected that "paaswd" be re-written to conform to the spec, or can
> > someone point me to source of a compliant version?
>
> The spec was written based on the shadow package source. I don't
> remember the exact site it came from, but could be one of the
> following:
>
> ftp://piast.t19.ds.pwr.wroc.pl/pub/linux/shadow/
> ftp://ftp.ists.pwr.wroc.pl/pub/linux/shadow/
> http://www.itnet.pl/amelektr/linux/shadow/
>
> The spec actually requires a subset of the functionality listed in the
> man page (but providing more is ok as long as it doesn't contradict
> the spec).
>
Thank's I'll check out those sources.
Also, as an aside. Running the test sequentially, my failures increase if
I don't manually groupdel vsx5 before another run.
Also I had to add /usr/sbin to vsx0's path as the group* and user*
commands reside there in Mandrake - is this valid? I could alternately
push to move the apps or symlink them.
There also seems to be an issue with the addition of user vsx5, when the
group already exists, without specifying a group.
[root@mdk80 /root]# useradd vsx5
useradd: group vsx5 exists - if you want to add this user to that group,
use -g.
That failing, a number of subsequent tests don't happen.
Thanks,
Stew Benedict
Reply to: