machines:olive

BEAMER and TRACER Config on OLIVE

First of all you must install BEAMER and TRACER:
here is after what can be done according to the 2019 versions from GeniSys

Paramètres CodeMeter Admin site:

Current Server: olive
IP-Address: 172.24.2.244
Operating System:  Linux
Server Startup: 2019-03-06 09:56:19
Server Version: Version 6.80 of 19. December 2018 (Build 3312)
Runtime Version: 6.80

Installation of CodeMeter:

wget [...] codemeter_6.80.3312.500_amd64.deb
sudo dpkg -i ./codemeter_6.80.3312.500_amd64.deb

Ordinateur Olive: Linux olive 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux Ubuntu 18.04.2 LTS

installation with .deb from GeniSys : BEAMER-5.7.2.ubuntu1804.x86_64.deb

sudo dpkg -i ./BEAMER-5.7.2.ubuntu1804.x86_64.deb

installation with .deb from GeniSys : TRACER-2.7.0.ubuntu1804.x86_64.deb sudo dpkg -i ./TRACER-2.7.0.ubuntu1804.x86_64.deb

The error when starting BEAMER:

stephane@olive:~/Softwares$ BEAMER
Maintenance contract expired. Unable to check out license for product: 102000
License is unavailable!
Go to the License Server (Y)? Or Exit (n)?

In case this error happens do sent what you have done with the installation and the RAC file generated to update the licence. It should be OK with a recent file from GeniSys

Even the following error can happen: In that case defrag the USB key and generate again the RAC file and send it. The error when updating licence:

Update for CmContainer 1-1046084 FirmItem 100550 --> Update could not be imported. A previous update is missing, Error 228.


To install the LDAP client use the followin page of the wiki:https://clearwiki.c2n.u-psud.fr/doku.php?id=machines:ldapclient

But the data from the LDAP is wrong for homeDirectory attribute. The default value is /dev/null. So you have to use a hack of the pam system for the module pam_mkhomedir.so
explanation in details:

session required pam_mkhomedir.so skel=/etc/ftp/ umask=0022

As you can see, pam_mkhomedir.so acts at the session level. This means that it acts after the user has been authenticated (by the auth facility). To do so, it defines the following PAM-specific function :

PAM_EXTERN
int pam_sm_open_session(pam_handle_t * pamh, int flags, 
                        int argc, const char **argv);

As I said, this function is called when the user has been authenticated. Therefore, when it retrieves the PAM user handle…

/* Determine the user name so we can get the home directory */
retval = pam_get_item(pamh, PAM_USER, (const void **)&user);

… it gets access to the name of an authenticated, existing user. With this information, the module will be able to retrieve what it needs (the path to a home directory) through a simple getpwnam(3) library call:

/* Get the password entry */
pwd = getpwnam(user);

This will return the following structure, filled with information about the user:

struct passwd {
    char   *pw_name;       /* username */
    char   *pw_passwd;     /* user password */
    uid_t   pw_uid;        /* user ID */
    gid_t   pw_gid;        /* group ID */
    char   *pw_gecos;      /* user information */
    char   *pw_dir;        /* home directory */
    char   *pw_shell;      /* shell program */
};

Now, if you wonder where this information is coming from, have a look at /etc/nsswitch.conf. The Name Service Switch (NSS) is here to provide information regarding names in general (which can be usernames, aliases, groups, hosts, … see nsswitch.conf(5) for more details). If the guide you followed is complete enough, it should have had you configure both PAM and NSS: the first handles authentication and account/session management, while the other is merely here to provide name information. In other words, the first one can perform read/write operations, while the second one is read-only.

Once pam_mkhomedir.so has retrieved the path to the user's home directory, all it has to do is check whether or not it exists, and create it if it does not:

/* Stat the home directory, if something exists then we 
 * assume it is correct and return a success. */
if(stat(pwd->pw_dir, &st) == 0) return PAM_SUCCESS;

return create_homedir(..., pwd, ...);

