GearHack

: :

Add Comment | Related Links | TrackBack
Related Content

Mount a Windows network share on Linux

At home, I have both Linux and Windows computers networked throughout the house. And it's fairly easy to access Windows NTFS drive using GNOME's "Place" -> "Network". In fact, this is probably the easiest way for Linux computer to read and write NTFS drives. The problem? GIMP can't read the images on the network share in this manner. The only solution is to mount the Windows NTFS drive locally. So I made a mount directory in my home and issued the following command:

sudo mount -t smbfs "//server name/share name" "mount point"

"server name" is the Windows computer server name. And "share name" is the drive's network share name. "mount point" is the directory you want to mount the drive to. However, running the above command caused the following error message:

mount: wrong fs type, bad option, bad superblock on //cauldron/HD Part (H),
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

The error message caused me to scratch my head for a while. And "dmesg | tail" provided no useful information. It wasn't until I typed "smbmount" on the command-line that I realized what's wrong:

The program 'smbmount' is currently not installed. You can install it by typing:
sudo apt-get install smbfs
bash: smbmount: command not found

Ah ha! See, "mount -t smbfs" is really the same as "smbmount". Except the error message aren't always the same. After installing smbfs, I issued the mount command again and was immediately awarded with the ability to access the Windows NTFS drive. Even GIMP was able to load up the image files.

However, the solution is incomplete. The mount command caused the Windows NTFS share to be mounted as read-only. I couldn't write anything to the NTFS drive. So I'll have to look into this issue. A read-only drive isn't all that useful to me.

Chieh Cheng
Mon, 27 Aug 2007 03:05:58 +0000

The reason the NTFS drive is mounted read-only is because I've executed the mount command using sudo. I haven't given myself permission to mount the drive as read/write. To do that, you'll have to issue the mount command without sudo. However, you'll get the following error message:

smbmnt must be installed suid root for direct user mounts (1000,1000)
smbmnt failed: 1

The reason you get that error message is because smbfs is installed as root. Only root can perform the mount operation. To give users (including yourself) the ability to mount samba shares, you'll have to setuid root the smbmnt command. To accomplish that, issue the following command:

sudo chmod u+s /usr/bin/smbmnt

Now mount the drive again without sudo and you'll have a read and writable mount point.

Chieh Cheng
Mon, 27 Aug 2007 03:34:59 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Related Links

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 6 + 4?
Click button only once, please!

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.


Articles | Wiki
Forums | Latest | RSS
Library | Links | News
Search | Store | Help

134 Users Online



Hacking Digital Cameras
Fun for Photographers

Amazon Associate

Copyright © 2004 - 2024. All Rights Reserved.