use strict;
use vars qw( @ISA $nossh_hack $conf $dir_prefix @shells $usernamemin
$usernamemax $passwordmin $username_letter $username_letterfirst
+ $username_noperiod
$shellmachine $useradd $usermod $userdel $mydomain
$cyrus_server $cyrus_admin_user $cyrus_admin_pass
@saltset @pw_set);
}
$username_letter = $conf->exists('username-letter');
$username_letterfirst = $conf->exists('username-letterfirst');
+ $username_noperiod = $conf->exists('username-noperiod');
$mydomain = $conf->config('domain');
if ( $conf->exists('cyrus') ) {
($cyrus_server, $cyrus_admin_user, $cyrus_admin_pass) =
} elsif ( $username_letter ) {
$recref->{username} =~ /[a-z]/ or return "Illegal username";
}
+ if ( $username_noperiod ) {
+ $recref->{username} =~ /\./ and return "Illegal username";
+ }
$recref->{popnum} =~ /^(\d*)$/ or return "Illegal popnum: ".$recref->{popnum};
$recref->{popnum} = $1;
=head1 VERSION
-$Id: svc_acct.pm,v 1.34 2001-09-11 03:15:58 ivan Exp $
+$Id: svc_acct.pm,v 1.35 2001-09-11 04:17:47 ivan Exp $
=head1 BUGS
<li><a name="textradiusprepend">textradiusprepend</a> - <b>DEPRECIATED</b>, use RADIUS check attributes instead. This option will be removed soon. The contents of this file will be prepended to the first line of a user's RADIUS entry in text exports.
<li><a name="usernamemin">usernamemin</a> - Minimum username length (default 2);
<li><a name="usernamemax">usernamemax</a> - Maximum username length (default is the size of the SQL column, probably specified when fs-setup was run)
- <li><a name="usernamemax">username-letter</a> - The existance of this file will turn on the requirement that usernames contain at least one letter.
- <li><a name="usernamemax">username-letterfirst</a> - The existance of this file will turn on the requirement that usernames start with a letter.
+ <li><a name="username-letter">username-letter</a> - The existance of this file will turn on the requirement that usernames contain at least one letter.
+ <li><a name="username-letterfirst">username-letterfirst</a> - The existance of this file will turn on the requirement that usernames start with a letter.
+ <li><a name="username-noperiod">username-noperiod</a> - The existance of this file will disallow periods in usernames.
<li><a name="username_policy">username_policy</a> - This file controls the mechanism for preventing duplicate usernames in passwd/radius files exported from svc_accts. This should be one of 'prepend domsvc' 'append domsvc' or 'append domain'
<li><a name="vpopmailmachines">vpopmailmachines</a> - Your vpopmail pop toasters, one per line. Each line is of the form "machinename vpopdir vpopuid vpopgid". For example: <code>poptoaster.domain.tld /home/vpopmail 508 508</code> Note: vpopuid and vpopgid are values taken from the vpopmail machine's /etc/passwd