mtm
66726447ae
Add a -g option to specify a default login group.
...
Approved by: markm (mentor)(implicit)
2003-03-20 16:36:03 +00:00
mtm
a2cbf4fe43
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
0dea541567
mdoc(7) police: Scheduled sweep.
2003-02-24 22:53:26 +00:00
mtm
b7e8fa9ad7
Update copyright.
2003-02-16 18:06:04 +00:00
mtm
b252bec075
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
79fd930022
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
ad4137525e
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
150cf2a7fd
Better gender-neutral language.
...
Submitted by: sheldonh
2003-02-04 11:12:36 +00:00
fjoe
691e8219e3
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
64dae1c093
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
de0591cf07
expr foo -> $((foo))
2003-01-23 20:18:21 +00:00
fjoe
9efcd9e534
- 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
95a61b2a6f
Do not loose trailing spaces when printing prompt messages.
2003-01-23 19:58:16 +00:00
mtm
aecb9be887
*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
140d1271c3
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
8bf93c29ce
do not loose trailing space when asking uid
2003-01-20 17:55:31 +00:00
schweikh
fec6546e12
english(4) police.
2002-12-27 12:15:40 +00:00
ru
041d1287e8
Uniformly refer to a file system as "file system".
...
Approved by: re
2002-12-12 17:26:04 +00:00
tjr
c8d9479442
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
00db9b790a
mdoc(7) police: overhaul.
...
Approved by: re
2002-12-04 14:44:20 +00:00
scottl
fb2ab15ed1
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
fef14a0ffe
mdoc(7) police: markup fixes.
...
Approved by: re
2002-11-27 15:31:08 +00:00
fanf
739da07270
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
049cb2e956
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
d2168fe021
The .Nm utility
2002-07-14 14:47:15 +00:00
yar
b4afbb7b01
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
0355f3828e
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
261a4fd963
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
a2c8c06218
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
35ba356060
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
cf51333427
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
ru
7aa3bf6364
yp(4) -> yp(8).
...
PR: docs/30797
2002-01-14 16:59:03 +00:00
wosch
8cd6119330
Remove myself as maintainer, I don't have free time for adduser anymore.
2002-01-13 11:54:48 +00:00
yar
53c5b2a4bc
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
yar
785abe2b67
Document a new option: -force.
2002-01-02 19:01:53 +00:00
yar
41aa6c5873
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
yar
205784642b
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
yar
556b4b94e1
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
yar
2e8685abef
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
yar
a26056ca75
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
dd
ea699b6bd4
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
dd
b18f165e40
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
ru
24c7b0a61d
mdoc(7) police: s/BSD/.Bx/ where appropriate.
2001-08-14 10:01:54 +00:00
ghelmer
ec9077022b
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
ghelmer
df24500a50
Install the new password file with pwd_mkdb, not the old one.
...
PR: 29366 (in part)
2001-08-01 15:27:39 +00:00
ghelmer
cc59bc9eba
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
jedgar
87a6c1715d
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
ghelmer
169ada607a
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
dd
a47ce97e79
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
dd
911ca14c87
Remove whitespace at EOL.
2001-07-15 08:06:20 +00:00
ru
0d5f9334cf
mdoc(7) police: removed HISTORY info from the .Os call.
2001-07-10 15:12:08 +00:00
adrian
a27ff43b9a
Fix the rmuser script to correctly determine if a user does not exist.
...
PR: 26674
2001-05-02 13:30:42 +00:00
adrian
df4ead11af
Extend adduser to create "locked" accounts. Adduser can now lock an
...
account at creation, create accounts with a "*" password (so you can
use alternate authentication schemes without fearing a "default" password
biting you later), and blank passwords.
Yes, adduser could create a blank password account, but this makes it
slightly more difficult to shoot yourself in the foot.
The /etc/adduser.conf entries are:
# use password-based authentication for new users
# defaultusepassword = "yes" | "no"
defaultusepassword = "yes"
# enable account password at creation
# (the password will be prepended with a star if the account isn't enabled)
# defaultenableaccount = "yes" | "no"
defaultenableaccount = "yes"
# allow blank passwords
# defaultemptypassword = "yes" | "no"
defaultemptypassword = "no"
Requested by: alfred
Reviewed by: alfred
2001-05-02 13:20:12 +00:00
dougb
7ab9ec9338
By popular demand, have adduser preserve comments at the top of the
...
group file. Because of the way the group sorting works while printing
out the new file it's not possible at this time to restore comments
in other locations, but at least they won't just disappear altogether.
2001-04-17 09:42:07 +00:00
dougb
82c5492b1c
Add a more useful solution to the problem of password files with more than
...
one user who differs only by case. The other perl tools assume (or enforce)
the all lowercase requirement, therefore making the search through
master.passwd case insensitive seemed a reasonable optimization, IMO.
I understand, although I do not sympathize with, the argument that someone
might want to do this on purpose, and might subsequently want to use the
wrong tool for the job. So, this fix should hopefully satisfy both camps.
2001-04-15 20:43:49 +00:00
obrien
c96b30ff9c
Rev 1.11 introduced a bug where the processing became case insensative for
...
username to rm.
PR: 25961
Submitted by: Linh Pham <lplist@closedsrc.org>
2001-04-15 20:01:02 +00:00
ru
ef2dbc1fb0
beforeinstall -> SCRIPTS.
2001-04-07 11:21:35 +00:00
ru
afd506414e
- Backout botched attempt to introduce MANSECT feature.
...
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
ru
66cd8f698e
mdoc(7) police: split punctuation characters + misc fixes.
2001-02-01 16:44:04 +00:00
ru
ffef081534
Prepare for mdoc(7)NG.
2001-01-16 09:39:23 +00:00
ru
4bb5f49662
Prepare for mdoc(7)NG.
2000-12-27 15:30:30 +00:00
dougb
50b480af64
* Fix a long line that I introduced in the last commit
...
* Backslash escape non-alphanumeric chars in the login name so that perl
doesn't choke on things like '$'.
2000-12-17 23:42:45 +00:00
ru
c23c39b3a4
mdoc(7) police: removed history info from the .Os FreeBSD call.
2000-12-14 11:52:05 +00:00
dougb
f39cd3c47c
If a user is in the database, rmuser ought to be able to remove them.
...
Address this by using getpwnam(), thus killing several birds with
the same stone. My fix is slightly more aggressive than the
originators. :)
PR: misc/22278
2000-11-21 05:52:35 +00:00
ru
71e2293ad4
mdoc(7) police: use the new features of the Nm macro.
2000-11-20 20:10:44 +00:00
ru
a6f5d950d8
Avoid use of direct troff requests in mdoc(7) manual pages.
2000-11-10 17:46:15 +00:00
gshapiro
2424c7393a
Complete migration of aliases file to /etc/mail/aliases.
...
The maintainers of share/examples/diskless/README.TEMPLATING and mergemaster
have been contacted so those may be updated as well.
2000-08-13 18:38:58 +00:00
newton
9c8660d95b
Un-botch my botched reduction in permitted characters in the permitted
...
username check which resulted from my attempt to expand them.
PR: bin/17372
Reviewed by: sheldonh
2000-03-14 14:27:34 +00:00
newton
c379f94f99
Fix the case where username validity test would incorrectly fail if
...
the specified username contained uppercase alphabetics.
PR: bin/17372
2000-03-14 14:19:17 +00:00
sheldonh
4402d054c2
Remove more single-space hard sentence breaks.
2000-03-06 09:45:37 +00:00
sheldonh
b2240fc1c0
Remove single-space hard sentence breaks. These degrade the quality
...
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 14:09:25 +00:00
peter
efabb9ccb1
$Id$ -> $FreeBSD$
1999-08-28 01:35:59 +00:00
nik
2ef203d08a
Remove references to the non-existent addgroup(8) and rmgroup(8)
...
commands.
PR: docs/12659
Submitted by: Mark Diekhans <markd@Grizzly.COM>
1999-07-27 18:22:18 +00:00
kris
c9ebcf4453
Grammar and spelling fixes
...
Obtained from: OpenBSD
1999-06-30 12:49:56 +00:00
wosch
09f406ace9
Added myself as maintainer.
1999-02-09 17:23:03 +00:00
danny
dd8cc45b89
Print yyyy/mm/dd in /var/log/adduser, instead of yy/mm/dd
...
Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
1999-01-15 10:26:59 +00:00
wosch
0ab7b3047c
Removing -batch option from adduser. Adduser was written as
...
an *interactive* command for newbies. The pw(8) does now a much better
job for adding users from command line. Also, the -batch option is
not well tested, buggy and unsupported.
1998-08-17 18:50:29 +00:00
wosch
d0c6f6771a
Always ask for homedir.
...
PR: 6754
Submitted by: uhlar@netlab.sk
1998-06-07 18:38:32 +00:00
hoek
e46f4af1d6
MF22: Remove confusing comma
1998-03-18 16:21:55 +00:00
steve
b0853d61f8
Clarify the -batch arguments.
...
PR: 5677
Submitted by: Adrian Filipi-Martin <adrian@virginia.edu>
1998-02-14 22:55:23 +00:00
wosch
91b3d9af94
Typo.
1998-02-02 15:46:44 +00:00
wosch
b1ce14e5be
Rename the pwd_mkdb(8) option '-c' to '-C' for better compatiblity
...
with BSD/OS.
1998-01-10 17:27:28 +00:00
wosch
12904d6220
Small bugfix: store $uid_start instead hard coded value 1000
...
in /etc/adduser.conf.
1997-12-24 11:44:14 +00:00
jraynard
8df776813b
Typo alert.
1997-11-02 00:58:39 +00:00
wosch
5d81cfe470
Do not complain about non existing shell "/nonexistent"
...
Smarter error check if a uid is already in use.
Submitted by: "Eugene Radchenko" <genie@qsar.chem.msu.su>
1997-09-20 19:59:54 +00:00
wosch
49f61b81da
Do not accept empty user names.
1997-09-20 18:26:22 +00:00
charnier
1d1202127b
Cosmetic changes.
1997-09-01 06:14:17 +00:00
wosch
ab42389908
Stop the growing list of shells if /etc/adduser.conf
...
was updated.
1997-08-26 22:47:51 +00:00
pst
8cf1034c39
Nologin is also a valid 'invalid' shell
1997-07-31 15:25:35 +00:00
wosch
4479faef61
Delete dead test code.
1997-07-24 17:44:46 +00:00
wosch
3cd604941d
cp -r' ->
cp -R'
...
Option -r is obsolete and buggy.
1997-07-18 12:05:43 +00:00
pst
24cef30af2
Remove addgroup/rmgroup -- they are completely replaced by pw(1).
...
Adduser/rmuser stay for now until we get a good user-friendly front-end
for pw.
1997-07-05 19:12:45 +00:00
steve
f8049f60d8
Fix a minor nit in the .Dd macro invocation so that
...
the revision date is displayed correctly.
1997-06-23 04:52:13 +00:00
ache
cafbf0bee1
Change "no" answer to "default" for login class, because "no" class
...
can exists and "default" class is really equal to empty class.
1997-05-01 23:34:25 +00:00
ache
45a60a248c
Allow "no" answer on login class prompt override non-empty
...
/etc/adduser.conf defaultclass with empty one
1997-05-01 23:23:06 +00:00
ache
2fc70f71f0
1. Deal with login classes now
...
2. Turn on send_message by default for security reasons (mailbox
must be pre-created)
1997-05-01 22:55:58 +00:00
wosch
87ae550b26
Variable name typo.
...
Reviewed by: Guy Helmer <ghelmer@cs.iastate.edu
Submitted by: Paul Sandys <myj@nyct.net>
1997-04-02 14:34:57 +00:00
wosch
01b8721dc8
Support comments in password database (/etc/master.passwd).
...
Comments in group database (/etc/group) are currently not
supported - adduser silently delete blank lines and comments.
1997-03-09 12:21:45 +00:00
wosch
bcdd2f8a77
Cleaned up some messages, added a check to remove a leftover popd file
...
from /var/mail, added a routine to delete the removed user's files
from /tmp, /var/tmp, & /var/tmp/vi.recover, and added code to kill any
running processes owned by the removed user). I've also added a flag
for non-interactive execution, cleaned up the man page, and adjusted
my address.
Submitted by: ghelmer@cs.iastate.edu (Guy Helmer)
1997-03-08 18:04:45 +00:00
peter
b782f4df30
Revert $FreeBSD$ to $Id$
1997-02-22 16:15:28 +00:00