Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 1996 11:46:44 -0800
From:      "Jordan K. Hubbard" <jkh@time.cdrom.com>
To:        "Andrew V. Stesin" <stesin@elvisti.kiev.ua>
Cc:        hackers@freebsd.org
Subject:   Re: user management stuff 
Message-ID:  <11329.821821604@time.cdrom.com>
In-Reply-To: Your message of "Tue, 16 Jan 1996 20:15:42 %2B0200." <199601161815.UAA26169@office.elvisti.kiev.ua> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 	Ok. Where can I find the list of requirements? I.e. --
> 	what functionality _must_ be present? what shall be?

std options for all invocations:
[-uid uid] [-gid gid] [-user user] [-group group] [-home homedir] [-name name]
[-shell shell] [-realhome realhome] [-after uid] 

-uid	specify the uid to use, otherwise it will be chosen automatically
	(see also -after).

-gid	specify the gid to use, otherwise it's set automatically to track
	the uid.

-user	Specify the username to use [no default]

-group	Check that gid also exists under name group - if not, it should
	be added under this name (e.g. group:*:gid:user).  Default is not
	to mess with /etc/group.

-home	Specify the location of the home directory.  By default it will
	go to /home/${user} if not overriden in /etc/adduser.cf

-name	Specify full name (+ any other GCOS info).

-shell	Specify a different shell (than the default) to use.

-realhome  If different from home, make home dir here instead and
	make a symlink from home to here.

-after	If chosing uid automatically, start search after this uid.
	Search will stop at the next free "hole".


Commands:

adduser -add [..stdopts] [-skel skeldir]

adduser -delete [key]

adduser -exists [key]

adduser -modify [key] [..stdopts]

Examples:

adduser -add -uid 2035 -gid 2035 -user jkh -realhome /a/jkh \
	-home /home/jkh \
	-name "Jordan K. Hubbard" \
	-shell /usr/local/bin/bash

	Adds me with very specific settings.

adduser -add -user fred -name "Fred K. Schmertz"

	Adds a user fred with the next available uid/gid and
	using the default shell/home dir/etc values.

adduser -delete -user joe
adduser -delete -uid 710

	Would delete users matching these criteria (any of the
	stdargs should be usable as keys).

adduser -exists -uid 507
adduser -exists -group ftp

	Returns 1 if key matches.  In the case of -group, /etc/group
	is actually checked.  For use in scripts.

adduser -modify -uid 701 -name "Irving Q. Steenbottle"

	Finds uid 701 and changes the name field accordingly, leaving
	other fields unaltered.

> 	What the program _must not_ do? What kind of UI is

Crash?  Ruin the password file?  :-)

> 	required or recommended? Will it become (potentially) a part

I think the UI issue should be left alone to implement one level
further up, if desired.  The first UI interface should probably be
libdialog based, just for consistency.

Oh yeah, it should also read an /etc/adduser.cf for default
configuration information (which I think it should *not* prompt the
user about - just choose reasonable defaults!  The "adduser
configuration" phase on the first startup of our current adduser
really confuses a lot of people! :-(

					Jordan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?11329.821821604>