Ubuntu Inteprid Relesae
Till 7 days to go. Lets prepare for the Inteprid Release Party. Who's join?
Yesterday Jaunty is really released. Now let's try it on and get the fastest Ubuntu boot with ext4.
USERNAME1:UID:PASSWORD:FIRSTNAME LASTNAME
USERNAME2:UID:PASSWORD:FIRSTNAME LASTNAME
USERNAME3:UID:PASSWORD:FIRSTNAME LASTNAME
....etc#!/usr/webconfig/bin/php -q
///////////////////////////////////////////////////////////////////////////////
//
// Copyright 2003-2007 Point Clark Networks.
//
///////////////////////////////////////////////////////////////////////////////
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
///////////////////////////////////////////////////////////////////////////////
/*****************************************************************************/
/* D E P E N D E N C I E S */
/*****************************************************************************/
require_once("/var/webconfig/api/User.class.php");
require_once("/var/webconfig/api/File.class.php");
require_once("/var/webconfig/api/UserManager.class.php");
error_reporting(0);
$file = new File("/tmp/user_list.txt");
if (!$file->Exists()) {
echo "File not found.\n";
return 1;
}
$lines = $file->GetContentsAsArray();
foreach ($lines as $line) {
$userinfo = array(
'dn' => null,
'sn' => null,
'cn' => null,
'givenName' => null,
'uid' => null,
'title' => null,
'o' => null,
'ou' => null,
'roomNumber' => null,
'street' => null,
'postOfficeBox' => null,
'postalCode' => null,
'l' => null,
'st' => null,
'c' => null,
'telephoneNumber' => null,
'facsimileTelephoneNumber' => null,
'kolabFreeBusyFuture' => 60,
'pol' => array('anyone' => 4),
'alias' => '',
'delegate' => '',
'cyrus-userquota' => '',
'kolabDeleteflag' => false,
'pcnFTPPasswordFlag' => true,
'pcnMailPasswordFlag' => true,
'pcnPPTPPasswordFlag' => true,
'pcnProxyPasswordFlag' => true,
'pcnWebconfigPasswordFlag' => true,
'pcnSambaPasswordFlag' => true,
'pcnWebPasswordFlag' => true,
);
$profile = explode(":",$line);
$user = new User($profile[0]);
if ($user->IsValidUsername($profile[0])) {
$username = strtolower($profile[0]);
$userinfo['uid'] = $username;
$userinfo['password'] = $profile[2];
$userinfo['verify'] = $profile[2];
}else{
echo "Invalid username (" . $profile[0] . ").";
return 1;
}
// protect root
if ($username == 'root') {
echo "Skipping root account...\n";
continue;
}
// protect system account
if ((int)$profile[1] < 1000) {
echo "Skipping system account (UID < 1000)...\n";
continue;
}
list($first, $last) = explode(" ", $profile[3]);
if ($user->IsValidFirstName($first)) {
$userinfo['givenName'] = $first;
} else {
echo "Invalid first name (" . $first . ").";
return 1;
}
if ($user->IsValidLastName($last)) {
$userinfo['sn'] = $last;
} else {
echo "Invalid last name (" . $last . ").";
return 1;
}
try {
$user->Add($userinfo);
$userinfo = null;
echo "User $username successfully imported!\n";
} catch (UserAlreadyExistsException $e) {
echo "User $username already exists...skipping.\n";
} catch (Exception $e) {
echo "Adding user $username failed - " . $e->GetMessage() . "\n";
echo "Bailing on user import...\n";
return 1;
}
}
return 0;
// vi: syntax=php ts=4
?>
./user.php

*filter
:INPUT DROP [28071:9496991]
:FORWARD DROP [1:344]
UTPUT ACCEPT [7379811:8382372915]
-A INPUT -m state –state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -s 127.0.0.1 -j ACCEPT
-A INPUT -s 10.1.1.0/255.255.255.0 -j ACCEPT
-A FORWARD -s 10.1.1.0/255.255.255.0 -j ACCEPT
-A FORWARD -d 10.1.1.0/255.255.255.0 -m state –state RELATED,ESTABLISHED -j ACCEPT
COMMIT
*nat
REROUTING ACCEPT [68559:12291604]
OSTROUTING ACCEPT [3108:247318]
UTPUT ACCEPT [17577:1164789]
-A PREROUTING -i eth0 -s 10.1.1.10 -p tcp -m tcp –dport 80 -j REDIRECT –to-ports 3128
-A POSTROUTING -o eth1 -j MASQUERADE
COMMITSponsored by Hyperic System Monitoring. Designed by Adii. Converted to WP-Polaroid Blogger Template by eBlog Templates