- Automatically mount Novell NetWare shares without prompting passwords when logging in.
- Automatically unmount Novell NetWare shares without prompting passwords when logging out.
Configurations
- "$HOME/.nwclient"
- Create the file with permissions of "0600".
- Add "Server/User Password" pair per each line as follows:
where "NW_UN1/2" could be either just a NetWare username orNW_Server1/NW_UN1 PW1
NW_Server2/NW_UN2 Password2
a NetWare username appended by its context (e.g.,
"joe.ee_dept.eng_school.great_univ"). - "$HOME/.bash_profile"
- Add "ncpmount" command as follows:
if [ ! -d /mount/point1/dir1_in_mounted_share ]; then
# Check the above to prevent duplicate mount.
ncpmount -S NW_Server1 -U NW_UN1 -u Linux_UN -V path/to/subdirectory1 -A NW_Server1_DNS_Name /mount/point1
fi
# We need "-m" below to allow multiple mounts from the same server.
if [ ! -d /mount/point2/dir2_in_mounted_share ]; then
ncpmount -S NW_Server2 -U NW_UN2 -u Linux_UN -V path/to/subdirectory2 -m -A NW_Server2_DNS_Name /mount/point2
fi
if [ ! -d /mount/point3/dir3_in_mounted_share ]; then
ncpmount -S NW_Server2 -U NW_UN2 -u Linux_UN -V path/to/subdirectory3 -m -A NW_Server2_DNS_Name /mount/point3
fi
- Add "ncpumount" command as follows:
if [ `w | grep pts | grep Linux_UN | wc -l` -eq 1 ]; then
# The following will be executed only when this shell is the last login shell.
if [ -d /mount/point1/dir1_in_mounted_share ]; then
ncpumount /mount/point1
fi
if [ -d /mount/point2/dir2_in_mounted_share ]; then
ncpumount /mount/point2
fi
if [ -d /mount/point3/dir3_in_mounted_share ]; then
ncpumount /mount/point3
fi
fi

2 comments:
Nice brief and this post helped me alot in my college assignement. Thank you as your information.
Pretty great post. I simply stumbled upon your weblog and wanted
to mention that I have really enjoyed surfing around your
weblog posts. In any case I will be subscribing on your rss feed and I hope you
write again very soon!
Also visit my web blog ... calories walking
Post a Comment