diff options
| author | Wolfram Schneider <wosch@FreeBSD.org> | 1996-06-12 00:03:35 +0000 |
|---|---|---|
| committer | Wolfram Schneider <wosch@FreeBSD.org> | 1996-06-12 00:03:35 +0000 |
| commit | a01916a698a960e4dbfe9482504fdcc16fa56c4c (patch) | |
| tree | b3e2b0a3905c6fa97bb4b86922648942888f3768 /usr.sbin/adduser | |
| parent | 8704e4dc1f129af55b6f31f884a3ee3c80835d8c (diff) | |
Notes
Diffstat (limited to 'usr.sbin/adduser')
| -rw-r--r-- | usr.sbin/adduser/adduser.8 | 27 | ||||
| -rw-r--r-- | usr.sbin/adduser/adduser.perl | 14 |
2 files changed, 28 insertions, 13 deletions
diff --git a/usr.sbin/adduser/adduser.8 b/usr.sbin/adduser/adduser.8 index a7959cf38462..eeed67104411 100644 --- a/usr.sbin/adduser/adduser.8 +++ b/usr.sbin/adduser/adduser.8 @@ -28,11 +28,7 @@ .\" .\" /usr/sbin/adduser - add new user(s) .\" -.\" Bugs: sure (my English!) -.\" Email: Wolfram Schneider <wosch@cs.tu-berlin.de> -.\" -.\" $Id: adduser.8,v 1.7 1995/03/08 22:44:35 ache Exp $ -.\" +.\" $Id: adduser.8,v 1.9 1996/06/09 20:45:35 wosch Exp $ .Dd Jan, 9, 1995 .Dt ADDUSER 8 @@ -59,7 +55,21 @@ HOME-directory, dotfiles and send new user a welcome message. .Sh RESTRICTION .Bl -tag -width Ds -compact .It Sy username -Login name. Only lowercase characters or digits. +Login name. Only lowercase characters or digits. Maximum length +is 8 characters (see +.Xr setlogin 2 +BUGS section). +The reasons for this limit is "Historical". +Given that people have traditionally wanted to break this +limit for aesthetic reasons, it's never been of great importance to break +such a basic fundamental parameter in UNIX. +You can change UT_NAMESIZE in /usr/include/utmp.h and recompile the +world; people have done this and it works, but you will have problems +with any precompiled programs, or source that assumes the 8-character +name limit and NIS. The NIS protocol mandates an 8-character username. +If you need a longer login name for e-mail addresses, +you can define an alias in +.Pa /etc/aliases . .It Sy fullname Firstname and surname. .Ql Pa \: @@ -225,6 +235,8 @@ logfile for adduser .Xr chpass 1 , .Xr finger 1 , .Xr passwd 1 , +.Xr setlogin 2 , +.Xr yp 4 , .Xr aliases 5 , .Xr passwd 5 , .Xr group 5 , @@ -238,6 +250,3 @@ logfile for adduser The .Nm command appeared in FreeBSD 2.1 - -.\" .Sh AUTHOR -.\" Wolfram Schneider, Berlin diff --git a/usr.sbin/adduser/adduser.perl b/usr.sbin/adduser/adduser.perl index 7dab377909a1..6d46f421f2ca 100644 --- a/usr.sbin/adduser/adduser.perl +++ b/usr.sbin/adduser/adduser.perl @@ -32,7 +32,7 @@ # # Email: Wolfram Schneider <wosch@cs.tu-berlin.de> # -# $Id: adduser.perl,v 1.7.4.1 1995/10/19 06:29:30 jkh Exp $ +# $Id: adduser.perl,v 1.11 1996/05/06 06:15:19 gclarkii Exp $ # # read variables @@ -56,9 +56,9 @@ sub variables { # List of directories where shells located @path = ('/bin', '/usr/bin', '/usr/local/bin'); # common shells, first element has higher priority - @shellpref = ('bash', 'tcsh', 'ksh', 'csh', 'sh'); + @shellpref = ('csh', 'sh', 'bash', 'tcsh', 'ksh'); - $defaultshell = 'bash'; # defaultshell if not empty + $defaultshell = 'sh'; # defaultshell if not empty $group_uniq = 'USER'; $defaultgroup = $group_uniq;# login groupname, $group_uniq means username @@ -938,7 +938,13 @@ sub home_create { return 0; } - return mkdir("$homedir",0755) if $dotdir eq "no"; + if ($dotdir eq 'no') { + if (!mkdir("$homedir",0755)) { + warn "mkdir $homedir: $!\n"; return 0; + } + system 'chown', "$name:$group", $homedir; + return !$?; + } # copy files from $dotdir to $homedir # rename 'dot.foo' files to '.foo' |
