Commit Graph

169 Commits

Author SHA1 Message Date
roam
5d49613977 In fullpath_from_shell(), move the nologin detection before the cat | while
loop to avoid an incorrect display of the nologin path twice.

PR:		71786
Submitted by:	Andrew Hayden <andrew.hayden@gmail.com>
Reviewed by:	mtm
MFC after:	3 days
2004-09-23 13:09:42 +00:00
mtm
c150d52be5 Also, match the full path to the special nologin shell.
Previously, it would recognize it as a valid shell only
if the basename (nologin) was specified. Now, it will
recognize both the basename and the full path.

NOTE: The full path as adduser(8) understands it is /usr/sbin/nologin.
      There is a symlink, /sbin/nologin, but that's deprecated and
      only there for backwards compatibility.
2004-08-28 14:32:10 +00:00
ru
f0f9daab94 Assorted markup, grammar, and spelling fixes. 2004-06-13 18:03:44 +00:00
csjp
a8bd7fdeab Add note that rmuser will clean up any IPC mechanisms owned by the user.
Approved by:	bmilekic (mentor)
2004-06-08 14:52:55 +00:00
mtm
35b8bb3bea Accept full path names in addition to base names for shells.
Make explicit in the documentation that valid shells need to be
supplied only if the -S option is not given.
2004-06-06 17:55:55 +00:00
ru
7e6b12d757 Fixed a typo. 2004-06-04 19:21:26 +00:00
trhodes
130a0adbc2 This manual page will not first appear in 4.10 as RELENG_4 has a different
version of the adduser utility.

Noticed by:	simon
2004-04-07 22:16:04 +00:00
trhodes
96d55bfa0a Fix today's faux pas by:
Removing the -compact option passed to .Bl macro to avoid useless .Pp macros;
Adding a missing period;
Using .Xr with .Nd since makewhatis(1) has no support for cases where the Xref is absent.

Informed by:	ru
2004-03-30 22:31:22 +00:00
trhodes
0d932b4932 Add an adduser.conf manual page.
Hook it to the build in Makefile.
Xref from adduser.8.
Update adduser.8's BUGS section.
Bump the date on adduser.8.
2004-03-30 21:50:42 +00:00
cperciva
4e0cca3082 Sychronize with reality: nologin(8) is now in /usr/sbin
Reminded by:	trhodes
2004-03-30 19:24:56 +00:00
mtm
1803abd435 o Add an -S option to not attempt to ascertain the validity of a shell.
o Add a -D option to not attempt to create the home directory.
o Treat the /nonexistent home directory specially. It means the user has
  no home directory and it should not be created.
o Update Copyright year and my email.
2004-03-16 13:46:29 +00:00
schweikh
f987494274 Make rmuser now also remove ipc resources. Also, fix a few minor
shell style problems (superfluous backslashes at EOL).

PR:		55980
Submitted by:	Chris S.J.Peron <maneo@bsdpro.com>
MFC after:	2 weeks
2004-02-29 09:54:15 +00:00
ru
c581c0c568 mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
mtm
2cfa0ea144 Typo.
This has worked so far because the variable was empty by default.

Submitted by: Kostyuk Oleg <cub@cub.org.ua>
2003-06-24 15:20:43 +00:00
mtm
712c07b895 s/warn/info/ 2003-06-20 19:36:56 +00:00
mtm
41480c6880 Add support for the special shell nologin.
Prodded by:	mikeh
2003-06-20 19:23:55 +00:00
mtm
fad0dcd59e Update my email address. 2003-06-20 16:53:36 +00:00
mtm
09d2651812 Don't forget the -r on the second password prompt.
PR: bin/53550
2003-06-20 16:52:06 +00:00
mtm
0901d0af90 Document the -g option in the usage message.
Approved by:	markm (mentor)(implicit)
2003-03-23 23:06:44 +00:00
mtm
885ceb652a Add a -g option to specify a default login group.
Approved by:	markm (mentor)(implicit)
2003-03-20 16:36:03 +00:00
mtm
aa1ebaec8f o initialize a couple of local flags so the user can re-edit groups
next time the subroutine is re-entered
o s/configrun/configflag/
o Make the prompt make sense if the user was creating a configuration file

Approved by:	markm (mentor)(implicit)
2003-03-19 08:07:15 +00:00
ru
e698a908c7 mdoc(7) police: Scheduled sweep. 2003-02-24 22:53:26 +00:00
mtm
3625deda4e Update copyright. 2003-02-16 18:06:04 +00:00
mtm
eecc0480a5 Condense the output to one line per removed user. For user's who
want the more verbose version, there's a -v option.

Approved by:	markm (mentor)
2003-02-16 18:04:06 +00:00
mtm
7d9f812fad Revisit the shell special characters issue and settle it once-and-forall.
All characters will be accepted, and pw(8) can sort out which ones it
will allow and which ones it won't.

