Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Mounting command samba / share, make a script to mount windows share< Next Oldest | Next Newest >
Patrick Offline





Group: Members
Posts: 333
Joined: Sep. 2004
Posted: Nov. 29 2004,12:16 QUOTE

I use samba.dsl to use a windows share on a other PC. Works nice but i want to automate the mounting of this share.. (put it in a script and behind a hotkey )

I tried:

mount -t smbfs -o username=administrator,password=xxxxxxx //machinename/sharename$ ~/mnt/machinename

It doesn't work...  ( i made the mountpoint before i tried to mount)

error: mount: wrong fs type, bad option, bad superblock on //MN120GHOSTNEW/DSL$,
      or too many mounted file systems

any tips?


--------------
Usb-stick sandisk cruzer titanium 512 Mb:
DSL 2.3 (final)
Firefox (Mozilla 1.06)
WM -biff  -cdplay -clockmon -smixer -usic -top -net -biff -ifinfo -cpuload
gps vnc LinNeighborhood (samba) QtParted bdc
xawtv imagemagick xplanet
Back to top
Profile PM WEB 
Patrick Offline





Group: Members
Posts: 333
Joined: Sep. 2004
Posted: Nov. 29 2004,12:46 QUOTE

Got it (thnx to Henk_1955):

smbmount //MN/DSL$ /home/dsl/mnt/MN/DSL$/ -o username=administrator%password,fmask=644,dmask=755,uid=1001,gid=50,ip=xxx.xx.xx.xx,debug=0,workgroup=workgroupname


--------------
Usb-stick sandisk cruzer titanium 512 Mb:
DSL 2.3 (final)
Firefox (Mozilla 1.06)
WM -biff  -cdplay -clockmon -smixer -usic -top -net -biff -ifinfo -cpuload
gps vnc LinNeighborhood (samba) QtParted bdc
xawtv imagemagick xplanet
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Nov. 29 2004,15:00 QUOTE

Your original should still work, with a couple of exceptions.  The mount command won't work as a regular user unless specifically allowed, e.g. in /etc/fstab.  Also, I don't think the mountpoint should contain a tilde, but if I'm wrong, please correct me.

If you want to automate it, you could add the info to /etc/fstab and have it mount on boot....the password would be viewable by all users, though.

Something you might consider, since this is a script, is adding an argument test to the script, backed up by a password prompt:

if [ ! $1 ]; then
echo "enter password"
read pass
else
pass="$1"
fi

I don't know what administrator%password means, though, so this might be unnecessary.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
Patrick Offline





Group: Members
Posts: 333
Joined: Sep. 2004
Posted: Nov. 30 2004,07:52 QUOTE

The mount-line as you see it works fine (password has to be filled in after the: administrator% though)

--------------
Usb-stick sandisk cruzer titanium 512 Mb:
DSL 2.3 (final)
Firefox (Mozilla 1.06)
WM -biff  -cdplay -clockmon -smixer -usic -top -net -biff -ifinfo -cpuload
gps vnc LinNeighborhood (samba) QtParted bdc
xawtv imagemagick xplanet
Back to top
Profile PM WEB 
Patrick Offline





Group: Members
Posts: 333
Joined: Sep. 2004
Posted: Nov. 30 2004,07:59 QUOTE

By the way... The ip-part of the mount-line can be left out!

This is my executable:

mkdir ~/mnt
mkdir ~/mnt/MN120GHOSTNEW
mkdir ~/mnt/MN120GHOSTNEW/DSL$
smbmount //MN120GHOSTNEW/DSL$ /home/dsl/mnt/MN120GHOSTNEW/DSL$/ -o username=administrator%password,fmask=644,dmask=755,uid=1001,gid=50,debug=0,workgroup=WORKGROUPNAME
sudo emelfm /ramdisk/home/dsl/mnt/MN120GHOSTNEW/DSL$


--------------
Usb-stick sandisk cruzer titanium 512 Mb:
DSL 2.3 (final)
Firefox (Mozilla 1.06)
WM -biff  -cdplay -clockmon -smixer -usic -top -net -biff -ifinfo -cpuload
gps vnc LinNeighborhood (samba) QtParted bdc
xawtv imagemagick xplanet
Back to top
Profile PM WEB 
7 replies since Nov. 29 2004,12:16 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Mounting command samba / share

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code