Commit Graph

20 Commits

Author SHA1 Message Date
agc 199e667b0f Add RCS Id and Copyright. 2000-02-02 15:12:10 +00:00
agc 2f3f04acfd Enhancements from Hubert Feyrer:
+ copy all files and directories in <skeldir> to new user's home
directory, not just if they begin with a '.'
+ use pax to copy files from <skeldir>, as this will allow <skeldir>
to contain directory trees as well as regular files
+ use -h arg to chown(1) in case any symlinks have been created in the
new user's home directory
+ getpwnam(3) does not set errno, so use errx(3) and warnx(3)
+ use nologin(8) in preference to false(1) when deleting users but
preserving information
+ in usage messages, specify [-r lowuid..highuid] rather than a simple
[-r range]
1999-12-31 21:58:14 +00:00
agc 7497747c60 Add new functionality, and fix some bugs and oversights:
+ Moved all internal definitions from usermgmt.h to user.c
+ Added prototypes to usermgmt.h
+ Allow defaults to be set at build time
+ Check the effective uid is 0 if any data is to be modified
+ Check all numeric uids and gids really are numeric
+ Fix a bug (reported by lenb at sasquatch.com) where new ranges were
appended to old ranges, rather than replacing them
+ Add userinfo(8) and groupinfo(8) utilities (if EXTENSIONS is
defined), whereby user and group information can be displayed.  Add
manual pages for new utilities.  Add front-end calling from user(8)
and group(8) accordingly.
+ Make all functions visible outside the user.c file again.  User and
group manipulation may be split out into a separate shared lib in the
future
+ Split off main function into a separate main.c
+ Changed default group to be "users"
+ Changed despatch table for commands to work in a more sane manner
+ Added "default-group" target to Makefile, so that the default group
can be made easily.
1999-12-24 09:08:48 +00:00
hubertf 93331a6d49 Remove code to make this compile on 1.4.1, as requested by Luke and
Frank. We'll need to move this to pkgsrc to get it for 1.4.1.
1999-12-13 00:26:26 +00:00
lukem 8c1445f5dc * cleanup the usage messages:
- put `usage' at the start of each message
	- put a space between the option and arg in [-x foo]
* fix command parsing for when a two word command is invoked without
  args or with an invalid second arg so that a more appropriate error
  message is printed.
1999-12-08 21:45:54 +00:00
hubertf 73332d1d4c Make MKDIR just be /bin/mkdir, without -p 1999-12-08 18:22:54 +00:00
hubertf f925a43bdf - Only use strlcpy() on systems that have it, i.e. >=1.4K. This makes
this working again on 1.4 systems.
 - Revert last change to argument passing which broke "user del",
   "user mod", ...
1999-12-08 18:12:16 +00:00
soren 6cc6a03447 Add adduser(8) for compatibility. 1999-12-08 00:01:36 +00:00
lukem bbd13d34a8 * don't dump core if run without args
* use strlcpy() instead of homegrown strnncpy()
* sort #includes
1999-12-07 10:42:12 +00:00
lukem 02bc52bd3e remove unused STRNCPY macro 1999-12-07 10:37:57 +00:00
lukem dda92ed7f3 missing , 1999-12-07 10:25:33 +00:00
lukem c7a4f3b509 use (c) instead of 8bit copyright symbol... 1999-12-07 10:14:01 +00:00
simonb 837589f349 Fix up a few calls to usage(). 1999-12-06 23:11:27 +00:00
simonb e919f8db3f Use FILES= to install example files instead of home-grown install rule.
Fix DPADD usage.
1999-12-06 22:52:18 +00:00
simonb d193cbd060 Make this compile with WARNS=1. 1999-12-06 22:50:46 +00:00
simonb faba922c92 Make ./etc/skel and ./usr/share/examples/usermgmt with mtree, and don't
create the directory in the user(8) Makefile.
1999-12-06 22:44:47 +00:00
simonb a4bb8cea12 Make this compile with WARNS=1. 1999-12-06 22:29:02 +00:00
simonb 7506323401 Use LINKS+= not LINKS=. 1999-12-06 22:28:12 +00:00
agc 7beb00d627 Fix typos. 1999-12-06 21:39:20 +00:00
agc af1b2fe493 Add SVR4/Solaris-like useradd/usermod/userdel functionality, and
groupadd/groupmod/groupdel functionality, along with two front-end
utilities, user(8) and group(8).

Based on the addnerd package, but most of the interface has been
completely rewritten, and suggestions from simonb and mrg have been
incorporated.
1999-12-06 21:31:42 +00:00