>>>>> "bbaley" == bbaley <(E-Mail Removed)> writes:
bbaley> hi, I am somewhat familiar with mounting and unmounting
bbaley> and "mapping" a directory to a windows share, but do not
bbaley> know how to make this persist or automate it such that it
bbaley> is mounted and unmounted when I log in/out [linux].
bbaley> Or, is the only "proper" way to mount/unmount via a script
bbaley> like the desktop cdrom/floppy desktop config files?
bbaley> If this is a good method, where can I find info on the
bbaley> settings? [again, for a windows share]
you can put it in /etc/fstab to be mounted at boot. if you want it
umounted when you log out, you could put that in your .logout file.
that would mean having a remount in your login script. in bash, this
would probably be .bash_profile. assuming you are an ordinary user
and not root, you probably will need to set up sudo to accomplish
that.
sudo /bin/mount -t smbfs -o <credentials & options> //machine/share
/mountpoint
in fstab, a possible entry might be
//pdxpowem03/NetIQ /home/powem/pdxpowem03 smbfs dmask=777,rw,users,noauto,credentials=/home/powem/.smb_auth_pdx
there are some points to be noted. if you open/close an xterm as a
login shell (xterm -ls), then you probably should add a conditional to
the mount command so that it doesn't keep trying to mount an already
mounted device. and, i'm not sure if .logout is executed when you
close an xterm -ls, or not. assuming it is, you also need to make
that conditional, as you probably don't want to umount the share every
time you close a terminal window. finally, logging out from kde or
gnome when kdm/gdm is running, may have a completely different set of
option files that need to be configured. i don't use those products,
so i don't know what they might be, but the principle would be the
same.
my suggestion would be, mount the share on boot through fstab if it's
a frequently-used one and always available (not a laptop, e.g.). then
leave it alone.
mp
--
cat: /home/powem/.signature: No such file or directory
|