Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jun 1996 22:15:29 +0200
From:      Wolfram Schneider <wosch@cs.tu-berlin.de>
To:        Terry Lambert <terry@lambert.org>
Cc:        jkh@time.cdrom.com (Jordan K. Hubbard), pvh@leftside.its.uct.ac.za, freebsd-hackers@freebsd.org
Subject:   Re: Adduser program in C
Message-ID:  <199606112015.WAA00964@campa.panke.de>
In-Reply-To: <199606111842.LAA04109@phaeton.artisoft.com>
References:  <22841.834470165@time.cdrom.com> <199606111842.LAA04109@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert writes:
>> Anyone around here still have that adduser "spec" I devised about 3 -
>> 4 months ago?  I can't find it in my mailing list archives.
>Have you looked in the list archives?
>Maybe this is a chance to improve archive searching?

Searching works well. Choose group -current and -hackers,
search for 'jordan AND adduser' and look for a long mail ;-)

<HTML><HEAD>
<TITLE>Search Results: document</TITLE>
</HEAD>
<pre>From owner-freebsd-hackers  Tue Jan 16 11:49:31 1996
Return-Path: owner-hackers
Received: (from root@localhost)
          by freefall.freebsd.org (8.7.3/8.7.3) id LAA05866
          for hackers-outgoing; Tue, 16 Jan 1996 11:49:31 -0800 (PST)
Received: from time.cdrom.com (time.cdrom.com [192.216.222.226])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id LAA05859
          for <hackers@freebsd.org>; Tue, 16 Jan 1996 11:49:28 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by time.cdrom.com (8.6.12/8.6.9) with SMTP id LAA11331; Tue, 16 Jan 1996 11:46:44 -0800
To: "Andrew V. Stesin" <stesin@elvisti.kiev.ua>
cc: hackers@freebsd.org
Subject: Re: user management stuff 
In-reply-to: Your message of "Tue, 16 Jan 1996 20:15:42 +0200."
             <199601161815.UAA26169@office.elvisti.kiev.ua> 
Date: Tue, 16 Jan 1996 11:46:44 -0800
Message-ID: <11329.821821604@time.cdrom.com>
From: "Jordan K. Hubbard" <jkh@time.cdrom.com>
Sender: owner-hackers@freebsd.org
Precedence: bulk

> 	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

</pre></BODY></HTML>



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