Approved by:	markm (mentor)
Prodded by:	Philippe Bourcier <philippe@cyberabuse.org>
2003-02-09 18:29:09 +00:00
adrian
179699c685 Change the behaviour of adduser to match the previous incarnation a little more.
If any of the given groups do not exist complain and let the user try again.
This saves the user from discovering at the end of the process that they've
forgotten to add a group or they've typoed.

Thanks to cmc/dougb for pointing out how bad my sh fu actually is.

Original code by: me
Scary sh rewrite by: dougb

Reviewed by:	dougb
2003-02-08 08:04:53 +00:00
fanf
abd08ddf5a Better gender-neutral language.
Submitted by:	sheldonh
2003-02-04 11:12:36 +00:00
fjoe
c00190eea0 back out logging to /var/log/adduser
(/usr/sbin/pw already logs to /var/log/userlog)
2003-01-24 02:05:51 +00:00
mtm
4b1f2538df In interactive mode, ask the user if he/she wants to add another
user and re-run interactive questions or quit depending on the
answer.

Submitted by: Scot Hetzel <hetzels@westbend.net>
Approved by: markm (mentor)
2003-01-24 00:24:26 +00:00
fjoe
b73387a65d expr foo -> $((foo)) 2003-01-23 20:18:21 +00:00
fjoe
0ca3dd8382 - restore an ability to write log of added users (default to
/var/log/adduser, disabled if empty or adduserlog="no")
- do not ask for password in configure mode
- print $passwdtype instead of password in configure mode
- add DATECMD, GREPCMD (not overridable but with full path)
2003-01-23 20:07:40 +00:00
fjoe
c1c55f8dec Do not loose trailing spaces when printing prompt messages. 2003-01-23 19:58:16 +00:00
mtm
40e20688bc *blush*
While I'm here properly quote all the other input I neglected
to quote.

Approved by: markm (mentor)(implicit)
2003-01-23 01:57:30 +00:00
mtm
a22539fc11 Don't forget to properly quote input.
Approved by: markm (mentor)(implicit)
Submitted by: Robin Breathe <robin@isometry.net>
2003-01-21 12:11:35 +00:00
fjoe
4bf03b304a do not loose trailing space when asking uid 2003-01-20 17:55:31 +00:00
schweikh
2505bee728 english(4) police. 2002-12-27 12:15:40 +00:00
ru
88d368906e Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
tjr
e10ab724ba Correctly handle files with IFS characters (spaces) in their names when
cleaning up temporary files.

Submitted by:	Mike Makonnen <mtm@identd.net>
Approved by:	re
2002-12-09 02:22:50 +00:00
ru
2af4cb79a3 mdoc(7) police: overhaul.
Approved by:	re
2002-12-04 14:44:20 +00:00
scottl
903f444bed Replace the perl versions of adduser and rmuser with shell script versions.
Submitted by:	Mike Makonnen <mtm@identd.net>
Approved by:	re
2002-12-03 05:41:09 +00:00
ru
4275cb0d51 mdoc(7) police: markup fixes.
Approved by:	re
2002-11-27 15:31:08 +00:00
fanf
503f82b384 Clarify the unique groups scheme by mentioning that the 002 umask
is instead of the usual 022 umask, and explain that what the scheme
still prevents is unwanted changes, not prying eyes.

While I'm here, mess with the phrasing and line-breaks a bit.
2002-11-08 22:04:31 +00:00
dwmalone
ebd865a07f Fix conjugation of exists and add full stops to the messages I changed.
PR:		38481
Submitted by:	Kevin Kinsey <kadmin@elisha.daleco.biz>
MFC after:	1 week
2002-08-11 20:31:16 +00:00
charnier
90baea60d8 The .Nm utility 2002-07-14 14:47:15 +00:00
yar
0c741f3d54 Found a single point where rmuser(8) wasn't robust to strange
characters in a username:  where it was inserted into a regexp.
Fix it by escaping metacharacters in the name with \Q-\E.
2002-02-11 15:26:20 +00:00
yar
a42a593382 Keep similar things together: Check for too long usernames
inside the function that verifies username validity.
2002-01-28 17:59:09 +00:00
yar
98d85fd615 Disallow adding duplicate roots, toors, or other users w/uid 0.
Previously, a truth check instead if defined() check erroneously
allowed that.

PR:		bin/8745
2002-01-28 17:30:12 +00:00
yar
45ced84927 Implement a flexible way of letting some unusual characters
into usernames: Make the regular expression to check usernames
against configurable.

PR:		bin/22860 bin/31049
Reviewed by:	sheldonh
2002-01-28 17:03:13 +00:00
yar
a5571930c6 Remove the newly added -force option because it made adduser(8)
less robust to possible errors of the user/admin while adduser(8)
had been intended to minimize their possibility.
An alternative way of introducing strange symbols into usernames
to be committed really soon.
2002-01-28 16:37:35 +00:00
iedowse
44afe78f20 Add `-h' to the chown command so that symbolic links copied from
the skeleton directory are chown'd to the new user.

PR:		bin/10601
Submitted by:	Adrian Filipi-Martin <adrian2ubergeeks.com@gosub.cstone.net>
MFC after:	1 month
2002-01-20 17:05:07 +00:00