summaryrefslogtreecommitdiffstats
path: root/adduser/adduser.perl
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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
* Be consistent in what restriction is imposed on a usernameYaroslav Tykhiy2002-01-021-2/+4
| | | | in the code and what the warning message reads.
* 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.
* 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>
* 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>
* 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>
* 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
* 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.
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
|
* Grammar and spelling fixesKris Kennaway1999-06-301-5/+5
| | | | Obtained from: OpenBSD
* 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>
* 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.
* Always ask for homedir.Wolfram Schneider1998-06-071-11/+38
| | | | | PR: 6754 Submitted by: uhlar@netlab.sk
* Rename the pwd_mkdb(8) option '-c' to '-C' for better compatiblityWolfram Schneider1998-01-101-2/+2
| | | | with BSD/OS.
* Small bugfix: store $uid_start instead hard coded value 1000Wolfram Schneider1997-12-241-2/+2
| | | | in /etc/adduser.conf.
* 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>
* Do not accept empty user names.Wolfram Schneider1997-09-201-2/+2
|
* Stop the growing list of shells if /etc/adduser.confWolfram Schneider1997-08-261-4/+4
| | | | was updated.
* Nologin is also a valid 'invalid' shellPaul Traina1997-07-311-2/+2
|
* Delete dead test code.Wolfram Schneider1997-07-241-13/+1
|
* `cp -r' -> `cp -R'Wolfram Schneider1997-07-181-2/+2
| | | | Option -r is obsolete and buggy.
* 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.
* Allow "no" answer on login class prompt override non-emptyAndrey A. Chernov1997-05-011-2/+3
| | | | /etc/adduser.conf defaultclass with empty one
* 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)
* 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.
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
|
* 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.
* Allow dash `-' (except for first char) and underscore `_' in usernames.Wolfram Schneider1996-12-291-3/+3
| | | | pointed out by: max
* remove group limits checksWolfram Schneider1996-12-291-10/+1
|
* 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.
* Expand username limit to 16Andrey A. Chernov1996-12-071-4/+4
|
* 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
* do not print 'illegal shell' for pseudo users news and xtenWolfram Schneider1996-11-201-2/+2
| | | | Submitted by: kuku
* 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
* 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
* 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]
* 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.
* sync copyright with /usr/share/examples/etc/bsd-style-copyrightWolfram Schneider1996-08-271-26/+16
|
* run pwd_mkdb with new check option [-c] to verify correctnessWolfram Schneider1996-08-201-2/+2
| | | | of /etc/master.passwd
* Do not add an user to a group if the group is also the login group.Wolfram Schneider1996-08-141-11/+14
|
* 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
* 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.
* Submitted by: Masafumi NAKANE <masafumi@tky007.tth.expo96.ad.jp>Wolfram Schneider1996-02-101-2/+8
| | | | bugfix: chown home directory if don't copy dotfiles
* Clean up some of the english here..Jordan K. Hubbard1995-10-221-10/+10
|
* Various fixes to make this work better when called from other tools.Jordan K. Hubbard1995-10-191-2/+14
| | | | Submitted by: Coranth Gryphon <gryphon@healer.com> & Wolfram Schneider <wosch@cs.tu-berlin.de>
* The problem is the returned salt, while the freebsd man pages asks that theJordan K. Hubbard1995-05-201-2/+2
| | | | | | crypt salt string begin with a '_', no other crypt's do. If you remove the initialization of $salt to '_' in sub salt(), everything works as advertised. Submitted by: Charles Henrich <henrich@crh.cl.msu.edu>
* Don't accept usernames longer than 8 charactersAndrey A. Chernov1995-04-301-1/+5
| | | | Submitted by: Wolfram Schneider <wosch@cs.tu-berlin.de>
* Non-blocking lockAndrey A. Chernov1995-04-091-13/+20
| | | | | Remove old salt cause possible endless loop Submitted by: <wosch@cs.tu-berlin.de>
* o more optionsAndrey A. Chernov1995-03-081-562/+941
| | | | | | | | | | | o less restrictive, you can choise uid, gid ... o invite user into some groups o encrypted passwords with crypt o batch mode (for instance, this works now: $ adduser -batch jkh guest,uuadmin "Jordan K. Hubbard" passwd see manpage for more details) Submitted by: Wolfram Schneider <wosch@cs.tu-berlin.de>