mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-01 00:18:15 +01:00
typo police
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.
This commit is contained in:
parent
d42c2de85c
commit
718737f0fb
@ -22,7 +22,7 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id: adduser.8,v 1.10 1996/08/23 00:55:35 mpp Exp $
|
||||
.\" $Id: adduser.8,v 1.11 1996/08/27 20:04:33 wosch Exp $
|
||||
|
||||
.Dd Jan, 9, 1995
|
||||
.Dt ADDUSER 8
|
||||
@ -42,9 +42,9 @@
|
||||
|
||||
.Sh DESCRIPTION
|
||||
.Nm Adduser
|
||||
is a simple program for adding new users. Adduser check
|
||||
passwd, group and shell database. It create passwd/group entry,
|
||||
HOME-directory, dotfiles and send new user a welcome message.
|
||||
is a simple program for adding new users. Adduser checks
|
||||
passwd, group and shell database. It creates passwd/group entry,
|
||||
HOME-directory, dotfiles and sends new user a welcome message.
|
||||
|
||||
.Sh RESTRICTION
|
||||
.Bl -tag -width Ds -compact
|
||||
@ -53,7 +53,7 @@ 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".
|
||||
The reasons for this limit are "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.
|
||||
@ -71,24 +71,24 @@ not allowed.
|
||||
.It Sy shell
|
||||
Only valid shells from shell database or sliplogin and pppd
|
||||
.It Sy uid
|
||||
Automatically generated or your choice. Less than 32000.
|
||||
Automatically generated or your choice, less than 32000.
|
||||
.It Sy gid/login group
|
||||
Your choice or automatically generated.
|
||||
.It Sy password
|
||||
If not empty password is encoded with crypt.
|
||||
If not empty, password is encoded with crypt.
|
||||
.El
|
||||
|
||||
.Sh UNIQ GROUP
|
||||
Perhaps your missing what *can* be done with this scheme that falls apart
|
||||
.Sh UNIQUE GROUP
|
||||
Perhaps you're missing what *can* be done with this scheme that falls apart
|
||||
with most other schemes. With each user in his/her own group the user can
|
||||
safely run with a umask of 002 and have files created in there home directory
|
||||
safely run with a umask of 002 and have files created in their home directory
|
||||
and not worry about others being able to read them.
|
||||
|
||||
For a shared area you create a separate uid/gid (like cvs or ncvs on freefall),
|
||||
you place each person that should be able to access this area into that new
|
||||
group.
|
||||
|
||||
This model of uid/gid administration allows far greater flexibility that lumping
|
||||
This model of uid/gid administration allows far greater flexibility than lumping
|
||||
users into groups and having to muck with the umask when working in a shared
|
||||
area.
|
||||
|
||||
@ -119,15 +119,15 @@ Create new config and message file and exit.
|
||||
.It Sy -dotdir Ar directory
|
||||
Copy files from
|
||||
.Ar directory
|
||||
into the HOME-directory of new users.
|
||||
into the HOME-directory of new users,
|
||||
.Ql Pa dot.foo
|
||||
files renamed to
|
||||
.Ql Pa .foo
|
||||
.Ql Pa .foo .
|
||||
Don't copy files if
|
||||
.Ar directory
|
||||
equal with
|
||||
.Ar no
|
||||
For security make a all files writable and readable for owner,
|
||||
.Ar no .
|
||||
For security make all files writable and readable for owner,
|
||||
don't allow group or world to write files and allow only owner
|
||||
to read/execute/write .rhost, .Xauthority, .kermrc, .netrc, Mail,
|
||||
prv, iscreen, term.
|
||||
@ -135,7 +135,7 @@ prv, iscreen, term.
|
||||
.It Sy -group Ar login_group
|
||||
Login group.
|
||||
.Ar USER
|
||||
mean use username as login group.
|
||||
means use username as login group.
|
||||
|
||||
.It Sy -help,-h,-?
|
||||
Print options and exit.
|
||||
@ -148,7 +148,7 @@ Send new users a welcome message.
|
||||
Don't send message if
|
||||
.Ar file
|
||||
equal with
|
||||
.Ar no
|
||||
.Ar no .
|
||||
|
||||
.It Sy -noconfig
|
||||
Do not read config file.
|
||||
@ -177,7 +177,7 @@ is a comment.
|
||||
.P
|
||||
.It Sy config file
|
||||
.Nm Adduser
|
||||
read and write this file.
|
||||
reads and writes this file.
|
||||
See /etc/adduser.conf for more details.
|
||||
.It Sy message file
|
||||
Eval variables in this file. See /etc/adduser.message for more
|
||||
|
@ -24,7 +24,7 @@
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# $Id: adduser.perl,v 1.14 1996/08/20 19:57:23 wosch Exp $
|
||||
# $Id: adduser.perl,v 1.15 1996/08/27 20:04:34 wosch Exp $
|
||||
|
||||
|
||||
# read variables
|
||||
@ -116,10 +116,10 @@ sub shells_read {
|
||||
}
|
||||
}
|
||||
|
||||
# Allow /nonexistant and /bin/date as a valid shell for system utils
|
||||
push(@list, "/nonexistant");
|
||||
# Allow /nonexistent and /bin/date as a valid shell for system utils
|
||||
push(@list, "/nonexistent");
|
||||
push(@shellpref, "no");
|
||||
$shell{"no"} = "/nonexistant";
|
||||
$shell{"no"} = "/nonexistent";
|
||||
|
||||
push(@list, "/bin/date");
|
||||
push(@shellpref, "date");
|
||||
@ -135,7 +135,7 @@ sub shells_add {
|
||||
return 1 unless $verbose;
|
||||
|
||||
foreach $sh (@shellpref) {
|
||||
# all knowned shells
|
||||
# all known shells
|
||||
if (!$shell{$sh}) {
|
||||
# shell $sh is not defined as login shell
|
||||
foreach $dir (@path) {
|
||||
@ -154,7 +154,7 @@ sub shells_add {
|
||||
&append_file($etc_shells, @list) if $#list >= 0;
|
||||
}
|
||||
|
||||
# choise your favourite shell an return the shell
|
||||
# choose your favourite shell and return the shell
|
||||
sub shell_default {
|
||||
local($e,$i,$new_shell);
|
||||
local($sh);
|
||||
@ -217,7 +217,7 @@ sub home_partition_valid {
|
||||
}
|
||||
|
||||
if (-e $h) {
|
||||
warn "$h exist, but is it not a directory or symlink!\n"
|
||||
warn "$h exists, but is not a directory or symlink!\n"
|
||||
unless -d $h || -l $h;
|
||||
warn "$h is not writable!\n"
|
||||
unless -w $h;
|
||||
@ -247,10 +247,10 @@ sub passwd_read {
|
||||
push(@passwd_backup, $_);
|
||||
($p_username, $pw, $p_uid, $p_gid, $sh) = (split(/:/, $_))[0..3,9];
|
||||
|
||||
print "$p_username already exist with uid: $username{$p_username}!\n"
|
||||
print "$p_username already exists with uid: $username{$p_username}!\n"
|
||||
if $username{$p_username} && $verbose;
|
||||
$username{$p_username} = $p_uid;
|
||||
print "User $p_username: uid $p_uid exist twice: $uid{$p_uid}\n"
|
||||
print "User $p_username: uid $p_uid exists twice: $uid{$p_uid}\n"
|
||||
if $uid{$p_uid} && $verbose && $p_uid; # don't warn for uid 0
|
||||
print "User $p_username: illegal shell: ``$sh''\n"
|
||||
if ($verbose && $sh &&
|
||||
@ -275,10 +275,10 @@ sub group_read {
|
||||
($g_groupname, $pw, $g_gid, $memb) = (split(/:/, $_))[0..3];
|
||||
|
||||
$groupmembers{$g_gid} = $memb;
|
||||
warn "Groupname exist twice: $g_groupname:$g_gid -> $g_groupname:$groupname{$g_groupname}\n"
|
||||
warn "Groupname exists twice: $g_groupname:$g_gid -> $g_groupname:$groupname{$g_groupname}\n"
|
||||
if $groupname{$g_groupname} && $verbose;
|
||||
$groupname{$g_groupname} = $g_gid;
|
||||
warn "Groupid exist twice: $g_groupname:$g_gid -> $gid{$g_gid}:$g_gid\n"
|
||||
warn "Groupid exists twice: $g_groupname:$g_gid -> $gid{$g_gid}:$g_gid\n"
|
||||
if $gid{$g_gid} && $verbose;
|
||||
$gid{$g_gid} = $g_groupname;
|
||||
}
|
||||
@ -568,7 +568,8 @@ sub new_users_group_update {
|
||||
}
|
||||
|
||||
if ($new_groups || defined($groupname{$group_login}) ||
|
||||
defined($gid{$groupname{$group_login}})) {
|
||||
defined($gid{$groupname{$group_login}}) &&
|
||||
$gid{$groupname{$group_login}} ne "+") {
|
||||
# new user is member of some groups
|
||||
# new login group is already in name space
|
||||
rename($group, "$group.bak");
|
||||
@ -694,7 +695,7 @@ sub new_users {
|
||||
|
||||
$cryptpwd = "";
|
||||
$cryptpwd = crypt($password, &salt) if $password ne "";
|
||||
# obskure perl bug
|
||||
# obscure perl bug
|
||||
$new_entry = "$name\:" . "$cryptpwd" .
|
||||
"\:$u_id\:$g_id\::0:0:$fullname:$home/$name:$sh";
|
||||
&append_file($etc_passwd, "$new_entry");
|
||||
@ -735,7 +736,7 @@ sub batch {
|
||||
|
||||
$cryptpwd = "";
|
||||
$cryptpwd = crypt($password, &salt) if $password ne "";
|
||||
# obskure perl bug
|
||||
# obscure perl bug
|
||||
$new_entry = "$name\:" . "$cryptpwd" .
|
||||
"\:$u_id\:$g_id\::0:0:$fullname:$home/$name:$sh";
|
||||
&append_file($etc_passwd, "$new_entry");
|
||||
@ -855,7 +856,7 @@ sub parse_arguments {
|
||||
$sendmessage = 1; }
|
||||
elsif (/^--?(batch)$/) {
|
||||
@batch = splice(@argv, 0, 4); $verbose = 0;
|
||||
die "batch: to few arguments\n" if $#batch < 0;
|
||||
die "batch: too few arguments\n" if $#batch < 0;
|
||||
}
|
||||
# see &config_read
|
||||
elsif (/^--?(config_create)$/) { &create_conf; }
|
||||
@ -1167,7 +1168,7 @@ sub message_create {
|
||||
#
|
||||
# Message file for adduser(8)
|
||||
# comment: ``#''
|
||||
# defaultvariables: \$name, \$fullname, \$password
|
||||
# default variables: \$name, \$fullname, \$password
|
||||
# other variables: see /etc/adduser.conf after
|
||||
# line ``$do_not_delete''
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user