1. Migrating users to Calculate Directory Server

Let us see in more detail all the steps to migrate users to Calculate Directory Server.

Configure servers

Before you start configuring, update the calculate-server package to the latest version:

emerge calculate-server

Configure services
Check your network before you start configuring. To configure the network interface use this manual.

In the example below we will configure and start all supported services:

cl-setup ldap
cl-setup unix
cl-setup samba
cl-setup mail
cl-setup jabber

Note: when setting you can specify additional parameters. Before start, see help files for each command:

cl-setup --help
cl-setup --help-jabber

Set password for entering in domain:

cl-passwd --smb client samba
cl-passwd --smb admin samba

Configure using distfiles by domain clients

cl-groupadd --gid 250 -f portage unix
cl-usermod -a portage client unix
chmod 0775 /var/calculate/remote
chmod -R 2775 /var/calculate/remote/distfiles
chown -R root:portage /var/calculate/remote/distfiles

Configure Samba

Create the basic system groups, for example:

cl-groupadd boss samba
cl-groupadd job samba
cl-groupadd it samba
cl-groupadd logist samba
cl-groupadd manager samba

You may need the basic system groups if you want to restrict access to certain computer resources. In this case system Unix-groups should be duplicated on the LDAP-server. If necessary, this operation can be performed later.

cl-groupadd -f -g 7 lp unix
cl-groupadd -f -g 10 wheel unix
cl-groupadd -f -g 18 audio unix
cl-groupadd -f -g 27 video unix
cl-groupadd -f -g 35 games unix
cl-groupadd -f -g 440 plugdev unix
cl-groupadd -f -g 441 scanner unix
cl-groupadd -f -g 442 vboxusers unix

Create user groups

As a minimum, users should have one group. However, if you want to separate the data access to users of various departments, groups are the most convenient way to organize a distributed access.

For instance, let it be 5 groups:

cl-groupadd boss samba
cl-groupadd job samba
cl-groupadd it samba
cl-groupadd logist samba
cl-groupadd manager samba

Configure Jabber

You can organize your own Jabber-server. The Jabber-server can be used successfully within your local network, assuring efficient interaction of the staff. To prevent users from wasting their work time, message logging is provided on the server.

Add jabber user groups

After creating groups, users will automatically be placed in them in your Jabber client. It will certainly make communication easier, and will also serve as a starting point for exploring the structure of the company for new employees.

cl-groupadd "Director" jabber
cl-groupadd "personnel department" jabber
cl-groupadd "Programmer" jabber
cl-groupadd "Logistic" jabber
cl-groupadd "Manager" jabber

Add users

Below is a simple bash script to add users. Edit it by commenting out the unused services. Please note that the groups manager, audio, lp, plugdev, scanner and video, which the script uses, must be previously created as described above.

#!/bin/bash

login="sbobs" 
fullname="Steve Bobs" 
group="manager" 
groupJabber="Manager" 
mail="sb@calculate-linux.org,ip@mail.office.calculate-linux.org" 

echo ">>>Configure Samba..." 
/usr/bin/cl-useradd -p -c "$fullname" -g $group -G audio,lp,plugdev,scanner,video $login samba

echo ">>>Configure Mail" 
/usr/bin/cl-useradd -c "$fullname" -p -e $mail $login mail

echo ">>>Configure Jabber" 
/usr/bin/cl-useradd -c "$fullname" -p $login jabber
/usr/bin/cl-usermod -g "$groupJabber" $login jabber

Here we create two e-mail addresses, since the server is located in a local network and is not the primary mail server.

Thank you!