Group Management in MAC-OS

By default /etc/group is consulted only in single-user mode, so that is not the way to deal with group membership under MAC-OS.

The command line utility dseditgroup is the way to go:

dseditgroup -o create -i 1000 newgroup

will create a new group called newgroup with gid 1000

dseditgroup -o edit -a someuser newgroup

Will add an (existing) user someuser to newgroup

dsedtigroup -o read newgroup

will display the properties of the group newgroup

dseditgroup -o delete newgroup

will delete the group newgroup.

Comments off

Drupal subsites and apache conf files

We wanted 1 drupal installation (on a RedHat server, installed under /var/www/html/drupal) with a few
subsites. In the past we achieved this with many symbolic links which
gets hard to manage after a while.

Another possibility is creating CNAMES for the different subsites but
that also has its set of issues (updating dns, getting certificates…)

The solution was to create a special configuration file (in
/etc/httpd/conf.d), as follows:



Options FollowSymLinks
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{THE_REQUEST} /subsite1/
RewriteRule ^(.*)$ /drupal6/subsite1/?q=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{THE_REQUEST} /subsite2/
RewriteRule ^(.*)$ /drupal6/subsite2/?q=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{THE_REQUEST} /
RewriteRule ^(.*)$ /drupal/?q=$1 [L]

Alias /drupal/subsite1 "/var/www/html/drupal"
Alias /drupal/subsite2 "/var/www/html/drupal"

The idea is that in each of the 4 line blocks take a url which does not
correspond to a physical file or directory, and if it matches a
particular string (say ‘subsite1′) it rewrites the url in a way which is
understandable by drupal (all of this happens in a block
which refers to /var/www/html/drupal so everything is relative to
/drupal )

The Alias lines at the end of the file are needed to point urls which
start with /drupal to the correct directory.

So any new site necessitates the addition of a new 4 line block and a
new Alias line, and then restarting apache. Definitely easier than the
other solutions.

Comments off

stunnel for mysql – server and client

We needed to set up an stunnel to the mysql server (mysql.example.com), so that the client (client.example.com) and the server can communicate over an encrypted tunnel. More… »

Comments

A thought

The nice thing about lies is that they do not need to be consistent – that is an obvious disadvantage of truthful statements.

Comments

The pesky TEXINPUTS

pdflatex was giving this error:

Error: pdflatex (file pdftex.cfg): cannot open config file
==> Fatal error occurred, the output PDF file is not finished!
More… »

Comments

Internet Explorer Homepage

I finally fixed the problem I had with Ineternet Explorer (under Windows XP). It kept resetting the homepage to www.msn.com . More… »

Comments

Installing Apache and PHP on Windows

Yesterday was the first time I installed apache and php on windows! The apache 2 installer worked out of the box, but I had 2 annoyances with php. More… »

Comments

Tutorial: Multiple Keyboards for Accented Characters

Entering accented or other “unusual” characters in a web-form is a recurring problem, which is usually solved by placing a virtual keyboard on the page. I find these annoying More… »

Comments

doubleclick a radio button to remove selection

We needed to set up a group of radio buttons so that when any of them is doubleclicked any selection in the group is removed. More… »

Comments

Spreadsheet_Excel_Writer

The pear package Spreadsheet_Excel_Writer rocks. I include a file similar to excel.inc file in my scripts, and then send data as needed to the spreadshhet. More… »

Comments