[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[K12OSN] An auto mount NT winbind workaround
- From: Ash Green <ash lathom-high lancsngfl ac uk>
- To: k12osn redhat com
- Subject: [K12OSN] An auto mount NT winbind workaround
- Date: Tue Apr 1 07:42:13 2003
After fighting with winbind & searching (with no joy) for a PAM solution
to map my NT users' home directory on login to my K12LTSP network, I've
cobbled together a rather nasty "paper and glue" solution.
Hope it works for others!
This is a script that allows people to login to their home directories
on the NT server in the ./server directory in their home drive on the
linux system. Here?s the content of /usr/bin/mountme (chmod +x+s it):
# Ash's script to mount users
# This script relies on the existance of a file in /tmp, this being
# the output of the winnt command:
# addusers /d \\ltsp\tmp\userlist.txt
# (the addusers.exe program is part of the Winnt4 Server Resource Kit)
# In effect, this script utilises the listing to locate the home
# drive and share for the user's home directory in linux, allowing
# this to be used in a smbmount command.
# (This has the same effect as a:
# net use z: /home
# command in NT).
# query logged on user, and remove preceding DOMAIN+ tag
shortname=$(whoami | sed 's|DOMAIN+||')
echo "without Domain is " $shortname
# search userlist.txt for existance of name, select the 6th
# value in the entry(NT home directory), and change the backslashes
# to forward slashes
unixdir=$(grep -i -m 1 $shortname /tmp/userlist.txt | awk -F"," '{print
$6}' | sed 's#\\#/#g')
echo "unixdir is " $unixdir
# mount home directory in the (precreated) ./server/ directory
# (the ./server/ dir is in the /etc/skel directory
smbmount $unixdir ./server/ -o username=$shortname
& below is an entry for icewm - adjust for your own window manager.
I?ve added an entry into the icewm menu (startmenu) which launches a
terminal window, which prompts for the users? password. This then kills
itself automatically. The line is in /usr/X11R6/lib/X11/icewm/menu, and
it?s:
prog "Z: drive" "xterm" xterm -e /usr/bin/mountme
Enjoy!
Ash
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]