--- smeserver-mediawiki-1.6.10/root/usr/share/doc/mediawiki-1.6.10/Sources/LocalSettings.php.1 2007-10-22 16:50:09.000000000 +0200 +++ smeserver-mediawiki-1.6.10/root/usr/share/doc/mediawiki-1.6.10/Sources/LocalSettings.php 2008-05-29 07:35:56.000000000 +0200 @@ -129,4 +129,16 @@ $configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) ); $wgCacheEpoch = max( $wgCacheEpoch, $configdate ); + +#!require_once("./extensions/PwAuthPlugin.php"); +#!$wgAuth = new PwAuthPlugin(); + +#!$wgGroupPermissions['*']['createaccount'] = false; +#!$wgGroupPermissions['*']['read'] = true; +#!$wgGroupPermissions['*']['edit'] = false; +#!$wgGroupPermissions['*']['createpage'] = false; +#!$wgGroupPermissions['*']['createtalk'] = false; + +#!$wgShowIPinHeader = false; # For non-logged in users + ?> \ Kein Zeilenumbruch am Dateiende. --- smeserver-mediawiki-1.6.10/root/usr/share/doc/mediawiki-1.6.10/Sources/PwAuthPlugin.php.1 2008-05-28 22:32:33.000000000 +0200 +++ smeserver-mediawiki-1.6.10/root/usr/share/doc/mediawiki-1.6.10/Sources/PwAuthPlugin.php 2008-05-28 22:32:31.000000000 +0200 @@ -0,0 +1,309 @@ +set('usedomain', false ); + $template->set('useemail', false); // Disable the mail new password box. + $template->set('create', false); // Remove option to create new accounts from the wiki. + } + + /** + * Check to see if the specific domain is a valid domain. + * + * @param string $domain + * @return bool + * @access public + */ + function validDomain( $domain ) { + # We ignore domains, so erm, yes? + return true; + } + + /** + * When a user logs in, optionally fill in preferences and such. + * For instance, you might pull the email address or real name from the + * external user database. + * + * The User object is passed by reference so it can be modified; don't + * forget the & on your function declaration. + * + * @param User $user + * @access public + */ + function updateUser( &$user ) { + global $pwauth_email_domain; + + // Lookup information about user + $username = strtolower( $user->getName() ); + $account = posix_getpwnam( $username ); + $gecos = split( ',', $account['gecos'] ); + + // Set users real name + $user->setRealName( $gecos[0] ); + + // Set email if domain is configured + if (!empty( $pwauth_email_domain ) ) { + // Set the email address + $user->setEmail( $username.'@'.$pwauth_email_domain ); + + // We set the email address, therefore it is valid + $user->confirmEmail(); + } + + // For security, scramble the password to ensure the user can + // only login using system password. + // This set the password to a 15 byte random string. + $pass = ''; + for($i=0; $i<15;++$i) $pass .= chr(mt_rand(0,255)); + $user->setPassword($pass); + + return true; + } + + + /** + * Return true if the wiki should create a new local account automatically + * when asked to login a user who doesn't exist locally but does in the + * external auth database. + * + * If you don't automatically create accounts, you must still create + * accounts in some way. It's not possible to authenticate without + * a local account. + * + * This is just a question, and shouldn't perform any actions. + * + * @return bool + * @access public + */ + function autoCreate() { + return true; + } + + + /** + * Can users change their passwords? + * + * @return bool + */ + function allowPasswordChange() { + # We can't change users system passwords + return false; + } + + /** + * Set the given password in the authentication database. + * Return true if successful. + * + * @param string $password + * @return bool + * @access public + */ + function setPassword( $password ) { + # We can't change users system passwords + return false; + } + + /** + * Update user information in the external authentication database. + * Return true if successful. + * + * @param User $user + * @return bool + * @access public + */ + function updateExternalDB( $user ) { + # We can't change users details + return false; + } + + /** + * Check to see if external accounts can be created. + * Return true if external accounts can be created. + * @return bool + * @access public + */ + function canCreateAccounts() { + # We can't create accounts + return false; + } + + /** + * Add a user to the external authentication database. + * Return true if successful. + * + * @param User $user + * @param string $password + * @return bool + * @access public + */ + function addUser( $user, $password ) { + # We can't create accounts + return false; + } + + + /** + * Return true to prevent logins that don't authenticate here from being + * checked against the local database's password fields. + * + * This is just a question, and shouldn't perform any actions. + * + * @return bool + * @access public + */ + function strict() { + # Only allow authentication from system database + return true; + } + + /** + * When creating a user account, optionally fill in preferences and such. + * For instance, you might pull the email address or real name from the + * external user database. + * + * The User object is passed by reference so it can be modified; don't + * forget the & on your function declaration. + * + * @param User $user + * @access public + */ + function initUser(&$user) { + # We do everything in updateUser + } + +} + + + +/** + * Some extension information init + */ +$wgExtensionCredits['other'][] = array( + 'name' => 'PWAuthPlugin', + 'version' => '1.0', + 'author' => 'Nicholas Humfrey', + 'description' => 'Automagic login with system accounts, using pwauth', + 'url' => 'http://www.mediawiki.org/wiki/Extension:PwAuthPlugin' +); + + + +?> --- smeserver-mediawiki-1.6.10/root/usr/share/doc/mediawiki-1.6.10/Sources/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh.1 2007-11-08 10:39:10.000000000 +0100 +++ smeserver-mediawiki-1.6.10/root/usr/share/doc/mediawiki-1.6.10/Sources/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh 2008-05-31 16:54:55.000000000 +0200 @@ -7,8 +7,9 @@ echo " - MediaWiki MySQL database" echo " - MediaWiki MySQL User" echo " - MediaWiki DB entries..." +echo " - MediaWiki SME groups..." echo " - All Install files" -echo -n "ARE YOU SURE YOU WANT TO DELETE PERMANENTLY EGROUPWARE? (y/n) [n] " +echo -n "ARE YOU SURE YOU WANT TO DELETE PERMANENTLY MEDIAWIKI? (y/n) [n] " read del if [ "$del" = "y" -o "$del" = "Y" ]; then echo "Deleting MySQL database..." @@ -18,6 +19,15 @@ mysql -u root -e "DROP USER mediawikiuser@localhost;" echo "Removing SME DB entries..." /sbin/e-smith/config delete mediawiki + echo "Removing SME group entries..." +# /sbin/e-smith/db accounts set mw_read deleted +# /sbin/e-smith/db accounts set mw_edit deleted +# /sbin/e-smith/db accounts set mw_createpage deleted +# /sbin/e-smith/db accounts set mw_createtalk deleted +# /sbin/e-smith/signal-event group-delete mw_read +# /sbin/e-smith/signal-event group-delete mw_edit +# /sbin/e-smith/signal-event group-delete mw_createpage +# /sbin/e-smith/signal-event group-delete mw_createtalk echo "Removing Install files..." rm -rf /opt/mediawiki echo "Done!" --- smeserver-mediawiki-1.6.10/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95mediawiki.1 2007-11-09 09:12:26.000000000 +0100 +++ smeserver-mediawiki-1.6.10/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95mediawiki 2008-05-31 12:47:31.000000000 +0200 @@ -22,6 +22,7 @@ my $mwiki = $mediawiki{'PublicAccess'} || "local"; if ($mwiki eq "local") { + $OUT .= " deny from all\n"; $OUT .= " allow from $localAccess"; } else { $OUT .= " allow from all"; @@ -37,6 +38,7 @@ my $mwiki = $mediawiki{'PublicAccess'} || "local"; if ($mwiki eq "local") { + $OUT .= " deny from all\n"; $OUT .= " allow from $localAccess"; } else { $OUT .= " allow from all"; @@ -50,6 +52,7 @@ my $mwiki = $mediawiki{'PublicAccess'} || "local"; if ($mwiki eq "local") { + $OUT .= " deny from all\n"; $OUT .= " allow from $localAccess"; } else { $OUT .= " allow from all"; @@ -63,6 +66,7 @@ my $mwiki = $mediawiki{'PublicAccess'} || "local"; if ($mwiki eq "local") { + $OUT .= " deny from all\n"; $OUT .= " allow from $localAccess"; } else { $OUT .= " allow from all"; @@ -76,6 +80,7 @@ my $mwiki = $mediawiki{'PublicAccess'} || "local"; if ($mwiki eq "local") { + $OUT .= " deny from all\n"; $OUT .= " allow from $localAccess"; } else { $OUT .= " allow from all"; @@ -89,6 +94,7 @@ my $mwiki = $mediawiki{'PublicAccess'} || "local"; if ($mwiki eq "local") { + $OUT .= " deny from all\n"; $OUT .= " allow from $localAccess"; } else { $OUT .= " allow from all"; @@ -102,6 +108,7 @@ my $mwiki = $mediawiki{'PublicAccess'} || "local"; if ($mwiki eq "local") { + $OUT .= " deny from all\n"; $OUT .= " allow from $localAccess"; } else { $OUT .= " allow from all";