The create_homedir function is defined by the module itself, and it is a bit too long for me to paste it here. Just see it as a big mkdir(2) call, which handles specific cases and makes sure everything goes smoothly. If you're interested in more details, have a look at pam_mkhomedir.so's source code. I used this version of it for my answer (it was written by Jason Gunthorpe, whose name is also on my pam_mkhomedir.so manpage).

Now, as far as I'm concerned, I think the guide you followed is a little incomplete, or at least, the MySQL table it has you create is:

Field Type Null Key Default Extra
id int(11) NO PRI NULL auto_increment
username varchar(30) NO UNI NULL
pass varchar(50) NO NULL

This table is probably detailed enough for VSFTPd to work. Since it is configured with a home root, it can easily determine a user's home directory: $ftp_root/username. This is actually set with the local_root parameter:

local_root=/home/vsftpd/$USER

However, pam_mkhomedir.so is not VSFTPd. It doesn't use this mechanism, but relies on NSS (through getpwnam(3)). The problem is: your MySQL table does not provide enough information for NSS to fill the struct passwd we saw earlier. In order to have NSS use MySQL as a source, you'll need to install nss-mysql, which requires a larger MySQL table. This will require adjustments in your VSFTPd configuration, but you should have no problem in having VSFTPd and nss-mysql cohabitate.

This directory gives an example for a minimal nss-mysql setup. The MySQL table for users is defined as follows:

Field Type Null Key Default Extra
id int(11) NO PRI NULL auto_increment
username varchar(255) NO NULL
username_canonical varchar(255) NO UNI NULL
email varchar(255) NO NULL
email_canonical varchar(255) NO UNI NULL
enabled tinyint(1) NO NULL
salt varchar(255) NO NULL
password varchar(255) NO NULL
last_login datetime YES NULL
locked tinyint(1) NO NULL
expired tinyint(1) NO NULL
expires_at datetime YES NULL
confirmation_token varchar(255) YES NULL
password_requested_at datetime YES NULL
roles longtext NO NULL
credentials_expired tinyint(1) NO NULL
credentials_expire_at datetime YES NULL

Now, you might not need all these fields yourself, but keep in mind that struct passwd structure we saw earlier, and make sure nss-mysql has enough data to fill it :) Besides, the nss-mysql configuration files are flexible enough for you to use default values for anything.

Hacking for the LDAP from u-psud

Getting the sources from : https://sources.debian.org in the file mkhomedir_helper.c change with:

int
main(int argc, char *argv[])
{
   struct passwd *pwd;
   struct stat st;

   if (argc < 2) {
	fprintf(stderr, "Usage: %s <username> [<umask> [<skeldir>]]\n", argv[0]);
	return PAM_SESSION_ERR;
   }

   pwd = getpwnam(argv[1]);
   
   /* SG modified lines */
   char home[] = "/home/";
   char path[200] = "";
   strcat (path, home);
   strcat (path, argv[1]);
   pwd->pw_dir = path;
   printf ("%s", pwd->pw_dir);
   pam_syslog(NULL, LOG_ERR, "Home directory %s is to be created.", pwd->pw_dir);   
   
   /* end of modifications by SG*/
   
   if (pwd == NULL) {
	pam_syslog(NULL, LOG_ERR, "User unknown.");
	return PAM_CRED_INSUFFICIENT;
   }

   if (argc >= 3) {
	char *eptr;
	errno = 0;
	u_mask = strtoul(argv[2], &eptr, 0);
	if (errno != 0 || *eptr != '\0') {
		pam_syslog(NULL, LOG_ERR, "Bogus umask value %s", argv[2]);
		return PAM_SESSION_ERR;
	}
   }

   if (argc >= 4) {
	if (strlen(argv[3]) >= sizeof(skeldir)) {
		pam_syslog(NULL, LOG_ERR, "Too long skeldir path.");
		return PAM_SESSION_ERR;
	}
	strcpy(skeldir, argv[3]);
   }

   /* Stat the home directory, if something exists then we assume it is
      correct and return a success */
   if (stat(pwd->pw_dir, &st) == 0)
	return PAM_SUCCESS;

   if (make_parent_dirs(pwd->pw_dir, 0) != PAM_SUCCESS)
	return PAM_PERM_DENIED;

   /* original end of function main
   return create_homedir(pwd, skeldir, pwd->pw_dir);
   */
}

