Thread: NIS with NFS mounted homeareas and failed mounts.
hi,
i've searched , in end think i've got solution (hack).
the setup:
==========
network looked after /etc/network/interfaces
#eth0
auto eth0
iface eth0 inet dhcp
purged network-manager, gnome-network-manger, etc...
nis, autofs , required packages installed.
/etc/auto.master entry:
/home yp:auto.home --timeout=60,-fstype=nfs4
default user account homearea moved location.
cat /etc/yp.conf entires:
domain nisdomainname server slave-nis1
domain nisdomainname server slave-nis2
the bug:
========
once gdm has started nis account users unable login homeareas not mount. alt+f1 log in local default account , run service autofs restart, alt+f7 nis accounts can login.
the reason:
===========
once networking starts nis starts not complete until network connections has completed, autofs comes without nis fails setup maps.
the solution:
=============
2 part solution, part 1 need modify grub boot in text mode gdm not start. done modifying /etc/default/grub line starting grub_cmdline_linux= looks like:
grub_cmdline_linux="text"
run 'update-grub'
second part requires setting script /etc/init.d/autofs-fix:
#!/bin/bash
ping -c 1 -w 60 ip_address > /dev/null
until [ $? -eq 0 ]; do
ping -c 1 -w 60 ip_address > /dev/null
done
ypwhich="blank"
until [[ $ypwhich = "nisdomainname" ]]; do
service nis restart
ypwhich=`ypdomainname`
done
service autofs restart
service gdm start
exit 0
i) replace ip_address know ip_address on network e.g. dns server ip.
ii) replace nisdomainname nis domain name.
place link in /etc/rc2.d e.g.
cd /etc/rc2.d
ln -s /etc/init.d/autofs-fix s99autofs-fix
when reboot gdm not start until nis has completed , autofs has been restarted.
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] NIS with NFS mounted homeareas and failed mounts.
Ubuntu
Comments
Post a Comment