[Toybox] [New Toys] - groupadd, useradd, mkpasswd and modified passwd, lib/password

Ashwini Sharma ak.ashwini at gmail.com
Wed Oct 2 01:49:21 PDT 2013


Hi list,

Attached are the implementations for groupadd, useradd and mkpasswd
commands.

Patches are as follows

1. __lib.patch__  : this includes changes made to lib/lib.h and
__lib/password.c__.
lib/passowrd.c is modified to share the function __update_password()__
among groupadd, useradd commands.
This also has the factored out code, common to both, for __passwd__ and
__mkpasswd__.
Also has the cosmetic cleanup changes.

2. __passwd.c.patch__ : this file is modified due to the common code
factoring out and cosmetic cleanup changes.

3. groupadd and useradd has alias for addgroup and adduser, due to the
requirement constraint at my end.
    _adduser_ does invoke the passwd utility to set the user password on
creation.

Looking forward to your comments. Add to the tree if it can be.

regards,
Ashwini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20131002/3535c547/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lib.patch
Type: application/octet-stream
Size: 8624 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20131002/3535c547/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: passwd.c.patch
Type: application/octet-stream
Size: 6221 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20131002/3535c547/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: groupadd.c
Type: text/x-csrc
Size: 3388 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20131002/3535c547/attachment-0003.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: useradd.c
Type: text/x-csrc
Size: 7573 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20131002/3535c547/attachment-0004.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mkpasswd.c
Type: text/x-csrc
Size: 2649 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20131002/3535c547/attachment-0005.c>


More information about the Toybox mailing list