aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/adduser/adduser.perl
Commit message (Collapse)AuthorAgeFilesLines
* Replace the perl versions of adduser and rmuser with shell script versions.Scott Long2002-12-031-1558/+0
| | | | | | | | Submitted by: Mike Makonnen <mtm@identd.net> Approved by: re Notes: svn path=/head/; revision=107543
* Fix conjugation of exists and add full stops to the messages I changed.David Malone2002-08-111-2/+2
| | | | | | | | | PR: 38481 Submitted by: Kevin Kinsey <kadmin@elisha.daleco.biz> MFC after: 1 week Notes: svn path=/head/; revision=101698
* Keep similar things together: Check for too long usernamesYaroslav Tykhiy2002-01-281-4/+3
| | | | | | | inside the function that verifies username validity. Notes: svn path=/head/; revision=89926
* Disallow adding duplicate roots, toors, or other users w/uid 0.Yaroslav Tykhiy2002-01-281-1/+1
| | | | | | | | | | Previously, a truth check instead if defined() check erroneously allowed that. PR: bin/8745 Notes: svn path=/head/; revision=89923
* Implement a flexible way of letting some unusual charactersYaroslav Tykhiy2002-01-281-6/+38
| | | | | | | | | | | into usernames: Make the regular expression to check usernames against configurable. PR: bin/22860 bin/31049 Reviewed by: sheldonh Notes: svn path=/head/; revision=89922
* Remove the newly added -force option because it made adduser(8)Yaroslav Tykhiy2002-01-281-21/+2
| | | | | | | | | | 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. Notes: svn path=/head/; revision=89921
* Add `-h' to the chown command so that symbolic links copied fromIan Dowse2002-01-201-1/+1
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=89586
* Oops, missed one point where $pwd_mkdb had been used.Yaroslav Tykhiy2002-01-041-1/+1
| | | | | | | | Now it should be @pwd_mkdb since we moved to Perl's safe system() not using /bin/sh. Notes: svn path=/head/; revision=88888
* Allow weird characters in usernames if an admin persists on that:Yaroslav Tykhiy2002-01-021-8/+27
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=88827
* Be consistent in what restriction is imposed on a usernameYaroslav Tykhiy2002-01-021-2/+4
| | | | | | | in the code and what the warning message reads. Notes: svn path=/head/; revision=88817
* Forbid adding duplicate users with the name of "0".Yaroslav Tykhiy2002-01-021-2/+2
| | | | | | | | Previously, it was possible due to 0 and "0" being equivalent in Perl. Notes: svn path=/head/; revision=88815
* Print the correct filename if we fail to open $etc_passwd.Dima Dorfman2001-09-061-1/+1
| | | | | | | Submitted by: Brian Poole <raj@cerias.purdue.edu> Notes: svn path=/head/; revision=83149
* Pass the username we just made to pwd_mkdb so that the latter doesn'tDima Dorfman2001-08-201-3/+4
| | | | | | | | | | have to regenerate the entire database. PR: 25798 Submitted by: Domas Mituzas <domas.mituzas@delfi.lt> Notes: svn path=/head/; revision=81938
* Generate a bigger salt. This is necessary for blowfish to workDima Dorfman2001-07-191-1/+1
| | | | | | | | | | properly, and doesn't hurt the other algorithms. PR: 28991 Submitted by: Yoshihiro Koya <Yoshihiro.Koya@math.yokohama-cu.ac.jp> Notes: svn path=/head/; revision=79955
* Extend adduser to create "locked" accounts. Adduser can now lock anAdrian Chadd2001-05-021-15/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=76206
* By popular demand, have adduser preserve comments at the top of theDoug Barton2001-04-171-2/+10
| | | | | | | | | 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. Notes: svn path=/head/; revision=75581
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50479
* Grammar and spelling fixesKris Kennaway1999-06-301-5/+5
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=48371
* Print yyyy/mm/dd in /var/log/adduser, instead of yy/mm/ddDaniel O'Callaghan1999-01-151-1/+2
| | | | | | | Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au> Notes: svn path=/head/; revision=42692
* Removing -batch option from adduser. Adduser was written asWolfram Schneider1998-08-171-63/+6
| | | | | | | | | 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. Notes: svn path=/head/; revision=38406
* Always ask for homedir.Wolfram Schneider1998-06-071-11/+38
| | | | | | | | PR: 6754 Submitted by: uhlar@netlab.sk Notes: svn path=/head/; revision=36736
* Rename the pwd_mkdb(8) option '-c' to '-C' for better compatiblityWolfram Schneider1998-01-101-2/+2
| | | | | | | with BSD/OS. Notes: svn path=/head/; revision=32397
* Small bugfix: store $uid_start instead hard coded value 1000Wolfram Schneider1997-12-241-2/+2
| | | | | | | in /etc/adduser.conf. Notes: svn path=/head/; revision=31965
* Do not complain about non existing shell "/nonexistent"Wolfram Schneider1997-09-201-3/+6
| | | | | | | | | Smarter error check if a uid is already in use. Submitted by: "Eugene Radchenko" <genie@qsar.chem.msu.su> Notes: svn path=/head/; revision=29645
* Do not accept empty user names.Wolfram Schneider1997-09-201-2/+2
| | | | Notes: svn path=/head/; revision=29644
* Stop the growing list of shells if /etc/adduser.confWolfram Schneider1997-08-261-4/+4
| | | | | | | was updated. Notes: svn path=/head/; revision=28812
* Nologin is also a valid 'invalid' shellPaul Traina1997-07-311-2/+2
| | | | Notes: svn path=/head/; revision=27807
* Delete dead test code.Wolfram Schneider1997-07-241-13/+1
| | | | Notes: svn path=/head/; revision=27656
* `cp -r' -> `cp -R'Wolfram Schneider1997-07-181-2/+2
| | | | | | | Option -r is obsolete and buggy. Notes: svn path=/head/; revision=27505
* Change "no" answer to "default" for login class, because "no" classAndrey A. Chernov1997-05-011-3/+3
| | | | | | | can exists and "default" class is really equal to empty class. Notes: svn path=/head/; revision=25373
* Allow "no" answer on login class prompt override non-emptyAndrey A. Chernov1997-05-011-2/+3
| | | | | | | /etc/adduser.conf defaultclass with empty one Notes: svn path=/head/; revision=25372
* 1. Deal with login classes nowAndrey A. Chernov1997-05-011-10/+29
| | | | | | | | 2. Turn on send_message by default for security reasons (mailbox must be pre-created) Notes: svn path=/head/; revision=25371
* Support comments in password database (/etc/master.passwd).Wolfram Schneider1997-03-091-1/+9
| | | | | | | | Comments in group database (/etc/group) are currently not supported - adduser silently delete blank lines and comments. Notes: svn path=/head/; revision=23573
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22997
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Allow dash `-' (except for first char) and underscore `_' in usernames.Wolfram Schneider1996-12-291-3/+3
| | | | | | | pointed out by: max Notes: svn path=/head/; revision=21031
* remove group limits checksWolfram Schneider1996-12-291-10/+1
| | | | Notes: svn path=/head/; revision=21023
* Minor style fixes.Mike Pritchard1996-12-231-3/+3
| | | | | | | | | I also renamed the adduser "-quit" option to "-quiet", since it is supposed to be the same as the -s/-silent option, and -quit must have beena typo. Notes: svn path=/head/; revision=20826
* Expand username limit to 16Andrey A. Chernov1996-12-071-4/+4
| | | | Notes: svn path=/head/; revision=20196
* Don't show on the screen just securely entered passwordAndrey A. Chernov1996-11-271-3/+3
| | | | | | | | (in /etc/adduser.message text) Sending password by E-mail on local machine is joke in any case Notes: svn path=/head/; revision=19987
* do not print 'illegal shell' for pseudo users news and xtenWolfram Schneider1996-11-201-2/+2
| | | | | | | Submitted by: kuku Notes: svn path=/head/; revision=19890
* warn if reach group line limit (>200 users, >1024 bytes per line)Wolfram Schneider1996-09-171-1/+10
| | | | | | | | | close PR#1595 suggested by: Seppo Kallio <kallio@beeblebrox.cc.jyu.fi Notes: svn path=/head/; revision=18332
* Do not backup master.passwd if pwd_mkdb returned an error. ThisWolfram Schneider1996-09-141-13/+3
| | | | | | | | | | was to paranoid, pwd_mkdb(8) is carefully enough to not corrupt master.passwd on failure. Submitted by: joerg Notes: svn path=/head/; revision=18302
* Make passwords no longer echo or display. Because of this, we now alsoJordan K. Hubbard1996-09-111-4/+16
| | | | | | | | | | ask for matching confirmation. I'm sure there is a clever direct-from-perl ioctl way of putting the terminal into noecho mode, but I don't feel like learning perl so I just used system. [yes, I'll put stty on the installation boot floppy as necessary] Notes: svn path=/head/; revision=18243
* typo policeAdam David1996-08-281-16/+17
| | | | | | | | | | | I couldn't make any sense of the sentence "Eval variables in this file." so I left it alone. also allow creation of new local group when NIS groups are used. this can probably be done more elegantly, and needs more thought. Notes: svn path=/head/; revision=17866
* sync copyright with /usr/share/examples/etc/bsd-style-copyrightWolfram Schneider1996-08-271-26/+16
| | | | Notes: svn path=/head/; revision=17849
* run pwd_mkdb with new check option [-c] to verify correctnessWolfram Schneider1996-08-201-2/+2
| | | | | | | of /etc/master.passwd Notes: svn path=/head/; revision=17714
* Do not add an user to a group if the group is also the login group.Wolfram Schneider1996-08-141-11/+14
| | | | Notes: svn path=/head/; revision=17598
* Do not send "welcome mail" as default. If you want this featureWolfram Schneider1996-08-131-4/+8
| | | | | | | | | you can still enable it. Better, use mail client like elm or pine. Requested by: Jordan Notes: svn path=/head/; revision=17590
* We DON'T ship bash by default, why is it the default shell?Gary Clark II1996-05-061-3/+3
| | | | | | | | | We also don't ship tcsh or ksh by default. Correct these two things to make sh the default and increase csh and sh to be higher priority. Notes: svn path=/head/; revision=15649