#!/bin/bash
NEW_USERS="/path/to/file.txt" #space separated user password group
HOME_BASE="/home/"
cat ${NEW_USERS} | \
while read USER password GROUP
do
pass=$(perl -e 'print crypt($ARGV[0], "password")' $password)
useradd -g ${GROUP} -p ${pass} -m -d ${HOME_BASE}${USER} ${USER}
done
Wednesday, September 24, 2008
linux adduser bash batch script
Monday, September 22, 2008
Friday, September 5, 2008
ltsp - xserver configuration
first in
dhcp example:
Then edit your
Example:
/etc/ltsp/dhcp.conf
add/change this line: option root-path "/var/lib/tftpboot/ltsp/i386";
dhcp example:
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.200 192.168.0.250;
option domain-name "example.com";
option domain-name-servers 192.168.0.150;
option broadcast-address 192.168.0.255;
option routers 192.168.0.150;
# next-server 192.168.0.1;
# get-lease-hostnames true;
option subnet-mask 255.255.255.0;
# option root-path "/opt/ltsp/i386";
option root-path "/var/lib/tftpboot/ltsp/i386";
if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
filename "/ltsp/i386/pxelinux.0";
} else {
filename "/ltsp/i386/nbi.img";
}
}
Then edit your
/var/lib/tftpboot/ltsp/i386/lts.conf
file.Example:
[00:12:FB:01:74:AF]
# LDM_AUTOLOGIN=true
# LDM_USERNAME=ucenik01
# LDM_PASSWORD=ucenik
SOUND=False
XSERVER = sis
X_MODE_0 = 1280x1024
X_MODE_1 = 1024x768
X_MODE_2 = 800x600
Subscribe to:
Posts (Atom)