summaryrefslogtreecommitdiffstats
path: root/adduser/adduser.sh
Commit message (Collapse)AuthorAgeFilesLines
* Fix PREFIX logicCameron Katri2022-01-021-1/+1
|
* adduser rmuser: Customizable prefixCameron Katri2021-08-281-16/+16
|
* Recommit everything, add chpass, improve history (except for a few files ↵Cameron Katri2021-05-021-1/+1
| | | | that git-filter-repo dislikes for some reason [_secure_path.c and login_cap.h])
* adduser: allow standard IFS characters in passwordsKyle Evans2020-04-051-2/+2
| | | | | | | | | | | | | | | Notably, the default IFS contains space/tab, thus any leading/trailing whitespace characters tend to be removed. Set IFS= for just the read lines to mitigate this, allowing the user to be less surprised when their leading/trailing spaces weren't actually captured in the password as they are with other means of setting a user's password. PR: 245342 Submitted by: dereks_lifeofadishwasher.com Reviewed by: jilles MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24292
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended.
* When using uidstart in /etc/adduser.conf, get the nextDaniel Eischen2012-02-251-0/+1
| | | | | | | | available user id and show it in the "Uid [xxx]" prompt. PR: 163863 Submitted by: Moritz Wilhelmy (mw at wzff dot de) MFC after: 2 weeks
* Spelling fixes for usr.sbin/Ulrich Spörlein2011-12-301-0/+1050
|
* Create the altix project branch. The altix project will add supportMarcel Moolenaar2010-03-101-1050/+0
| | | | | | | for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting is a two-module system, consisting of a base compute module and a CPU expansion module. SGI's NUMAFlex architecture can be an excellent platform to test CPU affinity and NUMA-aware features in FreeBSD.
* Fix a few whitespace issues and comment typos that I found while readingJoel Dahl2010-01-141-11/+9
| | | | through this file.
* Add the -M command-line option, which will set home directory permissions.Mike Makonnen2008-01-271-1/+40
| | | | | | | | Works both in interactive or batch mode. This is a heavily modified version of the patch submitted in the PR. PR: bin/105060 MFC after: 1 week
* Allow adding a user(s) to additional groups in batch mode as well.Mike Makonnen2007-10-201-0/+1
| | | | | Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> (modulo minor changes) MFC after: 2 weeks
* There are a couple of bugs in rev. 1.27:Mike Makonnen2007-04-121-7/+2
| | | | | | | | | | | | | | | | | | | 1) The man page should describe the code, not the other way around. 2) Internal variables should not be documented or exposed, except in controlled circumstances (i.e. - That's what the -C flag is for). The variable should have been saved to the config file in save_config(). 3) The next available userid doesn't get automatically updated. The end-result is the same (user gets added with the correct uid), but in an interactive session the default uid doesn't get updated in the display. So, o Use the uidstart variable instead of uuid (bug #3) o Actually save the variable to adduser.conf (bug #2) o (bug #1 to be fixed in an upcomming commit to adduser.conf.5) MFC After: 2 weeks
* Errm... I don't see how rev. 1.26 could have possibly worked or been tested.Mike Makonnen2007-04-121-12/+13
| | | | | | | Fix it for real. Submitted by: Johnny Lee <johnny@bmtk.com> MFC After: 2 weeks
* Check if the new user already exists right after entering theLukas Ertl2007-03-261-2/+8
| | | | username instead of watching the final call to pw(8) fail.
* Honour the "uuid" directive in adduser.confMatteo Riondato2006-01-221-1/+4
| | | | | | PR: conf/87914 Approved by: philip (mentor) MFC after: 3 days
* - Act according to the documentation (man page):Robert Drehmel2005-04-281-2/+1
| | | | | | | | | When adding users from a preformatted file, do not exit silently when empty lines or lines starting with a '#' are encountered - ignore them instead. - Fix a spelling error in a comment. PR: bin/80058
* In fullpath_from_shell(), move the nologin detection before the cat | whilePeter Pentchev2004-09-231-7/+11
| | | | | | | | | 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
* Also, match the full path to the special nologin shell.Mike Makonnen2004-08-281-1/+2
| | | | | | | | | | 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.
* Accept full path names in addition to base names for shells.Mike Makonnen2004-06-061-3/+5
| | | | | Make explicit in the documentation that valid shells need to be supplied only if the -S option is not given.
* Sychronize with reality: nologin(8) is now in /usr/sbinColin Percival2004-03-301-3/+3
| | | | Reminded by: trhodes
* o Add an -S option to not attempt to ascertain the validity of a shell.Mike Makonnen2004-03-161-11/+40
| | | | | | | 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.
* Typo.Mike Makonnen2003-06-241-1/+1
| | | | | | This has worked so far because the variable was empty by default. Submitted by: Kostyuk Oleg <cub@cub.org.ua>
* s/warn/info/Mike Makonnen2003-06-201-1/+1
|
* Add support for the special shell nologin.Mike Makonnen2003-06-201-5/+42
| | | | Prodded by: mikeh
* Update my email address.Mike Makonnen2003-06-201-1/+1
|
* Don't forget the -r on the second password prompt.Mike Makonnen2003-06-201-1/+1
| | | | PR: bin/53550
* Document the -g option in the usage message.Mike Makonnen2003-03-231-0/+1
| | | | Approved by: markm (mentor)(implicit)
* Add a -g option to specify a default login group.Mike Makonnen2003-03-201-9/+13
| | | | Approved by: markm (mentor)(implicit)
* o initialize a couple of local flags so the user can re-edit groupsMike Makonnen2003-03-191-2/+8
| | | | | | | | 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)
* Update copyright.Mike Makonnen2003-02-161-3/+1
|
* Revisit the shell special characters issue and settle it once-and-forall.Mike Makonnen2003-02-091-13/+19
| | | | | | | | 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>
* Change the behaviour of adduser to match the previous incarnation a little more.Adrian Chadd2003-02-081-2/+26
| | | | | | | | | | | | | 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
* back out logging to /var/log/adduserMax Khon2003-01-241-6/+0
| | | | (/usr/sbin/pw already logs to /var/log/userlog)
* In interactive mode, ask the user if he/she wants to add anotherMike Makonnen2003-01-241-0/+18
| | | | | | | | user and re-run interactive questions or quit depending on the answer. Submitted by: Scot Hetzel <hetzels@westbend.net> Approved by: markm (mentor)
* - restore an ability to write log of added users (default toMax Khon2003-01-231-3/+13
| | | | | | | /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)
* *blush*Mike Makonnen2003-01-231-8/+8
| | | | | | | While I'm here properly quote all the other input I neglected to quote. Approved by: markm (mentor)(implicit)
* Don't forget to properly quote input.Mike Makonnen2003-01-211-1/+1
| | | | | Approved by: markm (mentor)(implicit) Submitted by: Robin Breathe <robin@isometry.net>
* do not loose trailing space when asking uidMax Khon2003-01-201-1/+1
|
* Replace the perl versions of adduser and rmuser with shell script versions.Scott Long2002-12-031-0/+874
| | | | | Submitted by: Mike Makonnen <mtm@identd.net> Approved by: re
* recording cvs-1.6 file deathPeter Wemm1995-12-301-195/+0
|
* Yet one cleanupAndrey A. Chernov1994-12-301-0/+195