OpengateMup - MAC address update system



This system updates the expiration date of an MAC address registered in the database.  It includes following two programs.


  1. This system cooperates with opengateMd, OpengateMsql, and opengateMreg. 

  2. To run this, the following access relations must be maitained.
    openateMup --- > opengateMsql < --- opengateMreg/opengateMd

  3. Install MySql, SQLite3, and Apache. If you select authentication method requiring specific modules, install it.

  4. Edit /etc/syslog.conf to save log entries for OpengateM.  And create the log file [e.g.:  touch /var/log/opengate.log ].

              | * Separate by TAB code
    local1.*  /var/log/opengate.log

  5. Unpack the archive and install it, where [0.0.0] means  the version number.

    tar xzvf opengatem0.0.0.tar.gz
    cd opengatem0.0.0/mngsrc
    make installmup

  6. Modify the configuration file to adjust to the environment.  Refer documentation of opengateMreg.

    cp opengatemmng.conf.sample opengatemmng.conf
    vi opengatemmng.conf

  7. When you select Shibboleth or HttpBasic for general user authentication, Add authentication setting for opengatemup.cgi in [.htaccess].  Remove the setting, if you select other method.

    ====if select Shibboleth====
    <FILES opengatemup.cgi>
     AuthType shibboleth
     ShibRequestSetting requireSession 1
     ShibRequireSession On
     ShibUseHeaders On
     Require valid-user
    ====if select HttpBasic====
    <FILES opengatemup.cgi>
    AuthType Basic
    AuthUserFile /tmp/passwd.dat
    AuthName "Enter Your ID and Password"
    Require valid-user

  8. Check the warning mail sender.  Set the [limitDate] as tomorrow, and run [opengatemmail] on root privilege.  If warning mail is not received, check opengate.log and maillog.

    use opengatem;
    update macaddrs set limitDate=adddate(now(), interval 1 day) where userId='user1';
    select * from macaddrs;
    sudo opengatemmail

  9. Add the following line to [/etc/crontab] in order to send warning mail before expiration. It means to run the sender at 07:46 every morning.  Or prepare a file to execute this command in the derectory [/etc/periodic/daily/].  Be care to set on one site only.  If you set on plural sites, plural mails are received.

    46      7       *       *       *       root    /usr/local/bin/opengatemmail