|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [PLUG] Xubuntu auto mount
|
Adam:
I struggled with the same thing and devised a script that runs when a user logs
in. It requires that sudo be configured to allow a user script to mount file
systems. Here is a copy of the script that I run today with a few identifying
items removed:
export
OPTIONS='rw,cred=/home/user/bin/cred.txt,file_mode=0000,dir_mode=0000,debug=1,dom=MSHOME,servern=SERVER'
cd ~/MOUNTS/
for dir in user share music
do
cd $dir >> /dev/null
RES=`df -h . | gawk '/MOUNTS/ { print 1 } '`
if test "$RES" == '1' ; then
echo $dir is mounted
else
echo mounting $dir
sudo /sbin/mount.cifs //MOUNTS/$dir /home/user/MOUNTS/$dir/ --verbose -o
$OPTIONS
fi
cd ..
done
It's a hack but it works. In the future I'd use the names of the existing
directories in the "MOUNTS" directory an mapping to the server shares to be mounted.
I put a link to this file in the KDE directory that contains scripts to run on
startup but you will, of course, have to choose a different course.
Hope this helps!
Eric
Adam J. Zion wrote:
> This should be an easy one, but it hasn't been.
>
> Let's say I have multiple users on a linux box. How can I configure it
> so that, if ilana logs on, she's automatically connected to her share on
> the linux server, and if adam logs in I'm automatically connected to my
> share. Note: all shares are SMB.
>
> Thx.
>
> --
> Adam Zion, MCSE+I, Registered Linux User #471910
>
> "If lawyers are disbarred and clergymen defrocked, doesn't it follow
> that electricians can be delighted, musicians denoted?" * George Carlin
> (RIP)
--
# Eric Lucas
#
# "Oh, I have slipped the surly bond of earth
# And danced the skies on laughter-silvered wings...
# -- John Gillespie Magee Jr
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|