jackuzzy / cmum-for-multics

A simple CMUM connector for MultiCS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmum-for-multics

A simple php-script to export users from CSP MySQL User Manager into MultiCS

Requirements

  • PHP 5.3.0 or newer
  • MySQL 5.0 or newer
  • CSP MySQL User Manager 3.0 or newer

Download

You can download the newest release at http://github.com/dukereborn/cmum-for-multics/releases/

Installation

  1. Download and extract the php script to your server
  2. Open the php script in a texteditor and edit the config part
  3. Edit mutlics to fetch users from file
  4. Execute the php script to generate multics user files

cmum-for-multics config part

// mysql settings for cmum3 database
define("DBHOST",""); <- hostname for mysql server
define("DBUSER",""); <- mysql server username
define("DBPASS",""); <- mysql server password
define("DBNAME",""); <- cmum3 database name

// local settings
define("CHARSET","utf-8"); <- change to match cmum3 installation (utf-8 or utf-16)
define("TIMEZONE","Europe/London"); <- change to match your timezone, list found here http://php.net/manual/en/timezones.php

// multics settings
define("CCCAMFILE",""); <- full path to multics cccam user file, leave empty if not used
define("MGCAMDFILE",""); <- full path to multics mgcamd user file, leave empty if not used
define("NEWCAMDFILE",""); <- full path to multics newcamd user file, leave empty if not used

// misc settings
define("PROFILEFIELD","cspvalue"); <- what cmum profile field to use for profile data (cspvalue or comment)

sample cmum-for-multics config

// mysql settings for cmum3 database
define("DBHOST","localhost");
define("DBUSER","admin");
define("DBPASS","password");
define("DBNAME","cmum3");

// local settings
define("CHARSET","utf-8");
define("TIMEZONE","Europe/London");

// multics settings
define("CCCAMFILE","/usr/share/multics/cccamusers");
define("MGCAMDFILE","/usr/share/multics/mgcamdusers");
define("NEWCAMDFILE","/usr/share/multics/newcamdusers");

// misc settings
define("PROFILEFIELD","cspvalue");

Change MultiCS to fetch users from file

Edit your multics.cfg to include users from file like this, only used fils are required

INCLUDE: "/usr/share/multics/cccamusers"
INCLUDE: "/usr/share/multics/mgcamdusers"
INCLUDE: "/usr/share/multics/newcamdusers"

Running cmum-for-multics

There are some different ways on how to run cmum-for-multics

  • one time
  • by cronjob or scheduled task
  • looped in a screen session

one time

php cmumformultics.php

by cronjob or scheduled task

setup your cronjob or scheduled task to execute the scrip in your given interval

looped in a screen session

php cmumformultics.php -l <loop interval in seconds, default is 300>

User usage in CSP MySQL User Manager

Profiles

In cmum, when adding profiles, enter the multics profile port number in the cspvalue field

Users

For cmum-for-multics to find what users to use where, enter the corresponding cam in the boxtype field on each user. Available values are:

cccam
mgcamd
newcamd

Fields used by cmum-for-multics

Username
Password
Displayname
Profiles
IP mask

Contact me

If you find any bugs, got an idea or just wanna say "Hi!", send me a email on dukereborn@gmail.com. You can also follow me on twitter for updates and news http://www.twitter.com/dukereborn/

Donations

All donations are welcome through paypal to account dukereborn@gmail.com

Last words

This is a quick and ugly script, will try to make it better in the future.

License

Released under the MIT license

About

A simple CMUM connector for MultiCS

License:MIT License


Languages

Language:PHP 96.9%Language:Prolog 3.1%