Changes

Jump to navigation Jump to search
994 bytes added ,  23:41, 5 October 2013
Line 69: Line 69:     
4.  See the various examples in /usr/doc/lazy-admin-tools for the format of the input file.
 
4.  See the various examples in /usr/doc/lazy-admin-tools for the format of the input file.
 +
 +
====Easy Scripting====
 +
 +
The purpose is to made an easy and quick script to play with the lazzy admin tools when you want to add a user
 +
 +
nano script-lazzy
 +
 +
#!/bin/bash
 +
 +
read -p "set the  login (mandatory field)      : " login
 +
 +
read -p "set the firstname (mandatory field)    : " firstname
 +
 +
read -p "set the lastname (mandatory field)    : " lastname
 +
 +
read -p "set the password                      : " password
 +
 +
read -p "set the first group                    : " groupe1
 +
 +
read -p "set the second group                  : " groupe2
 +
 +
read -p  "set the Limit with grace period      : " quota1
 +
 +
read -p  "set the Absolute limit                : " quota2
 +
 +
lat-users -a -c "$login|$firstname|$lastname|$password|||||||||$groupe1|$groupe2"
 +
lat-quota -c "$login|$quota1|$quota2"
 +
 +
read -p "Do you want to launch it again, then type enter, else ctrl+c: "
 +
 +
/usr/bin/script-lazzy
 +
 +
chmod 755 script-lazzy
 +
mv script-lazzy /usr/bin
 +
 +
to launch the script then do
 +
 +
script-lazzy
    
===Forum References===
 
===Forum References===

Navigation menu