Mike Makonnen
e33b8d973e
Document the -g option in the usage message.
...
Approved by: markm (mentor)(implicit)
2003-03-23 23:06:44 +00:00
Mike Makonnen
642a7af59a
Add a -g option to specify a default login group.
...
Approved by: markm (mentor)(implicit)
2003-03-20 16:36:03 +00:00
Mike Makonnen
187a97aab9
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
Ruslan Ermilov
ace5be682d
mdoc(7) police: Scheduled sweep.
2003-02-24 22:53:26 +00:00
Mike Makonnen
fc89586093
Update copyright.
2003-02-16 18:06:04 +00:00
Mike Makonnen
6fcaf748ab
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
Mike Makonnen
c95c14d4e1
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 Chadd
3386ded6a9
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
Tony Finch
3967e18ad6
Better gender-neutral language.
...
Submitted by: sheldonh
2003-02-04 11:12:36 +00:00
Max Khon
cf8a185d8d
back out logging to /var/log/adduser
...
(/usr/sbin/pw already logs to /var/log/userlog)
2003-01-24 02:05:51 +00:00
Mike Makonnen
21084fe3e4
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
Max Khon
fd045cf566
expr foo -> $((foo))
2003-01-23 20:18:21 +00:00
Max Khon
e63bd70a30
- 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
Max Khon
ce1794a807
Do not loose trailing spaces when printing prompt messages.
2003-01-23 19:58:16 +00:00
Mike Makonnen
c83365999e
*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
Mike Makonnen
acb3f07afd
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
Max Khon
8b6caf2634
do not loose trailing space when asking uid
2003-01-20 17:55:31 +00:00
Jens Schweikhardt
57bd0fc6e8
english(4) police.
2002-12-27 12:15:40 +00:00
Ruslan Ermilov
8d5d039f80
Uniformly refer to a file system as "file system".
...
Approved by: re
2002-12-12 17:26:04 +00:00
Tim J. Robbins
deca89c7c0
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
Ruslan Ermilov
829629fedb
mdoc(7) police: overhaul.
...
Approved by: re
2002-12-04 14:44:20 +00:00
Scott Long
7cdfce092a
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
Ruslan Ermilov
c041c1e0d9
mdoc(7) police: markup fixes.
...
Approved by: re
2002-11-27 15:31:08 +00:00
Tony Finch
78c2665318
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
David Malone
4e17493163
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
Philippe Charnier
490d5836b5
The .Nm utility
2002-07-14 14:47:15 +00:00
Yaroslav Tykhiy
c7bb2e64aa
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
Yaroslav Tykhiy
8335d0edc2
Keep similar things together: Check for too long usernames
...
inside the function that verifies username validity.
2002-01-28 17:59:09 +00:00
Yaroslav Tykhiy
76ed1f96fd
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
Yaroslav Tykhiy
710e76b063
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
Yaroslav Tykhiy
743511b28c
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
Ian Dowse
dd24e86e74
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
Ruslan Ermilov
491a842962
yp(4) -> yp(8).
...
PR: docs/30797
2002-01-14 16:59:03 +00:00
Wolfram Schneider
12076922ff
Remove myself as maintainer, I don't have free time for adduser anymore.
2002-01-13 11:54:48 +00:00
Yaroslav Tykhiy
2d6a2675b3
Oops, missed one point where $pwd_mkdb had been used.
...
Now it should be @pwd_mkdb since we moved to Perl's
safe system() not using /bin/sh.
2002-01-04 21:28:32 +00:00
Yaroslav Tykhiy
b4ca3f2583
Document a new option: -force.
2002-01-02 19:01:53 +00:00
Yaroslav Tykhiy
1b0805da95
Allow weird characters in usernames if an admin persists on that:
...
a) Convert all the remaining older Perl system() calls to the new,
more secure LIST format so they are robust to whitespace and
shell metacharacters in their arguments.
b) Add a new option: -force, which allows adding usernames containing
characters that are otherwise illegal.
PR: bin/22860 bin/31049
2002-01-02 18:54:40 +00:00
Yaroslav Tykhiy
9666534916
Be consistent in what restriction is imposed on a username
...
in the code and what the warning message reads.
2002-01-02 16:19:14 +00:00
Yaroslav Tykhiy
ff1ebf7e7d
Forbid adding duplicate users with the name of "0".
...
Previously, it was possible due to 0 and "0" being
equivalent in Perl.
2002-01-02 15:49:49 +00:00
Yaroslav Tykhiy
55a0e28451
Parse atq(1) output correctly under various (but not all perhaps)
...
locale settings: allow any date and time separator characters.
2002-01-02 15:35:33 +00:00
Yaroslav Tykhiy
0dd4be31b5
In remove_at_jobs():
...
Don't print "Removing at jobs" if there are no jobs to remove.
Add a whitespace before "done." so the output looks better.
2002-01-02 15:24:10 +00:00
Dima Dorfman
6680d16d19
Print the correct filename if we fail to open $etc_passwd.
...
Submitted by: Brian Poole <raj@cerias.purdue.edu>
2001-09-06 12:21:21 +00:00
Dima Dorfman
e3d0beed03
Pass the username we just made to pwd_mkdb so that the latter doesn't
...
have to regenerate the entire database.
PR: 25798
Submitted by: Domas Mituzas <domas.mituzas@delfi.lt>
2001-08-20 01:20:05 +00:00
Ruslan Ermilov
753d686d34
mdoc(7) police: s/BSD/.Bx/ where appropriate.
2001-08-14 10:01:54 +00:00
Guy Helmer
3b62c20eda
Add "use Fcntl" to resolve O_RDWR|O_CREAT|O_EXCL macros used in
...
new sysopen call.
PR: 29366 (in part)
2001-08-01 16:32:36 +00:00
Guy Helmer
80b9c37313
Install the new password file with pwd_mkdb, not the old one.
...
PR: 29366 (in part)
2001-08-01 15:27:39 +00:00
Guy Helmer
15bfd2c9b9
The variable giving the name of the temporary password file was
...
inconsistently named "ptmp" and "etc_ptmp". This commit changes
it to "passwd_tmp" for consistency and to match OpenBSD's name
for the variable.
Consulted with: jedgar
2001-07-30 16:23:56 +00:00
Chris D. Faulhaber
eea11e0277
Use a safer method of creating the temporary password file.
...
Submitted by: dynamo@harvard.net
Obtained from: OpenBSD
MFC after: 3 days
2001-07-25 11:55:33 +00:00
Guy Helmer
ffbd2b9e9d
Fix removal of at jobs.
...
PR: bin/23052
Submitted by: Mike Sellenschuetter <mike.sellenschuetter@bankofamerica.com>
MFC after: 1 week
2001-07-23 18:25:45 +00:00
Dima Dorfman
35904a3be8
Generate a bigger salt. This is necessary for blowfish to work
...
properly, and doesn't hurt the other algorithms.
PR: 28991
Submitted by: Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp>
2001-07-19 12:00:04 +00:00