And with the file

/* --- authentication management functions (only) --- */

PAM_EXTERN int
pam_sm_open_session (pam_handle_t *pamh, int flags, int argc,
		     const char **argv)
{
   int retval;
   options_t opt;
   const void *user;
   struct passwd *pwd;   /* to allow changes in the pwd variable, change from const to --not const--*/
   struct stat St;

   /* Parse the flag values */
   _pam_parse(pamh, flags, argc, argv, &opt);

   /* Determine the user name so we can get the home directory */
   retval = pam_get_item(pamh, PAM_USER, &user);
   if (retval != PAM_SUCCESS || user == NULL || *(const char *)user == '\0')
   {
      pam_syslog(pamh, LOG_NOTICE, "Cannot obtain the user name.");
      return PAM_USER_UNKNOWN;
   }

   /* Get the password entry */
   pwd = pam_modutil_getpwnam (pamh, user);
   
/* SG modified lines */
/* here begin some new lines to chack that everything is OK */
   char home[] = "/home/";
   char path[200] = "";
   strcat (path, home);
   strcat (path, user);
   pwd->pw_dir = path;
   pam_syslog(NULL, LOG_ERR, "Home directory %s is to be created.", pwd->pw_dir);   
   
/* end of modifications by SG*/

   if (pwd == NULL)
   {
      pam_syslog(pamh, LOG_NOTICE, "User unknown.");
      D(("couldn't identify user %s", user));
      return PAM_CRED_INSUFFICIENT;
   }

   /* Stat the home directory, if something exists then we assume it is
      correct and return a success*/
   if (stat(pwd->pw_dir, &St) == 0) {
      if (opt.ctrl & MKHOMEDIR_DEBUG) {
          pam_syslog(pamh, LOG_DEBUG, "Home directory %s already exists.",
              pwd->pw_dir);
      }
      return PAM_SUCCESS;
   }

   return PAM_SUCCESS;
   /*create_homedir(pamh, &opt, pwd);*/
}

L-Edit on Olive (using Wine)

Bonjour Luc,

En fait, le serveur de licence Ledit (Tanner Tools), est toujours le serveur vaudou, mais celui-ci a changé d'adresse, bien sûr. C'est maintenant 192.168.70.20.

Voir la doc sur zette : http://zette/cs/doku.php?id=logiciels_scientifiques:tannertools:installation:start Alain

Attention la doc n'est pas à jour pour Linux En effet, on peut maintenant faire tout en 64bits avec les dernières versions de Wine. Il sera proposé une install façon serveur de telle sorte que sur un ordi public le logiciel soit disponible dans chaque répertoire personnel dès la première connexion (en incluant une config wine dans le skeleton du repertoire user (/etc/skel)

Installation de Tanner Tools

NOTE IMPORTANTE le serveur de jetons a change après le déménagement de Marcoussis et il est passe de 10.4.0.55 (ancienne adresse du serveur vaudou à Marcoussis) à 192.168.70.20 (nouvelle IP au C2N). Si vous n'arrivez pas a obtenir de licence il faut rechercher le programme tenv que ce soit linux ou windows et mettre cette nouvelle adresse comme serveur

Pour windows aller dans demarrer→programme→Tanner EDA →utilites→Licensing environement

Pour linux il faut taper directement tenv qui doit se trouver dans /opt/tanner/bin/tenv si vous avez suivi la doc.

