Networking Forums

Networking Forums > Computer Networking > Linux Networking > persistant win "share" mounting

Reply
Thread Tools Display Modes

persistant win "share" mounting

 
 
bbaley
Guest
Posts: n/a

 
      09-17-2003, 04:45 PM
hi,

I am somewhat familiar with mounting and unmounting and "mapping" a
directory to a windows share, but do not know how to make this persist
or automate it such that it is mounted and unmounted when I log in/out
[linux].

Or, is the only "proper" way to mount/unmount via a script like the
desktop cdrom/floppy desktop config files?

If this is a good method, where can I find info on the settings?
[again, for a windows share]

[Desktop Entry]
Dev=/mnt/floppy
FSType=Default
Icon=3floppy_mount
MountPoint=/mnt/floppy
ReadOnly=0
Type=FSDevice
UnmountIcon=3floppy_unmount

Thanks
bbaley [at] 4gsys [dot] com
 
Reply With Quote
 
 
 
 
Michael Powe
Guest
Posts: n/a

 
      09-18-2003, 12:50 PM
>>>>> "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
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Fwd: SPEWS DOLTS "SneakyP", "Kevin!:?)", "WindsorFox" SPAM braodbandnewsgroup] !:?) Broadband 0 11-30-2005 01:04 AM
Re: SPEWS SLIMES "WindsorFox", "Kevin-!:?)", "Spin Dryer" get the cold shoulder at broadband ng! SneakyP Broadband 0 11-29-2005 10:46 PM
Attention Plus.net Re: SPEWS DOLTS "WindsorFox", "Kevin-!:?)", "SpinDryer" SPAM broadband newsgroup !:?) Broadband 0 11-28-2005 04:28 AM
Attention Plus.Net Re: SPEWS DOLTS "WindsorFox", "Kevin-!:?)", "SpinDryer" SPAM braodband newsgroup !:?) Broadband 0 11-28-2005 03:03 AM
"hotspot" or "hot spot", "wireless" or "wi-fi" or "wi fi" ? Nic O`Neill Wireless Internet 3 02-12-2004 07:42 AM



1 2 3 4 5 6 7 8 9 10 11