Ввод в домен Windows XP
Ввод в домен Ubuntu Linux
- Поменять пароль руту, тем самым включить его
passwd root
- Войти под рутом в систему
- Взять этот скрипт, положить в файл и запустить из под рута
umount /home -l
#adduser administrator
adduser student
mv /home/administrator /var
mv /home/student /var
usermod -d /var/administrator administrator
usermod -d /var/student student
cp /etc/ldap.conf /etc/ldap.conf.backup
cp /etc/nsswitch.conf /etc/nsswitch.conf.backup
echo "host 192.168.10.222
base ou=Services,dc=calculate
rootbinddn ou=Unix,ou=Services,dc=calculate
binddn cn=proxyuser,dc=calculate
bindpw calculate
port 389
ldap_version 3
bind_policy soft
nss_base_passwd ou=Users,ou=Unix,ou=Services,dc=calculate?one?shadowFlag=1
nss_base_shadow ou=Users,ou=Unix,ou=Services,dc=calculate?one?shadowFlag=1
nss_base_group ou=Groups,ou=Unix,ou=Services,dc=calculate?one
nss_base_group ou=Groups,ou=Samba,ou=Services,dc=calculate?one
pam_password md5" > /etc/ldap.conf
echo "passwd: files ldap
shadow: files ldap
group: files ldap
hosts: files dns
networks: files dns
services: files ldap
protocols: files ldap
rpc: db files
ethers: db files
netmasks: files
netgroup: files ldap
bootparams: files
automount: files ldap
aliases: files" > /etc/nsswitch.conf
echo "session required pam_unix.so
session required pam_mkhomedir.so skel=/etc/skel/
session optional pam_ldap.so" > /etc/pam.d/common-session
id vasya
mkdir /media/share
cat /etc/fstab | sed 's/192.168.10.2/#192.168.10.2/g' > /tmp/fstab
cp /etc/fstab /etc/fstab.backup
mv /tmp/fstab /etc/fstab
echo "# mount homes for cds users
192.168.10.222:/var/calculate/server-data/samba/home /home nfs rw,soft,bg,nolock 0 0
# mount shares for cds users
192.168.10.222:/var/calculate/server-data/samba/share /media/share nfs rw,soft,bg,nolock 0 0
" >> /etc/fstab
echo "всё!"