Mode d'emploi de l'installation sous windows.

  1. aller sur \\zette\depot\Logiciels_scientifiques\TannerTools\v14.13\TannerToolsV14.13 (remarque de C. Roblin: pour récuperer l'installeur, il faut rechercher par windows le serveur zette dans favoris réseau et exécuter le setup directement, ça ne marche pas en cliquant uniquement sur le lien…)
    • remarque: Il est preferable, sous windows 7, de recopier l'ensemble des fichier sur votre machine puis d'executer le setup.exe local.
  2. double cliquer sur setup.exe
  3. il demande si on veut executer on clique sur executer
  4. on coche Typical workstation
  5. on coche Network Licence
  6. on coche sur install
  7. Puis on demarre l'installation tanner Ledit
    1. on accepte la licences puis next
    2. on autorise tout le monde a utilier le soft (on coche anyone who…)
    3. on garde le repertoire d'installation par défaut.
    4. on fait une install typique (on garde coché Typical)
    5. on installe
    6. puis finish
  8. On configure maintenant l'environement.
    1. on accepte la licences puis next
    2. on autorise tout le monde a utilier le soft (on coche anyone who…)
    3. on garde le repertoire d'installation par défaut.
    4. on fait une install typique (on garde coché Typical)
    5. on installe
    6. puis finish
  9. On finalize
    1. on coche all license are obtained from one network server
    2. on met 192.168.70.20 dans Server 1
    3. et on laisse cocher Don't search for other servers
    4. puis OK

Il ne reste plus qu'a lancer Ledit.

Rq : au cas où l'adresse du serveur serait restée à celle de Marcoussis, 10.4.0.55, il faut la changer dans une variable d'environnement appelée LSERVRC, et mettre la nouvelle IP, 192.168.70.20 pour le serveur vaudou au C2N, .

Nouvelle version de l'install
Update: 04/09/219

Si vous utilisez une version récente de Ubuntu à partir de la version 18.04LTS, il est possible de suivre le tuto suivant. En cas de non fonctionnement alors se reporter sur la précédente version d'installation ci -dessous
Tout d'abord il faut installer wine64 ou la version complète de wine-stable

sudo apt-get install wine-stable winetricks  wine64
télécharger la version totale des “Tanner's tools”. smb:\\zette\depot\Logiciels_scientifiques\TannerTools\v14.13\TannerToolsV14.13

cd v14.13/TannerToolsV14.13/
wine64 ./setup.exe

suivre les instructions de l'installation et bien entrer l'adresse du serveur 192.168.70.20

Ensuite pour que l'installation profite à tout le monde il faudra copier le dossier ~/Desktop et surtout le dossier ~/.wine dans le répertoire /etc/skel et tous les nouveaux utilisateurs pourront alors profiter d'une install locale de l-edit. Combiner à une installation de type LDAP il semble que cela fonctionne. (jusqu'à aujourd'hui)

== Deprecated Version for the L-Edit installation ==

NOTES:

  1. les TannerTools sont un paquet 32 bits.
    1. Pour les versions anterieures a 14.04 et sur une architecture 64 bit il faut installer les ia32-libs pour que ca marche. Sous ubuntu il faut utiliser UNIQUEMENT apt-get ET PAS aptitude (car avec aptitude on a un probleme de dependance avec libmysqlclient16). Teste sur la version 11.10 de ubuntu.
    2. pour la version 14.04 il semble que cela ne soit plus necessaire.
  2. WINE attention ledit utilise wine et il embarque leur version il faut donc supprimer le paquet wine mais aussi le repertoire $HOME/.wine sinon quand on lance ledit on a setting dependencies puis il rend la main.

Il faut recuperer tanner-1413-rhel4.bin \\zette\depot\Logiciels_scientifiques\TannerTools\v14.13 via smb.

Ensuite en tant que superutilisateur il faut executer:

/bin/bash tanner-1413-rhel4.bin

Le script pose alors une question, à savoir dans quel répertoire il faut installer Ledit et soit on garde le choix initial, soit on sélectionne un autre rérpertoire et on tape return

Enfin pour pouvoir utiliser Ledit il faut modifier /etc/bash.bashrc et rajouter à la fin si on a garder le répertoire initial proposé à savoir /opt:

export TANNER_PATH="/opt/tanner"
export PATH="${PATH}:/opt/tanner/bin"
export TANNERHOST=192.168.70.20
== End ==

  • machines/olive.txt
  • Last modified: 2020/06/11 18:15
  • by 127.0.0.1