| unix ID | U:xxxx or u:xxxx | required |
| unix Home | H:/home/login or h:/home/login | required |
| unix Shell | S:/bin/bash or s:/bin/bash | not required |
| unix group | G:100 or g:100 | not required |
| unix Gecos | NDS Full Name attribute | not required |
Requirements:
Usage:
| -h | Print this help text |
| -F | Create a script to fix home directories (for usage on NFS home servers) |
| -G group to scan | (default= LinuxOK.PC) |
| -T treename | (default= INSA_ROOT) |
| -d | verbose printing |
| -U user id | first userid to process (default 100) |
| -L user id | last userid to process (default 65534) |
| -n number | Limit ouput to n lines (for testing) |
$DEFTREE="INSA_ROOT"; <-- change this to your NDS tree $DEFGRP="LinuxOK.PC"; <-- change this to match the user's group allowed to login from Linux
# when the script fits your needs, uncomment these 2 lines #REQUIRED for the fix script to run ! #$OVW_PWD=$ETC_PWD; #$OVW_SHADOW=$ETC_SHADOW;
[root@pc107-18 nw_utils]# ./nds2pwd.pl -F synching local database with NDS members of group LinuxOK.PC processing 1760 members of group LinuxOK.PC Home directory /cipc/profs/aarara does not exists for aarara [1192] Home directory /cipc/profs/hlegrine does not exists for hlegrine [1189] Home directory /cipc/profs/imcgill does not exists for imcgill [1194] Home directory /cipc/profs/jcarmona does not exists for jcarmona [1190] Home directory /cipc/profs/lbaillet does not exists for lbaillet [1195] Home directory /cipc/profs/lgaudiller does not exists for lgaudiller [1193] Home directory /cipc/profs/sasare does not exists for sasare [1191] BUG:user schehbi.PC has no or incomplete Unix infos in NDS -> 33 users kept and 1759 users added from 1760 members of LinuxOK.PC. script to fix 7 homes /tmp/ndsfix.LinuxOK.PC.sh created.
echo "Home directory /cipc/profs/aarara for aarara [1192]" <-- Unix UID and home from NDS mkdir /cipc/profs/aarara <- make the home cp -f /etc/skel/.bash* /cipc/profs/aarara <- copy .bashrc .bash_profile and .bash_logout chown -R 1192:users /cipc/profs/aarara <- set permissions setquota aarara 50000 55000 0 0 -a <- quota is 50 Mb quota -v aarara <- print user's quota echo aarara > /cipc/profs/aarara/username <- create a root owned file with user's name chmod 0711 /cipc/profs/aarara <- nobody can read, just traverse to reach public_html echo "Home directory /cipc/profs/hlegrine for hlegrine [1189]" mkdir /cipc/profs/hlegrine cp -f /etc/skel/.bash* /cipc/profs/hlegrine chown -R 1189:users /cipc/profs/hlegrine setquota hlegrine 50000 55000 0 0 -a quota -v hlegrine echo hlegrine > /cipc/profs/hlegrine/username chmod 0711 /cipc/profs/hlegrine ....
Download:
History:
WARNING: with the -F option, must be run on the NFS server for homes, not on any workstation
where local root user has normally no rights to NFS server for homes !!!
furthermore it may "saturate autofs" with too many mounted points when testing for existence of homes
WARNING 2: for the quota settings currently generated in the fix script to work, local /etc/passwd and /etc/shadow
must be uptodate ( overwritten with the produced passwd.nds and shadow.nds)
TODO:
Vous êtes notre eme visiteur