PDA

View Full Version : Mount samba shares with utf8 encoding using cifs


Pages : 1 2 3 4 5 [6]

dmizer
August 16th, 2010, 10:40 AM
I have some weird filename on Samba mounted fs which can't be read and since this file includes network key of a program, this program does not run. If I mount same filesystem with NFS it's ok.

The fstab with smb mounted system has a line:
//192.168.50.5/desk /media/desk cifs guest,iocharset=utf8,noperm,file_mode=0777,dir_mod e=0777,rw 0 0

The problematic file has a filename ASP32$$$.ID2. No metter what I try with this file, I always get permission denied under CIFS

Is there a way to get around this?
Take a look at the troubleshooting section under the heading Files owned by root / "The folder contents could not be displayed"

jeff8356
August 20th, 2010, 10:21 PM
I have been lurking around this thread for a couple of weeks now and have tried all of the fixes listed here. Problem is, none of them solved the long shutdown! (about 5 minutes)
The startup goes fine, connects to multiple shares on my Buffalo Linkstation NAS, access is quick, etc...
//192.168.2.115/Jeff /mnt/NASdocs cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
//192.168.2.115/Download /mnt/NASdownload cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
//192.168.2.115/photos /mnt/NASphotos cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
//192.168.2.115/Backup /mnt/NASbackup cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0

I can see and access ALL network shares on all computers/devices. All that works fine.

But none of the fixes for the long shutdown have any effect. I even removed network-manager completely (as posted somewhere in this thread) and installed gnome-network-admin. I tried all the fixes on page 1 and most of the others. Still the same. As a temporary solution I just made a little executable I click on to umount the cifs shares before logout
#!/bin/sh
sudo umount -a -t cifs
works like a charm but is not a permanent solution.

Here is my setup: (all IP addr are in the same subnet: 192.168.2.###)
HP Pavillion dv7 (64bit) laptop using wifi (DHCP IP) running Mint 9 (latest updates)
HP Pavillion dv6 (64bit) laptop using wifi (DHCP IP) running Windows Vista
Buffalo Linkstation Quad 4TB - RAID5 - (static IP)
Linksys NAT router w/WAP using WPA security and public DNS servers
Netgear wireless print server (static IP)
No firewalls behind router
Throw in a Kodak wifi picture frame and a couple of iPhone's using wifi (DHCP IP for all 3)

All of this works flawlessly together except the shutdown on the Linux laptop. It's making me want to change to a different distro just to get away from this headache.

Any new info on this problem would be appreciated.

Jeff...

dmizer
August 21st, 2010, 06:34 AM
I have been lurking around this thread for a couple of weeks now and have tried all of the fixes listed here. Problem is, none of them solved the long shutdown! (about 5 minutes)
The startup goes fine, connects to multiple shares on my Buffalo Linkstation NAS, access is quick, etc...
//192.168.2.115/Jeff /mnt/NASdocs cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
//192.168.2.115/Download /mnt/NASdownload cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
//192.168.2.115/photos /mnt/NASphotos cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
//192.168.2.115/Backup /mnt/NASbackup cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0

I can see and access ALL network shares on all computers/devices. All that works fine.

But none of the fixes for the long shutdown have any effect. I even removed network-manager completely (as posted somewhere in this thread) and installed gnome-network-admin. I tried all the fixes on page 1 and most of the others. Still the same. As a temporary solution I just made a little executable I click on to umount the cifs shares before logout
#!/bin/sh
sudo umount -a -t cifs
works like a charm but is not a permanent solution.

Here is my setup: (all IP addr are in the same subnet: 192.168.2.###)
HP Pavillion dv7 (64bit) laptop using wifi (DHCP IP) running Mint 9 (latest updates)
HP Pavillion dv6 (64bit) laptop using wifi (DHCP IP) running Windows Vista
Buffalo Linkstation Quad 4TB - RAID5 - (static IP)
Linksys NAT router w/WAP using WPA security and public DNS servers
Netgear wireless print server (static IP)
No firewalls behind router
Throw in a Kodak wifi picture frame and a couple of iPhone's using wifi (DHCP IP for all 3)

All of this works flawlessly together except the shutdown on the Linux laptop. It's making me want to change to a different distro just to get away from this headache.

Any new info on this problem would be appreciated.

Jeff...

Usually with multiple mounts, this problem is related to one mount. Try commenting them all and see if you still have a problem. Then try each mount separately to see which one is causing the problem. Then we can do more troubleshooting.

jeff8356
August 21st, 2010, 04:47 PM
Usually with multiple mounts, this problem is related to one mount. Try commenting them all and see if you still have a problem. Then try each mount separately to see which one is causing the problem. Then we can do more troubleshooting.

No difference, long shutdown still exists.
As mentioned in other parts of this thread, I am leaning towards the wifi being the problem. Also I started having problems with wifi dropping out momentarily. I did a clean OS install just to get back to basics and rule out any additional software I may have installed. The only thing I have changed since the clean install was deleting NM and using Wicd instead. Re-established my previous mounts in fstab. And, as before, everything works fine except the long shutdown.

After looking at my dmesg again I see I am having some problems with the ath5k driver for the wifi.

[ 42.076437] ath5k phy0: noise floor calibration timeout (2437MHz)
[ 42.493719] ath5k phy0: noise floor calibration failed (2442MHz)
[ 42.913720] ath5k phy0: noise floor calibration failed (2447MHz)
[ 43.333718] ath5k phy0: noise floor calibration failed (2452MHz)
[ 43.753706] ath5k phy0: noise floor calibration failed (2457MHz)
[ 82.084617] ath5k phy0: noise floor calibration timeout (2437MHz)
And the list keeps getting longer over time!

I have read in many other threads that most Atheros users do have problems. So before I can try to fix the shutdown problem I will need to get my wifi working properly first. I have read some of the wifi threads here but unfortunately many of them pre-date my laptop, so I am off to hunt for more recent solutions.

BTW - Kudos to you for sticking with this for so long. 4 years and 100+ pages!?!?! Your a Saint!

FrustratedWithChanges
August 22nd, 2010, 02:21 AM
I am using version 10.04 Intrepid

I'm connecting to a Samba server, Samba version 3.2.7-11.7.1

Only twice have I ever had cifs actually work for me. Tonight I've wasted two hours of my time only to find out that the old command:

mount -t cifs -o guest, file_mode=0666,dir_mode=0777 //192.168.x.x/NameOfShare /Path/To/Mount/Point

...that used to work, (when I passed the command as part of the /etc/init.d/smb script at artart up) doesn't work now.

The below...

mount -t cifs -o sec=none,uid=jack,file_mode=0666,dir_mode=0777 //192.168.0.30/dell /home/jack/Mortonassociate/DELL/

...now works. (At least for my situation.

Ohhhhhhhhhhh....Ohhhhhhh OHHHHH....ohhhhhh thaaaat's it. Ohhhhhhh. OHHHHHH!

To get the bloody thing to mount and work I created a script in /etc/init.d called CifsMountUnMount that mounts and unmounts the shares at startup.

It feels "freer" to just right click and select "share"

Never have I had any success at modifying /etc/fstab. I don't even bother.

#! /bin/sh
# /etc/init.d/CifsMountUnmount
#

# Some things that run always
touch /var/lock/CifsMountUnmount

case "$1" in
start)
echo "Starting script CifsMountUnMount"
mount -t cifs -o sec=none,uid=jack,file_mode=0666,dir_mode=0777 //192.168.0.30/dell /home/jack/Mortonassociate/DELL/
mount -t cifs -o sec=none,uid=jack,file_mode=0666,dir_mode=0777 //192.168.0.30/drobo /home/jack/Mortonassociate/DROBO/
;;

stop)
echo "Stopping script CifsMountUnMount"
umount /home/jack/Mortonassociate/DELL/
umount /home/jack/Mortonassociate/DROBO/
;;

*)
echo "Usage: /etc/init.d/CifsMountUnMount {start|stop}"
exit 1
;;

esac
exit 0

Just copy that into a text file and place it in /etc/init.d/

Then run, at the command prompt:

update-rc.d CifsMountUnMount

And by golly it works.

Oh, but that solution won't work probably in six months and we'll all be doing this again. Well, I won't because I'm giving up on Linux.

):P

And all those other web pages with elaborate explanations on them, yeah they got outdated too.

Apparently:

1. uid=jack lets me actually use the files I've mounted in my own home directory.
(Reminds me of Vista...confirm or deny. "Would you like to install your printer, confirm or deny?" "The shell service says you want to install a program. Confirm or deny?" "The confirmation service says you want to confirm. Confirm or deny?")

2. "-o sec=none," lets me be a guest. The man page says if you specify guest, you need not supply a password. That is incorrect, at least with my version.

(Again, more Vista: "The guest service says you want to be a guest, confirm or deny? The Man page doesn't say you should use sec=none, so confirm." "Your parish priest thinks this is a good way to do gain penance. Confirm or deny?" "The confirmation service says you want to confirm. Confirm or deny?")

My mount point: /home/jack/Mortonassociate/DROBO/

My server ip is: //192.168.0.30

Share is: /dell

I'm sick of Linux. I'm sick of wasting time trying to figure this kind of crap out only to have to do it all over again every time I upgrade. (What a year??) I'm sick of Wine going nowhere and I'm sick of not having the apps required for the company I work for.

I was close in 2002. Nothing in 10 years. That year, the business I'm in, Linux could have been used to do everything required on the desktop.

Not any more because the Windows apps changed and Wine hasn't kept up.

I was close in 2002. Nothing in 10 years.

By the way it takes twice as long to find answers at Google for Ubuntu because I can't just search for 10.4 or just Intrepid. Part of the answer was found searching the term Debian.

But the entirity of this solution is a mish mash of other solutions plus some trial and error.

I'm sick of Windows, I'm sick of the not having a choice, I'm sick of having to ask for someone to hand me a box, I'm sick of installing Windows twice, I'm sick of broken Windows upgrades.

I left Suse because it kept mangling my master boot record. It took forever just to open the package manager. Repositories got old quick. It no longer supported my graphics cards - the same ones, upon an "upgrade" (no apps in repositories).

Four hours to figure this crap out.

11:00 PM before I leave to go home. "Yep, I was working on getting a Linux desktop to work. Sorry hon."

We have over 100 pages of questions, conflicting instructions (of no ones fault because they differ - hell everyone was kind to each other [and when kindness is frustrated, well, that annoys me]). At that point [100 pages] - the forms are no longer a resource.

Problem with Linux is that some things work for some people, others don't, all depending upon what version you use. And very unclear man pages.

Can Linux developers make up their mind so we can have some stability around here? As in - once we know what to do we don't got to relearn it again?

Might this be a desktop barrier?

Gee, I don't know. I'll get back to you on that one.

But at least it had KDE 3 at one point.

BTW - I think both Gnome and KDE 4 suck.

This has got to be the lowest point I've seen it in almost 10 years.

dmizer
August 22nd, 2010, 08:30 AM
We have over 100 pages of questions, conflicting instructions (of no ones fault because they differ - hell everyone was kind to each other [and when kindness is frustrated, well, that annoys me]). At that point [100 pages] - the forms are no longer a resource.

Problem with Linux is that some things work for some people, others don't, all depending upon what version you use. And very unclear man pages.

Can Linux developers make up their mind so we can have some stability around here? As in - once we know what to do we don't got to relearn it again?

While I realize that it's probably pointless for me to respond to your post:

1) You will notice by the change log at the bottom of the first post in this howto that I have meticulously kept the first post updated with all the information I encounter while supporting this thread. I don't know how to make it more useful than that.

2) I have used the exact same mount command to mount my server's shares across multiple systems and over 8 releases of Ubuntu (that's over 4 years of solid use). Never once have I found it necessary to change the command.

3) Most of the changes in Samba are related to changes that Microsoft makes. If we don't change Samba to keep up with Windows, eventually Linux would only be able to connect to Win98 and XP machines.

4) Current changes in Samba are a result of development which will soon support Active Directory. While this may cause bumps in the short term, I think this is a pretty good reason for making changes in Samba.

lobostock1
August 23rd, 2010, 10:11 AM
THaaaaaaaaaanks! this topic is very useful with small NAS (specially Dlink)........

JoeEndUser
August 24th, 2010, 04:57 PM
There is a bug that causes a conflict between rhythmbox and winbind in Karmic and Lucid. Rhythmbox crashes when accessing any network/internet resource. The only forum link I have found is here:

http://ubuntuforums.org/showthread.php?t=1453768

Obviously, uninstalling winbind is not a good solution. I believe there are bug reports submitted, but appear unconfirmed. I don't expect you have a fix, but curious if you had heard and if you have any ideas?

Thanks very much for this thread. It has saved my hair.

jeff8356
August 24th, 2010, 07:38 PM
Ok, I'm back.
Got my wireless working properly so now it back to solving the "long shutdown" problem.
I have tried many of the fixes in this thread as well as many others. Re-name files in rc0.d and rc6.d, trying different scripts, and many others. Nothing worked.

I did come up with a simple solution (sort of). The only caveat is that you have to logout, then shutdown. I know this works in Gnome but I dont know if it will work in other desktops.

I followed the pertinent instructions on page 1 (BTW- I am not using winbind and removed the wins entry from nsswitch.conf for other reasons. I didnt need winbind and wins was causing serious delays in web browsing)

I edited my /etc/gdm/PostSession/Default file like so:
Open Terminal
sudo nano /etc/gdm/PostSession/DefaultThen add the following line:
#!/bin/sh
/etc/init.d/umountnfs.sh stop

exit 0Press ctrl X, then Y - enter

Remember, you have to logout first (Menu > Logout > click Logout).
Then click the shutdown button on the main screen (lower right corner).

This may have already been posted somewhere in this thread and if it was, I apologize to the original author. But this thread is very long so I decided to post it anyway.

I know this is not a permanent fix but, in my case, its easier to teach someone to "Logout then Shutdown".

BTW - This "Long shutdown bug with wifi" has been posted many times in Launchpad. Apparently, even after a couple of years, they still have not fixed it. Hopefully Canonical will come up with a fix soon. https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/211631/?comments=all

Any comments/suggestions?

_______________________
My stuff:
HP Pavillion dv7 Laptop - AMD Turion X2-64
Ubuntu 10.04 & Mint 9
Buffalo Linkstation Quad
(plus a couple of windows boxes :(

dmizer
August 24th, 2010, 08:34 PM
There is a bug that causes a conflict between rhythmbox and winbind in Karmic and Lucid. Rhythmbox crashes when accessing any network/internet resource. The only forum link I have found is here:

http://ubuntuforums.org/showthread.php?t=1453768

Obviously, uninstalling winbind is not a good solution. I believe there are bug reports submitted, but appear unconfirmed. I don't expect you have a fix, but curious if you had heard and if you have any ideas?

Thanks very much for this thread. It has saved my hair.

Please post your current /etc/nsswitch.conf file. There are reports that changing the order of the elements in this file can fix the problem.

dmizer
August 24th, 2010, 08:41 PM
Any comments/suggestions?

I spent a good deal of time reading bug reports on this today. While wireless may still be a problem, you can try configuring network-manager to use "system setting" mode instead of user mode.

1) Right click on the nm-applet icon on the gnome panel and select "edit connections"
2) Select your network adapter and click "edit".
3) Make sure that "Available to all users" is checked.
4) Click apply.

If that doesn't work, despite FrustratedWithChanges (http://ubuntuforums.org/showpost.php?p=9749977&postcount=1255) ranting post, it does come with good advice. You could add an init script to mount and unmount your drives.

Try this:
1) Create the file with this command:
sudo nano /etc/init.d/cifs-mount
2) Paste the following into the file:
#! /bin/sh
# /etc/init.d/cifs-mount
#

# Some things that run always
touch /var/lock/cifs-mount

case "$1" in
start)
echo "Starting script cifs-mount"
mount /mnt/NASdocs
mount /mnt/NASdownload
mount /mnt/NASphotos
mount /mnt/NASbackup
;;

stop)
echo "Stopping script cifs-mount"
umount /mnt/NASdocs
umount /mnt/NASdownload
umount /mnt/NASphotos
umount /mnt/NASbackup
;;

*)
echo "Usage: /etc/init.d/cifs-mount {start|stop}"
exit 1
;;

esac
exit 0
3) Make the script executable with this command:
sudo chmod +x /etc/init.d/cifs-mount

See if that works.

jeff8356
August 25th, 2010, 08:37 PM
I spent a good deal of time reading bug reports on this today. While wireless may still be a problem, you can try configuring network-manager to use "system setting" mode instead of user mode.

1) Right click on the nm-applet icon on the gnome panel and select "edit connections"
2) Select your network adapter and click "edit".
3) Make sure that "Available to all users" is checked.
4) Click apply.
Already had that set from the start, before my first post............
My wifi has been working pretty good. No more errors in dmesg and no lost connections. I found a solution here (http://ubuntuforums.org/showthread.php?t=1469799&highlight=ar5001)and modified it for my hardware.
I installed these two backports:
linux-backports-modules-headers-lucid-generic
linux-backports-modules-wireless-lucid-generic
Then did this:
sudo modprobe -rv ath5k
sudo modprobe hp-wmi
sudo modprobe -v ath5k
It has worked fine since...........


If that doesn't work, despite FrustratedWithChanges (http://ubuntuforums.org/showpost.php?p=9749977&postcount=1255) ranting post, it does come with good advice. You could add an init script to mount and unmount your drives.
I tried the script but it didnt solve the long shutdown. It works fine manually in terminal but not on shutdown or restart. So I am still stuck with my roundabout way of doing it.

It seems as if something is stopping scripts from running that is not part of the original system setup. Changing the /etc/rc#.d numbers should have made everything work but it seems to ignore any manual changes. Something to do with "Upstart (http://upstart.ubuntu.com/index.html)" maybe??? Other non-Ubuntu distros also use upstart but seem to have fixed the problem. Its just very strange that all these scripts seem to be ignored by the system on shutdown/restart.

My Linux skills are very rusty. its been about 15 years since I have worked on any type of *nix (Novell Netware 3.?? and early Slackware) so this has been a re-learning experience for me and I appreciate the help.
Any other suggestions?

Kimasu
September 1st, 2010, 12:14 AM
dmizer, I just wanted to say thanks for this tutorial. I am new to Linux, and just installed Ubuntu on my new netbook earlier tonight. By following your instructions, I was able to get all of my Windows 7 machine's shared files mounted up in less that half an hour.

You rock!

dmizer
September 1st, 2010, 02:25 AM
Any other suggestions?

What kind of wireless security does the client computer in question have?

jeff8356
September 1st, 2010, 07:46 PM
What kind of wireless security does the client computer in question have?
WPA/WPA2 Personal with passphrase


Just to satisfy my own curiosity I installed 3 other distro's to check on this long shutdown problem. Two were RPM (non Ubuntu) based and one was BSD.
For all three I followed the directions on page 1 and set-up everything as before. All were clean installs. The BSD worked fine, no long shutdown problem. One of the RPM's worked flawlessly, no long shutdown. The second RPM was problematic to start, but also suffered the same long shutdown problem. So the problem is not limited to Ubuntu based distro's. It all appears to revolve around the shutdown sequence and rc#.d dropping out the wifi before the shares are unmounted.
As I said in an earlier post, renaming or re-ordering the the files in rc#.d seemingly had no effect for some odd reason. Unfortunately I did not think to try renumbering/re-ordering rc#.d in my test distro's.

Just to clarify for others, this "How to" works just fine and is well written and maintained. My particular situation seems to revolve around some other issue(s).

If this is getting a little too "off topic" please let me know. I can post it up in the networking forum.

dmizer
September 1st, 2010, 10:52 PM
WPA/WPA2 Personal with passphrase


Just to satisfy my own curiosity I installed 3 other distro's to check on this long shutdown problem. Two were RPM (non Ubuntu) based and one was BSD.
For all three I followed the directions on page 1 and set-up everything as before. All were clean installs. The BSD worked fine, no long shutdown problem. One of the RPM's worked flawlessly, no long shutdown. The second RPM was problematic to start, but also suffered the same long shutdown problem. So the problem is not limited to Ubuntu based distro's. It all appears to revolve around the shutdown sequence and rc#.d dropping out the wifi before the shares are unmounted.
As I said in an earlier post, renaming or re-ordering the the files in rc#.d seemingly had no effect for some odd reason. Unfortunately I did not think to try renumbering/re-ordering rc#.d in my test distro's.

Just to clarify for others, this "How to" works just fine and is well written and maintained. My particular situation seems to revolve around some other issue(s).

If this is getting a little too "off topic" please let me know. I can post it up in the networking forum.

If you are ambitious, you could ditch network-manager and configure your wireless manually -> http://ubuntuforums.org/showthread.php?t=571188

I think the real issue here is that network-manager, samba, and Linux inits are all partly to blame. Because of this it is extremely difficult to get everyone to work together for a proper fix.

jeff8356
September 5th, 2010, 07:18 PM
If you are ambitious, you could ditch network-manager and configure your wireless manually -> http://ubuntuforums.org/showthread.php?t=571188
I thought about doing that but it detracts from my original reason of trying Ubuntu on a development machine. I wanted to find a distro that I could deploy on friends/family computers that works without me having to do much tweaking (or any at all. I am tired of fixing everyone's broken M$ boxes!!!). Many have some type of Media Server/NAS so as it stands now Ubuntu's (Canonical's) anomalies are a deal-breaker for me.

I think the real issue here is that network-manager, samba, and Linux inits are all partly to blame. Because of this it is extremely difficult to get everyone to work together for a proper fix.
Which brings us back to "Upstart". Its supposed to be backwards compatible for older sysv scripts in rc?.d, but apparently they don't play well together. The one rpm distro that DID work was F13. Ironically they are dumping Upstart in their next release. IMHO 10.04 should have never been released as an LTS, it is a beta at best, as is Upstart!

Its a shame. I really liked Ubuntu and its spins and offshoots (Mint). Hopefully the dev's will get these problems worked out in the near future.

Thanks for your help......

shakma
September 15th, 2010, 12:45 AM
Just want to say thanks to dmizer for maintaining such a great thread, and doing it so well. I subscribed years ago, and I come back to it every time I "Ubuntify" another computer and need to mount a network drive.

Just a quick question/suggestion. I have simply followed the first post and things have worked for me every time I've needed this. For the last few setups, I have been mounting samba shares without passwords. All I've needed to use is the command:

sudo mount -t cifs //netbiosname/sharename /media/sharename -o guest,rw

or add the corresponding line to my fstab, and I have full read/write access. I must admit, I don't know what the last bit you add with all the "charset" and "0777" really means, but this shortened command makes a lot of sense to me, and I wonder if it would work for most people.

Thanks again for the outstanding thread.

Peace.

dmizer
September 15th, 2010, 01:07 AM
I must admit, I don't know what the last bit you add with all the "charset" and "0777" really means, but this shortened command makes a lot of sense to me, and I wonder if it would work for most people.
This depends on what kind of machine the samba server is running. If the samba server is a Linux machine, the 0777 gives the correct local permissions to the folder so it mounts as read/write. The charset option mounts the share with the utf8 character set so that filenames with international characters will display correctly.

Having these permissions doesn't hurt anything when they are not used, but they can help in a variety of situations so I added them to cover the most possibilities.

If you want to learn more about what all the options do, you can look at
man mount.cifs

Glad it's been working for you!

PaulHuffman
October 21st, 2010, 01:53 PM
I have a samba mystery that I can't figure out. For several years I mounted shares on my Windows desktop with a shell script with lines like smbmount //paule6500/docs /home/paul/pauldocs -o username=xxxx,password=xxxxx in it. Then suddenly on 8/23/2010, my scripts didn't work. http://ubuntuforums.org/showthread.php?t=764319 The only way I could make the mounts was to add sudo in front of the lines, as if Ubuntu suddenly decided that a user didn't have sufficient permissions to make mounts.

However, now I realize that these mounts are stubbornly read only. Can't copy or create files or directories on the mounted directories. ls -lt shows me that now the mount points are owned by root, while "myusername" is tying to write to the mounted directory. Doesn't seem to make any difference if I use the "smbount" or the "mount -t cifs" syntax or if I add the "rw" option. Doesn't seen to make a difference if I try another Windows PC.

Running 10.04 now.

Update: I was able to make read/write mounts to my PC's shares by editing fstab as explained on page one. But I was unable to make a writable mount manually, even when I tried adding the file_mode=0777, dir_mode=0777 as one page one. Tried "sudo mount -t cifs //paule6500/elevation /home/paul/elevation -o username=xxxx,password=xxxx,iocharset=utf8,file_mo de=0777,dir_mode=0777" Got a mount, but it was writable for su only.

Why did Ubuntu take mount away from ordinary users?

dmizer
October 25th, 2010, 12:38 PM
Tried "sudo mount -t cifs //paule6500/elevation /home/paul/elevation -o username=xxxx,password=xxxx,iocharset=utf8,file_mo de=0777,dir_mode=0777" Got a mount, but it was writable for su only.

Why did Ubuntu take mount away from ordinary users?

Mount has not been taken away from ordinary users. Mount has always been a root only command.

Try this:
sudo mount -t cifs //paule6500/elevation /home/paul/elevation -o rw,username=xxxx,password=xxxx,iocharset=utf8,file _mode=0777,dir_mode=0777

PaulHuffman
October 25th, 2010, 07:38 PM
Thanks for getting back to me so quickly.

I wasn't correct when I said mount stopped working for users, and is available for root. I meant that on 10/23/2010, smbmount stopped working for user. http://ubuntuforums.org/showthread.php?t=764319

I've tried adding the rw option to the mount -t cifs syntax. Same result. Mount is read only to user, even thought the mount point is 777, owned by root.

Are shares mounted with the Nautilus GUI expected to be read only?

dmizer
October 28th, 2010, 04:04 AM
Thanks for getting back to me so quickly.

I wasn't correct when I said mount stopped working for users, and is available for root. I meant that on 10/23/2010, smbmount stopped working for user. http://ubuntuforums.org/showthread.php?t=764319

I've tried adding the rw option to the mount -t cifs syntax. Same result. Mount is read only to user, even thought the mount point is 777, owned by root.

Are shares mounted with the Nautilus GUI expected to be read only?

There are some suggestions for fixing the "files owned by root" problem in the troubleshooting section of the howto.

As to smbmount, I have never used it so I have no input on that issue.

Shares mounted via Nautilus tend to be finicky.

Gorkster
October 30th, 2010, 01:50 PM
First, grats on the Web's longest thread and longest-running thread EVAH!

I've spent hours combing through this thread but have to admit there are several pages in the middle, between 50-100, which I may have missed. If this has been discussed and I missed it I'm more than happy to continue my combing.

I receive the following two errors when booting up my Ubuntu 10.10 install. This error has not always displayed, and I have no idea when it started. It could have been an update, or something I've done.

[ 23.442935] CIFS VFS: Error connecting to socket. Aborting operation
[ 23.443894] CIFS VFS: cifs_mount failed w/return code = -101

I have the following entry in /etc/fstab:

//192.168.1.120/Data /mnt/world-data cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77 0 0

I have confirmed that the error is not displayed during boot if I comment out this line.

Here's the odd thing... The mount point actually mounts, in spite of this error. (Of course, it does not if I comment out that line in /etc/fstab.)

I can umount and use mount -a to remount without any issues. Even though things seem to be fine, my reasons for wanting to fix this are: 1) I'm concerned this will lead to some other problem at some point; and 2) This is driving me NUTS! ;)

dmizer
October 30th, 2010, 04:59 PM
First, grats on the Web's longest thread and longest-running thread EVAH!

I've spent hours combing through this thread but have to admit there are several pages in the middle, between 50-100, which I may have missed. If this has been discussed and I missed it I'm more than happy to continue my combing.
No need to read the entire thread. As you can see by the change log at the bottom of the first post, I keep the first post continually updated with the latest information. :)

I receive the following two errors when booting up my Ubuntu 10.10 install. This error has not always displayed, and I have no idea when it started. It could have been an update, or something I've done.
<snip>
Even though things seem to be fine, my reasons for wanting to fix this are: 1) I'm concerned this will lead to some other problem at some point; and 2) This is driving me NUTS! ;)
It's probably happening because mount is trying to establish the connection before your network is up. In order to solve this, you can add the _netdev option to your fstab line like so:
//192.168.1.120/Data /mnt/world-data cifs guest,_netdev,rw,iocharset=utf8,file_mode=0777,dir _mode=0777 0 0
The _netdev option prevents the mount from being attempted before there is an active network present.

Gorkster
October 31st, 2010, 02:23 AM
No need to read the entire thread ... It's probably happening because mount is trying to establish the connection before your network is up.
Yeah, I can see that you keep that first post in the thread up to date and I really appreciate that. It took me several days to figure out how to get Ubuntu 10.10 to recognize/mount/auto-mount my NAS, and in those days I read through your entire first post many times. :) (Along with countless other bits of information found via Google searches.)

I had high hopes that the _netdev option you suggested would work. I had assumed the same thing you did, that the share was being mounted before the network was available. I hadn't run across the _netdev option before reading your suggestion... Sadly, this error still shows up during boot. Same as before, the network share is mounted in spite of the error.

I'm no guru, but I REALLY find this strange now!

EDIT:
Well, here's a possible reason the _netdev option didn't make any difference anyway...
Oct 31 00:21:23 ubuntu kernel: [ 38.677922] CIFS: Unknown mount option _netdev
Oct 31 00:21:23 ubuntu kernel: [ 38.739491] CIFS VFS: Error connecting to socket. Aborting operation
Oct 31 00:21:23 ubuntu kernel: [ 38.740592] CIFS VFS: cifs_mount failed w/return code = -101
Oct 31 00:21:23 ubuntu NetworkManager[765]: <info> NetworkManager (version 0.8.1) is starting...
Oct 31 00:21:23 ubuntu NetworkManager[765]: <info> Read config file /etc/NetworkManager/nm-system-settings.conf

Do the following lines about NetworkManager indeed verify that the mount is (at least initially) happening before the nework is ready?

EDIT2:
Sorry for so many edits, since nobody's posted anything and I had more to add I figurd it'd be ok.

I think maybe I see in the syslog why the share is mounting in spite of that error. I just rebooted and show the following in the log. After the first three CIFS related lines I see something farther down:
Oct 31 01:23:29 ubuntu kernel: [ 28.836565] CIFS: Unknown mount option _netdev
Oct 31 01:23:29 ubuntu kernel: [ 28.836669] CIFS VFS: Error connecting to socket. Aborting operation
Oct 31 01:23:29 ubuntu kernel: [ 28.836684] CIFS VFS: cifs_mount failed w/return code = -101
## {MANY MORE LOGS HERE, many of which are related to NetworkManager}
Oct 31 01:23:32 ubuntu kernel: [ 31.744592] CIFS: Unknown mount option _netdev
Would this not indicate that my mount is being attempted more than once? It appears to me that maybe the mount is attempted once before the network is set up, then again after the network is running. There are no CIFS VFS errors after the second attempt.

Of course this doesn't explain why the _netdev option isn't working.. Plus, I find it curious that the mount is being attempted twice.

EDIT3
Day off, working graves, what can I say?

Found this in the Ubuntu manual under common options for fstab:
from https://help.ubuntu.com/community/Fstab

"_netdev - this is a network device, mount it after bringing up the network. Only valid with fstype nfs."

So apparently _netdev is not a valid option to use with CIFS? I did look on the ubuntu manual page for mount.cifs and didn't find any similar option:
http://manpages.ubuntu.com/manpages/maverick/en/man8/mount.cifs.8.html

So, still no solution - hanging my hat for a bit. I'll wait to see what you or anyone mght have to say before I continue dissecting this issue.

PaulHuffman
November 1st, 2010, 06:08 PM
I figured out why I was confused about what kind of users can use mount. If you use the user or users option in a line in fstab, then ordinary users can mount the file system described in that line. Back in the Pleistocene I used to run Solaris systems and that's how ordinary users were able to mount these new fangled "CDs".

cub
November 8th, 2010, 11:44 AM
I have a Lacie NAS at mylacie.local.

I'm trying to mount it using the following command:

mount -t cifs //mylacie.local/directory /media/share -o username=***,password=***,iocharset=utf8,file_mode =0777,dir_mode=0777

I'm getting the following error:


mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


dmesg returns:


[13992.766847] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
[13992.766857] CIFS VFS: Send error in SessSetup = -13
[13992.766870] CIFS VFS: cifs_mount failed w/return code = -13


Anyone have any ideas?
Take a look at the troubleshooting section of the howto. There is a fix for the error 13, It's marked for Hardy, but it is valid for other versions as well.
I have the same/similar issue. I have tried the error 13 fix in the troubleshooting but no difference. I have used the /root/.smbcredentials as well, because when writing my password which contains a "!" the direct mount did not process. However when setting up with .smbcredentials I get the same error and dmesg as above.

I wonder it has something to do with AD? When I connect to a network share through nautilus I have to put in "domain: ad" but I don't if or where I should put it when following this guide?

staffan7s
November 8th, 2010, 08:05 PM
Great thread, thanks!

This worked for me in Ubuntu Karmic, mounting a Buffalo Linkstation NAS (model name LS-CHL, firmware 1.07) which is also connected to a number of windows boxes:


sudo mount.cifs //192.168.1.139/HEM /home/staffan/mont/hem -o uid=1000,gid=1000,pass=hemligkod,iocharset=utf8,no unix


The "Windows Client Language" is ISO8859-15 according to the NAS web interface, but using "iocharset=iso8859-15" yielded strange results when filenames had Swedish characters such as едц. I changed into utf8 which worked fine.

...it remains to transmit this into a working fstab.

Hieronymus
November 16th, 2010, 03:18 AM
Edit: I don't know what I did exactly, but it seems to be working now... Just took _netdev out of /etc/fstab and now it seems to wait until wifi is up anyway. I hope this is not just a one time event (or 2 as I tried rebooting twice).

Hi guys,

Great thread this, almost there. Just one hurdle to navigate. I am trying to mount my NAS iot play my music with mpd. This will only work when actually mounting the NAS drives, symlink won't work.

I have the same issue as Gorkster, I guess, I need my wireless connection to be up and running before fstab mounts the drives. _netdev won't work with cifs, as Gorkster already mentioned.

Is there any other way to make this happen?

Thanks in advance,

H

PaulHuffman
November 16th, 2010, 07:48 PM
I don't know what my problem is with a manual mount. Still get a mount that is read only to linux user, owned by root 0777, even after I tried the syntax in the trouble shooting section adding my gid and uid. Also tried getting the username and password from .smbcredentials.

This doesn't work:
sudo mount -t cifs //paule6500/elevation /home/paul/elevation -o rw,username=xxxx,password=xxxxx,iocharset=utf8,gid =1000,uid=1000,nounix,file_mode=0777,dir_mode=0777

This doesn't work:sudo mount -t cifs //paule6500/elevation /home/paul/elevation -o rw,credentials=/root/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,n ounix,file_mode=0777,dir_mode=0777

And now this works doesn't work in fstab: //paule6500/elevation /home/paul/elevation cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0


Wait, the problem has been permissions on the Windows side for my test directory (elevation) all this time. I had to give myself full control on windows before I could get a rw samba mount.

peshko-lnx
November 23rd, 2010, 08:49 PM
Couple of things.

I use 10.10 an my server is basically Buffalo NAS.

Here is my fstab line:
//xxx.xxx.xxx.xxx/myfolder /media/test cifs rw,noperm,iocharset=utf8,credentials=/etc/.smbcredentials,file_mode=0777,dir_mode=0777,users 0 0

smbcredentials contains usernam and password.

It mounts is successfully, but with the wrong owner. If I mount it with root, owner of every file is root, if I mount it with user1, owner of every file is user1.

1. It seems that is disregards .smbcredentials. If I don't specify .smbcredentials, it asks for a pwd, but I cantput any random key combination and it ould be ok and mount the remote share

2. Unmount from the user1 is impossible. Always have to umount with root. If I try to umount with user1 I get an error that says:

user1@ubuntu10-lap:~$ umount /media/test
umount: /media/test mount disagrees with the fstab

3. Shutdown hanging when cifs is mounted is permanent. There seems to be no workaround. I applied MANY solutions, but seems that there is no permanent solution.

My question is - is there a solution to any of these problems that you might be aware of?

Thanks!

dmizer
November 24th, 2010, 12:58 AM
If I mount it with root, owner of every file is root, if I mount it with user1, owner of every file is user1.
This is expected behavior. The same is true with Windows servers and Windows clients. If this is a problem, you need to create group permissions on the server and add all of your client user names to the group.

1. It seems that is disregards .smbcredentials. If I don't specify .smbcredentials, it asks for a pwd, but I cantput any random key combination and it ould be ok and mount the remote share
Double check the formatting of the samba credentials file as this usually happens if there is an extra space or there could be a problem if the file was created with a gui text editor.

2. Unmount from the user1 is impossible. Always have to umount with root. If I try to umount with user1 I get an error that says:

user1@ubuntu10-lap:~$ umount /media/test
umount: /media/test mount disagrees with the fstab
This is a bug. The bug report is here: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/99437

A fix is posted in the bug report.

3. Shutdown hanging when cifs is mounted is permanent. There seems to be no workaround. I applied MANY solutions, but seems that there is no permanent solution.
This one has been my arch nemesis. It works fine if you use the old networking stack available in earlier versions of Ubuntu, but network-manager hoses things up. Edit the network connection and make sure that there is a check mark next to "Available to all users". If that still doesn't fix the problem and you have a wired ethernet connection, you can consider changing to the old networking stack by uninstalling network-manager and installing gnome-network-admin. Then you can configure networking under system > admin > network (not "network tools")

peshko-lnx
November 24th, 2010, 11:10 AM
This is a bug. The bug report is here: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/99437

A fix is posted in the bug report.



I checked the bug. Do you think that the solution there would be applicable to 10.10. It is 3+ years old? I also looked at the code. It is talking about devuuid. I am not sure you would get this in samba. So how applicable this is?

Thanks!

dmizer
November 24th, 2010, 07:59 PM
I checked the bug. Do you think that the solution there would be applicable to 10.10. It is 3+ years old? I also looked at the code. It is talking about devuuid. I am not sure you would get this in samba. So how applicable this is?

Thanks!

Yes, even though that bug is old, that's the bug you need to watch. The fix posted won't work, but that's still the correct bug report. I see you've added a comment to the bug and that's the correct thing to do. Just keep an eye on it and see if there's any development.

Gorkster
November 26th, 2010, 09:39 AM
I have the same issue as Gorkster, I guess, I need my wireless connection to be up and running before fstab mounts the drives. _netdev won't work with cifs ... I don't know what I did exactly, but it seems to be working now... Just took _netdev out of /etc/fstab
Thanks for sharing! I kept futzing but never could get anywhere. I added the _netdev option in and removed it. Since my issue perplexed me and apparently everyone else I finally gave up on it and now use autofs. Since I don't need the network connection open constantly anyway it seemed a better match for me.

Of course now I'm getting some weird error when I log OFF instead! But that's for a different thread...

Lonoki
January 27th, 2011, 11:15 AM
Hi, I am running Ubuntu 9.10 with smbfs 2:3.4.0-3, and I had used your tutorial long time ago to mount my WD NAS.. (permanent mount via CIFS + .smbcredentials) Everything worked just perfect until recently when it just started acting weirdly over night. The problem was pretty bizarre, I could create and delete directories, but it would create them read-only which meant I couldn't copy any files in there. Also, I couldn't copy/create any files anywhere on my NAS, but I could delete the existing. My file_mode and dir_mode were both 0777; Like I said super bizarre. Well so first I looked at troubleshooting in your first post, but I missed the fix, because it said Files owned by root / "The folder contents could not be displayed". If you can view but not change, delete, or add new files to your Samba share, or if you get an error in Nautilus which says, "The folder contents could not be displayed"; try this fix: Which wasn't exactly my problem, only error I got from Nautilus said "You don't have permission to do that".. I came back after your comment on a different thread.

What worked for me was adding both gid=1000,uid=1000,nounix, and noserverino, into my fstab, so now it looks like:

//NAS_IP/sharename /mnt/sharename cifs credentials=/root/.smbcredentials,iocharset=utf8,noserverino,gid=100 0,uid=1000,nounix,file_mode=0777,dir_mode=0777 0 0I don't know if my problem was something different and the same solution worked, or if it is the same problem I just didn't understand it ;) anyways, I just thought it might help someone with the same problem in future.

Thanks for very well organized tutorial and well maintained thread.

dmizer
January 27th, 2011, 12:19 PM
I don't know if my problem was something different and the same solution worked, or if it is the same problem I just didn't understand it ;) anyways, I just thought it might help someone with the same problem in future.

Thanks for very well organized tutorial and well maintained thread.

Your quite welcome. Despite the different wording, the error you encountered is indeed "Files owned by root". I've updated the preface to this troubleshooting section to include the current Nautilus wording.

Thanks!

Suicida|
January 31st, 2011, 07:41 PM
Disabling posix extensions fixed my problem on a clustered Microsoft share.

Thanks.

housseinireza
February 2nd, 2011, 05:15 AM
Hello everyone!

First I want to thank dmizer for the great guide!

But I'm stuck on some problems by mounting my networkdrive.
I edited the fstab in the following manner:

//192.168.0.195/MyShare /media/myshare cifs user=<user>,passwd=<password>,auto,uid=1000,gid=1000,nounix 0 0
//192.168.0.195/OpenShare /media/openshare cifs auto,uid=1000,gid=1000,nounix 0 0

On my networkdrive they are 2 folders one, the OpenShare, which (I thought) is not protected and the other, MyShare, which is protected by password. But if I want to mount the drive, first I've to deliver a password for the OpenShare and second an error occurs for the MyShare:

mount error(127): Key has expired
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

The funny thing now is that for the OpenShare with the same password as for the MyShare mounts without problems and if I connect by ftp with MyShare all works perfectly, no key expired issue comes up?

If I now add password and user field to OpenShare in fstab, the same error appears as for the MyShare before.

Can somebody help me to get through it? I googled and searched this forum a lot but didn't found a solution. And how can I change a key for my networkdrive? Is there some credential file on it?

Thanks a lot
Cheers Reza

javine
February 3rd, 2011, 05:21 PM
Hi there,

This tutorial looks really thorough, but before I jump into it I wanted to check that it's what I need!

I have an Ubuntu box setup mostly for media - MythTV and playing music. At the moment I have my music collection on the local harddrive of the Ubuntu box.

I have just bought a NAS - it's a D-Link DNS-320 and I presume it's running Linux under the hood. I've got it connected to my Windows XP machine OK and it's mapped to a drive letter on the Windows machine.

On the Ubuntu machine, if I go to Places > Network the NAS shows up fine under the name I've given it, The-Library (the only slightly odd behaviour is that it appears as both The-Library-1 and THE-LIBRARY). I didn't have to do anything to get to this state - it seemed to automatically be there first time I booted up the machine after putting the NAS on the network.

So, what I want to do is to set up my Ubuntu machine so that the NAS can be consistently accessed in the same place. This would mean, for example, that I could tell Rhythmbox that the default location to rip CDs to (and to look for its library) is, say, "volume_1 on THE-LIBRARY/Media/Music/".

As a result I'm not sure whether I need to do anything at all! If this will work OK and the NAS will consistently show up at the same location then I can happily shift my music library over to the NAS and forget about it. But being new to this I wanted to check whether there was a reason why I might want to do a bit more than that.

Thanks in advance,
J

dmizer
February 4th, 2011, 01:31 AM
Hi there,

This tutorial looks really thorough, but before I jump into it I wanted to check that it's what I need!

I have an Ubuntu box setup mostly for media - MythTV and playing music. At the moment I have my music collection on the local harddrive of the Ubuntu box.

I have just bought a NAS - it's a D-Link DNS-320 and I presume it's running Linux under the hood. I've got it connected to my Windows XP machine OK and it's mapped to a drive letter on the Windows machine.

On the Ubuntu machine, if I go to Places > Network the NAS shows up fine under the name I've given it, The-Library (the only slightly odd behaviour is that it appears as both The-Library-1 and THE-LIBRARY). I didn't have to do anything to get to this state - it seemed to automatically be there first time I booted up the machine after putting the NAS on the network.

So, what I want to do is to set up my Ubuntu machine so that the NAS can be consistently accessed in the same place. This would mean, for example, that I could tell Rhythmbox that the default location to rip CDs to (and to look for its library) is, say, "volume_1 on THE-LIBRARY/Media/Music/".

As a result I'm not sure whether I need to do anything at all! If this will work OK and the NAS will consistently show up at the same location then I can happily shift my music library over to the NAS and forget about it. But being new to this I wanted to check whether there was a reason why I might want to do a bit more than that.

Thanks in advance,
J

If you will always need it mounted in a server type setting, you'll probably be better off mounting it as per this tutorial. However, you may want to investigate your NAS. If it's running Linux, you may be able to mount with NFS instead of Samba, and that will probably work better for you in the long run as NFS is a native Linux network file system.

If your NAS device supports NFS, take a look at the NFS howto linked in my sig.

jamesisin
February 4th, 2011, 07:28 PM
Hi.

I got tired of using my connect to server bookmark each time I rebooted my hi-fi machine and decided I would use your permanent solution instead.

I used the code for an all-access guest share (it's music on my local network). When I test with mount -a I get this:

mount: wrong fs type, bad option, bad superblock on //[mymusicserver]/[themusicshare],
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so

I double checked the link in your signature for creating server shares and don't see anything about cifs there. I'm guessing the problem is that my server is serving as gvfs but that's just a guess.

What am I missing here?

dmizer
February 5th, 2011, 05:21 AM
What am I missing here?

Run the following command and try again:
sudo apt-get install smbfs

The above is part off the necessary prework for this howto, but it often gets overlooked.

If that doesn't fix your problem, please post the contents of your /etc/fstab file.

housseinireza
February 5th, 2011, 06:20 AM
Is there no one how can helps me?

Hello everyone!

First I want to thank dmizer for the great guide!

But I'm stuck on some problems by mounting my networkdrive.
I edited the fstab in the following manner:


//192.168.0.195/MyShare /media/myshare cifs user=<user>,passwd=<password>,auto,uid=1000,gid=1000,nounix 0 0
//192.168.0.195/OpenShare /media/openshare cifs auto,uid=1000,gid=1000,nounix 0 0 On my networkdrive they are 2 folders one, the OpenShare, which (I thought) is not protected and the other, MyShare, which is protected by password. But if I want to mount the drive, first I've to deliver a password for the OpenShare and second an error occurs for the MyShare:

mount error(127): Key has expired
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)The funny thing now is that for the OpenShare with the same password as for the MyShare mounts without problems and if I connect by ftp with MyShare all works perfectly, no key expired issue comes up?

If I now add password and user field to OpenShare in fstab, the same error appears as for the MyShare before.

Can somebody help me to get through it? I googled and searched this forum a lot but didn't found a solution. And how can I change a key for my networkdrive? Is there some credential file on it?

Thanks a lot
Cheers Reza

jamesisin
February 5th, 2011, 06:26 AM
No, no; that did it.

I read through the pre-work and assumed I didn't need to install smbfs as I was already able to attach through the connect to server dialog. Oops.

I am curious. What happens if, while mounted, the network drive becomes unavailable? I ask because I have had troubles with the manually mounted drive sort of disappearing.

dmizer
February 5th, 2011, 10:52 AM
Is there no one how can helps me?

I've not run into your issue before, so I've been doing research on it.

You said you are using a NAS device. What is the brand and model number of the NAS device you're using?

dmizer
February 5th, 2011, 10:56 AM
I am curious. What happens if, while mounted, the network drive becomes unavailable? I ask because I have had troubles with the manually mounted drive sort of disappearing.
Nothing bad will happen unless the server goes away while you're saving your file. In which case, the file save will fail and you will be asked to try again. This could also cause some data corruption on the server side, but it would only effect the document you were trying to save.

housseinireza
February 5th, 2011, 12:13 PM
I've not run into your issue before, so I've been doing research on it.

You said you are using a NAS device. What is the brand and model number of the NAS device you're using?

Thanks! Sorry but I didn't want to stress.

I'm using the NetworkSpace 2 from LaCie: Here (http://lacie.nas-central.org/wiki/Category:Network_Space_2) is a description. There exists a windows program to change password and settings, but I don't have an Windows OS anymore. In the link above is an instruction to hack the NAS, but I'm a little afraid that I gone loose my data's if I do it.

jamesisin
February 5th, 2011, 01:20 PM
Oh my concern is so much more mild than saving and data corruption. Just a bit of a hassle.

The share is a music share. I point Rhythmbox back to that share for its library. When the mount-tunnel is broken Rb starts spewing missing files. If I'm not in attendance that can get quite large (600 GB of flac so maybe 35K files). Annoying when it happens (but not as annoying as losing data).

The real pain is that this ends up causing a whole bunch of unnecessary drive time (as Rb scans the now-reconnected share and seeks out all those missing files).

I guess it would just be nice if the share re-established itself after these disappearances. I'm going to finish changing this setup around and see what happens. Thanks for lending me your brain.

dmizer
February 6th, 2011, 09:38 AM
Thanks! Sorry but I didn't want to stress.

I'm using the NetworkSpace 2 from LaCie: Here (http://lacie.nas-central.org/wiki/Category:Network_Space_2) is a description. There exists a windows program to change password and settings, but I don't have an Windows OS anymore. In the link above is an instruction to hack the NAS, but I'm a little afraid that I gone loose my data's if I do it.

Actually, I suggest that you post this question to the LaCie community forums here: http://www.nas-central.org/community-portal I think they will be better equipped to handle your problem.

john_spiral
March 8th, 2011, 12:07 PM
FYI:

Hi,

I've noticed that you need to give the full path on a credential file under Ubuntu 10.10 (updated). I previously had the below line in a script, previously on 8.04:

sudo mount -t cifs //192.168.1.74/c$ ~/windowsmachine/ -o credentials=.pass,iocharset=utf8,noexec,ro

Under 10.10 this now needs to be changed to:

sudo mount -t cifs //192.168.1.74/c$ ~/windowsmachine/ -o credentials=~/.pass,iocharset=utf8,noexec,ro

as my .pass file is in my /home/username/ directory.

If you don't it will give an evil message like:

error -1 (Unknown error 4294967295) opening credential file .pass

hope this helps someone.

dmizer
March 8th, 2011, 10:36 PM
sudo mount -t cifs //192.168.1.74/c$ ~/windowsmachine/ -o credentials=.pass,iocharset=utf8,noexec,ro

Frankly, I'm surprised this worked for you at all. You should always use the full path to the credentials file, and ~/.pass is not a full path.

Since mount works with the root account (sudo) and not the user account, my howto instructs you to put the credentials file in a root home instead of the user home.

So for example, if you switched to a root prompt with sudo -i and then ran your new command it would also not find your credentials file because from a root prompt ~/.pass is /root/.pass

I highly recommend that you either place the credentials file in the root home (as explained in this tutorial) so it's more secure, or that you revise your mount command to include the real full path of /home/user/.pass instead of using a tilde.

john_spiral
March 9th, 2011, 06:53 PM
...I highly recommend that you either place the credentials file in the root home (as explained in this tutorial) so it's more secure..

Thanks for the heads up on more robust security.

On a slightly different subject. Is it still necessary (Ubuntu 10.10) to specify the IP address of the primary WINS server in the /etc/samba/smb.conf file for an Ubuntu WINS client in a subnetted network?

Also with the below name resolve order in smb.conf:

name resolve order = wins bcast host lmhosts

I previously did this under 8.04 to resolve Windows host names on different subnets, by their short names. Without the above config it didn't work.

dmizer
March 9th, 2011, 07:33 PM
Thanks for the heads up on more robust security.

On a slightly different subject. Is it still necessary (Ubuntu 10.10) to specify the IP address of the primary WINS server in the /etc/samba/smb.conf file for an Ubuntu WINS client in a subnetted network?

Also with the below name resolve order in smb.conf:

name resolve order = wins bcast host lmhosts

I previously did this under 8.04 to resolve Windows host names on different subnets, by their short names. Without the above config it didn't work.

No problem.

As to WINS, if you don't have a good local DNS server for name resolution, you'll have to rely on WINS for your name resolution. If that's the case, then you may have to place the IP address of the WINS server in the client's smb.conf. It's not always necessary, but it's certainly good practice.

iliekpie
March 19th, 2011, 03:31 AM
Great guide but I'm having a bit of an issue with getting the mount to be permanent.

Using: Windows 7 64bit, Ubuntu 10.10 64-bit, NAS is a Dns-323

After following the guide I don't get any error messages ever but nothing appears in /media/share

If I use the code posted by narky in one of the first few posts:

sudo mount -t smbfs -o username=*****,password=***** //192.168.0.2/music /mnt/music
Except with my ip //192.168.1.104/Vol1 /media/share

It works when I try it that way but it goes away after a reboot.

If I try with cifs manually it doesn't seem to work.

The only thing I thought to try was changing cifs to smbfs in /etc/fstab but I have no idea if that even makes sense to try. It doesn't seem to work though.

How can I get it to be permanent?

tipiglen
March 20th, 2011, 11:18 AM
Dmizer,
Thanks for all your effort on this.

I have a share which mounts perfectly well on bootup, but have the shutdown delay problem with "CIFS VFS: no response" errors and a full minute of waiting followed by a forced disk check on reboot.

I have tried a lot of the "fixes", scripts, moving umountnfs to K10, etc, but with no joy.

Please help. Running Mint 9 (ubuntu based).

Thanks in advance
http://tipiglen.co.uk/loveandpeace3.gif
ed

tipiglen
March 20th, 2011, 11:24 AM
Dmizer,

And empathetic thoughts for all folk in Japan and those who know and care for them.

http://tipiglen.co.uk/loveandpeace3.gif

tipiglen
March 20th, 2011, 01:14 PM
This fix works for me!
http://ubuntuforums.org/showthread.php?t=1347340&page=3

What a community of interest!

xxxxxxx
ed

dmizer
March 21st, 2011, 09:36 PM
Great guide but I'm having a bit of an issue with getting the mount to be permanent.

Using: Windows 7 64bit, Ubuntu 10.10 64-bit, NAS is a Dns-323

After following the guide I don't get any error messages ever but nothing appears in /media/share

If I use the code posted by narky in one of the first few posts:

sudo mount -t smbfs -o username=*****,password=***** //192.168.0.2/music /mnt/music
Except with my ip //192.168.1.104/Vol1 /media/share

It works when I try it that way but it goes away after a reboot.

If I try with cifs manually it doesn't seem to work.

The only thing I thought to try was changing cifs to smbfs in /etc/fstab but I have no idea if that even makes sense to try. It doesn't seem to work though.

How can I get it to be permanent?
SMBFS is not included in Ubuntu unless you compile it from source. There is literally no reason why smbfs should work where cifs wouldn't unless there has been a change in syntax.

Please post your actual /etc/fstab line.

This fix works for me!
http://ubuntuforums.org/showthread.php?t=1347340&page=3

What a community of interest!

xxxxxxx
ed

Thanks for finding that. I've included that link in the troubleshooting section.

iliekpie
March 22nd, 2011, 03:56 AM
Alright I wrote out the first line for the entry I made.

//192.168.1.104/Volume_1/Media /media/NT-DR2-1 cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0

I made the same entry for the second drive.

Nothing appears and I don't see any error messages.

When I try:

sudo mount -t smbfs -o username=*****,password=***** //192.168.1.104/Volume_1/Media /media/NT-DR2-1

it appears temporarily but goes away after a reboot.

dmizer
March 22nd, 2011, 11:06 AM
Alright I wrote out the first line for the entry I made.

Your mount should look like this:
sudo mount -t cifs //192.168.1.104/sharename /media/NT-DR2-1 -o username=*****,password=*****
Where "sharename" is the name of the share on your windows computer, not a directory path.

iliekpie
March 23rd, 2011, 06:14 PM
I looked at it again and yeah the share name is listed as simply Volume_1 and Volume_2.

I tried typing the code you wrote in the terminal. It works and the drives pop up on the desktop. It goes away after a reboot though.

I tried changing the sharename in /etc/fstab to just Volume_1 and smbfs back to cifs but nothing happens.

dmizer
March 23rd, 2011, 08:44 PM
I tried changing the sharename in /etc/fstab to just Volume_1 and smbfs back to cifs but nothing happens.

Ok, reboot your system and see what happens if you run the following command:
sudo mount /media/NT-DR2-1

iliekpie
March 24th, 2011, 08:31 AM
Typing that into the terminal gave me the message "Permission Denied"

That clued me in right there. I typed the wrong password in .smbcredentials

Thanks for your help and for the guide. It works automatically now after a reboot. All drives appear on the desktop permanently.

zac123
June 26th, 2011, 08:55 AM
sorry, i know this thread is really old i'm just hoping that its still monitored..

i followed the instructions and i also created a smbcredentcials file with my windows server 2008 administrator and password.

but when i run:

sudo mount -a

i get:


mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

have i missed something out?

thanks
zac


edit......

looks like i got it working. i must have used the wronf line of code when setting the permenant mount. ive tested it by moving a .txt file around and its visable from bother ends (windows & linux machine). the only thing that seems to not work is the sudo mount -, it doesnt seem to display anything.... i'll work on this.

dmizer
June 26th, 2011, 10:25 AM
Yes, this thread is still monitored and I still keep the tutorial current as updates sometimes change things and people find and solve errors.

looks like i got it working.
Good to hear!

the only thing that seems to not work is the sudo mount -, it doesnt seem to display anything.... i'll work on this.

If the mount is successful, the sudo mount -a command will not output anything, if it is not successful you will see an error.

zac123
June 26th, 2011, 11:19 AM
yes sorry i went back and tried it without the -a and it showed me the mounts etc.

thanks so much fow taking the time to write a plain english tutorial.

BPCreations
June 27th, 2011, 10:07 PM
So, after weeks of frustration, this tutorial in combination with another tutorial that I found finally allowed me to share files between my W7 server and my Ubuntu htpc. My question now is: how would I add more than one share? For instance, right now I have my movies directory shared, how would I go about being able to share my music share as well?

dmizer
June 27th, 2011, 10:14 PM
So, after weeks of frustration, this tutorial in combination with another tutorial that I found finally allowed me to share files between my W7 server and my Ubuntu htpc. My question now is: how would I add more than one share? For instance, right now I have my movies directory shared, how would I go about being able to share my music share as well?

That's really a topic for a new thread because this is only about mounting shares, not about sharing directories.

However, if you're sharing your movies directory via smb.conf, you'll just need to add another share stanza like so:
[movies]
comment = My Movies
path = /home/dmizer/Movies
read only = no
guest only = yes
guest ok = yes
force user = dmizer
force group = dmizer
browsable = yes

[music]
comment = My Music
path = /home/dmizer/Music
read only = no
guest only = yes
guest ok = yes
force user = dmizer
force group = dmizer
browsable = yes

If you need more help than that, please start a new thread :)

NateDSaint
July 12th, 2011, 03:51 PM
Alright, I've stumbled upon this thread thanks to an old archive in ubuntu, but I figured I'd hop in here.

I'm on 11.04 Narwhal server, and I'm using win server 2k3.

I'm having a problem someone had a long time ago, which is that I'm mounting successfully but I can't edit the files. I can copy them but I cannot write to them. I'm using something that looks like this in my fstab:


//compression1.mydomain.local/share /media/share cifs iocharset=utf8,credentials=/root/.smbcredentials,noperm,file_mode=0777,dir_mode=077 7,uid=0,gid=0 0 0

As you can see, I've tried specifying root's uid and gid (I'm doing this all as root for the moment), and I'm specifying noperm. The file and dir mode are both 0777, and doing an ls shows that it's owned by root/root, and it's allowing rwx to everyone.

That being said, I still get "permission denied" if I try to make a new directory in there, or edit a file, or delete something. I've checked the windows machine, the user I'm logging in as has FULL permissions to the share, and the files are NOT set to read-only.

Anything else I'm not trying?


EDIT:

Never mind, I'm a complete idiot. I had changed the local file permissions but not the share permissions, our support guy figured it out. Problem Exists in Windows. (pew pew!)

Sorry for adding more glut to this pile, but now everyone knows: check the *share* permissions on windows, too!

brandn
July 21st, 2011, 11:53 AM
I'm having a really weird error. I have an ubuntu server I just had to wipe and reinstall 11.04 after it crashed. It hasn't been used for a few months until now, but it was able to mount network shares from my windows 2003 server without any problems.

Now, I am mounting my shares in fstab with all of the options specified in this guide. The drives seem to mount ok, but when I do anything recursive such as an rsync(There are different versions of the same fileserver on the ubuntu and windows server), I will get locked out of the share and get Permission Denied. Also I keep getting this:

CIFS VFS: Unexpected SMB signature

Irwin J. Finster
August 13th, 2011, 02:01 PM
I get the following error when trying to mount in xubuntu:

wrong fs type, bad option, bad superblock on //WHITE_RABBIT/NAS,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)

It's a new install, on my old PC this worked fine...

dmizer
August 14th, 2011, 10:17 AM
I get the following error when trying to mount in xubuntu:

wrong fs type, bad option, bad superblock on //WHITE_RABBIT/NAS,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)

It's a new install, on my old PC this worked fine...

Please refer to the "Prework" section. Particularly where it says to install smbfs. :)

dmizer
August 14th, 2011, 10:19 AM
CIFS VFS: Unexpected SMB signature

Try adding this option: sec=ntlmv2i

Irwin J. Finster
August 14th, 2011, 12:55 PM
Sorry to be such a pain, I did all the prework, and smbfs is installed. The option you told me, where do I add it? Just at the end, separated by a , ?

The strange thing is if i go into the xubuntu file manager and browse to network-windows-network to the share I want to access and enter the correct info I can get into the share.

dmizer
August 14th, 2011, 10:05 PM
Sorry to be such a pain, I did all the prework, and smbfs is installed. The option you told me, where do I add it? Just at the end, separated by a , ?
That was a reply to a different post. Don't worry about the option.

The strange thing is if i go into the xubuntu file manager and browse to network-windows-network to the share I want to access and enter the correct info I can get into the share.

Please post your mount command or /etc/fstab line.

Irwin J. Finster
August 15th, 2011, 06:07 AM
This is what I do and get:

*************e:~$ sudo mount -t cifs //WHITE_RABBIT/NAS /media/NAS -o username=********,password=********,iocharset=utf8 ,file_mode=0777,dir_mode=0777
[sudo] password for pirchl:
mount: wrong fs type, bad option, bad superblock on //WHITE_RABBIT/NAS,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
Manchmal liefert das Syslog wertvolle Informationen – versuchen
Sie dmesg | tail oder so





I suspect I am missing some files, for if I enter mount-cifs at the command line I get the answer that it is not installed and I should apt-get cifs-utils but when I do that I get the message that cifs-utils is already in the newest version.....


if I input dmesg | tail

I get:

dmesg | tail
[ 14.457259] forcedeth 0000:00:0a.0: irq 47 for MSI/MSI-X
[ 15.292768] ppdev: user-space parallel port driver
[ 18.172848] usb 1-1: usbfs: interface 1 claimed by usblp while 'usb' sets config #1
[ 23.827457] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro,commit=0
[ 24.580019] eth0: no IPv6 routers present
[ 35.543212] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro,commit=0
[ 46.986405] EXT4-fs (sdb1): warning: maximal mount count reached, running e2fsck is recommended
[ 47.013212] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[ 119.832225] CIFS VFS: cifs_mount failed w/return code = -22
[ 1092.781199] CIFS VFS: cifs_mount failed w/return code = -22

Irwin J. Finster
August 15th, 2011, 06:26 AM
LOL, when I enter the ip address instead of the server name it works flawlessly! Why could that be?

dmizer
August 15th, 2011, 07:56 AM
LOL, when I enter the ip address instead of the server name it works flawlessly! Why could that be?

Lots of possible reasons for that. Most commonly it's a firewall issue. It could also be a result of network configuration, server configuration, client configuration, a problem with the router, or a number of possible problems.

Katsche
August 23rd, 2011, 07:19 AM
Hi all,

I am new to Linux, but think that this will be a love story... :P

I am running Ubuntu Server Linux 64Bit (11.04) in VirtualBox (4.1.0) and would like to connect to a share on the Windows 7 64Bit host. I already did this with the following command, sadly I am not able to mount this drive automatically by adding it to fstab. Find my fstab entry and the error message below, too.

When I enter this, I am asked for the Windows password. After entering the password the mount works completely fine:
sudo mount -t cifs //MW7XM76LYPUH0D/Users/nachname.vorname /media/splunk -o username="dir/nachname.vorname",uid=0,gid=0,nls=utf8



This somehow is giving me the following errors. If i try to test the changes in fstab with "sudo mount -a" I am asked for the password, too but it won't work like with the one above:
//MW7XM76LYPUH0D/Users/nachname.vorname /media/splunk cifs username="dir/nachname.vorname",uid=0,gid=0,nls=utf8 0 0


[ 897.066624] CIFS VFS: Send error in SessSetup = -13
[ 897.071901] CIFS VFS: cifs_mount failed w/return code = -13
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

This doesn't work, too:

//MW7XM76LYPUH0D/Users/nachname.vorname /media/splunk cifs username="dir/nachname.vorname",rw,nounix,uid=0,gid=0,nls=utf8 0 0

Kind regards
Katsche


P.S.: Another question: the password of the windows user contains special characters. How do I write such a password (just to give u an example: tGu39fl?! ) so that I can save it within the smbcredentials file or just add it to the mount options using "password="?

Katsche
August 31st, 2011, 04:07 AM
I am still not able to set up the connection with the fstab. Could anybody please help? :(

alecz20
September 9th, 2011, 08:59 AM
This is what I have in my fstab and it works:

//192.168.0.102/Music /home/share/Music/Party cifs auto,uid=root,gid=mygroup,forcegid,credentials=/root/.smbcredentials,dir_mode=0775,file_mode=0775 0 0

note that I am using IP, not hostname. Not sure if it will help

slotdoctor
September 10th, 2011, 03:28 PM
This tutorial worked for me. On a Netgear ReadyNAS Duo, to mount the media share permanently. I would like to do the same with the other shares. But I think I have an issue with the permissions.

Other thoughts, I will never buy another Netgear product. They have the worst techs support ever and their documentation sucks.

Anyhow, this tutorial is very valid event hough it is rather old.

Thank you.

michiedo
September 23rd, 2011, 02:07 PM
This tutorial worked for me too. On an iomega Home Media Network Hard Drive.
THANKS !

Ceipheed
October 18th, 2011, 08:40 PM
Hello. I found my way here from this threat (http://ubuntuforums.org/showthread.php?t=971260), having the same issues.

Im still pretty new to Ubuntu, so I apologize for any noobness. Im running Oneiric on both my desktop and laptop. The files Id like to access are on the desktop (creatively named DESKTOPUBU), so I'm running these commands from the laptop.

This is the output to smbtree.

ceipheed@DesktopUBU:~$ smbtree
Enter ceipheed's password:
RESIDENCIAKU
\\LAPTOPUBU LaptopUBU server (Samba, Ubuntu)
\\LAPTOPUBU\IPC$ IPC Service (LaptopUBU server (Samba, Ubuntu))
\\LAPTOPUBU\Anime
\\LAPTOPUBU\print$ Printer Drivers
\\DESKTOPUBU DesktopUBU server (Samba, Ubuntu)
\\DESKTOPUBU\iP3000 iP3000
\\DESKTOPUBU\print$ Printer Drivers
\\DESKTOPUBU\Media
\\DESKTOPUBU\IPC$ IPC Service (DesktopUBU server (Samba, Ubuntu))

I did as the Pre-work section said and got to the Manual mounting section. Since I want to access the Media folder on my desktop, in my case...

netbiosname=DESKTOPUBU
sharename=Mediayes?

At this point, I guess I should mention that the Media folder I want to access is in a different HDD than the one Ubuntu is installed on. Also, since Ive been using this HDD since before I jumped to Ubuntu, it is NTFS. Don't know if that matters in any way. Also, I created the folder /media/MediaDESKTOP in my laptop to mount the desktop files to.

Im not sure if I configured my samba to require a password but since smbtree did have an output, I'm assuming it doesnt need it after all. As such, I decided to use the second command in the Manual mount section.

The problem comes after I try to run the manual mount command.

sudo mount -t cifs //DESKTOPUBU/Media /media/MediaDESKTOP -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77
[sudo] password for ceipheed:
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I would appreciate any help I can get.

mpitta
November 3rd, 2011, 03:14 PM
Fantastic instructions and follow-up discussion!

Manny - Ubuntu newbie

tipiglen
November 10th, 2011, 07:53 AM
Just a note to say that I recently found myself with my RAM almost filled, and after a long puzzling period discovered multiple orphan copies of the 'save yourself' "ShutdownCIFS" unmount script in my task list, each claiming around 6Mb....

After killing off a couple hundred of these poor wee orphans, my memory situation (and performance) is fully restored.

The script would seem to be unsatisfied because the external FS is at times not mounted because the server running it isn't online.

Otherwise, the solutions in this thread have been totally sucessful, and I thank all concerned. If anyone knows contact details for Seamus Phelan, the script's author, I'd appreciate a pointer.

Salaaaams
ed

aadmi
November 11th, 2011, 07:32 PM
Hi All:

I am running Ubuntu 8.04.4 LTS server. I followed the tutorials with slight modifications (since my Ubuntu/samba could not located my windows machine)
sudo mount -t smbfs //$IPADDRESS/fax /mnt/fax -o username=xyz,password=xxxx
This seems to work fine but then I mapped/linked this directory to web folder. I can see all the files and directories in the web folder but I can't read any of the files.:confused:

Any solution to this?

Thank you
Bill

TaTaE
November 13th, 2011, 04:18 AM
I have a problem accessing some files on a CIFS share. All other files and folders are accessible.


root@firewall:/media/sambaa/fisiere# ls
fullbackup var www
root@firewall:/media/sambaa/fisiere# ls
fullbackup var www
root@firewall:/media/sambaa/fisiere# rm -rf var/
^C
root@firewall:/media/sambaa/fisiere# rm -rf var/www/
^C
root@firewall:/media/sambaa/fisiere# rm -rf var/www/*
root@firewall:/media/sambaa/fisiere# rm -rf var/www/
^C
root@firewall:/media/sambaa/fisiere# rm -rf var/
^C
root@firewall:/media/sambaa/fisiere# mv var/ /tmp/
mv: cannot stat `var/www/duplicity-full.20111112T021708Z.vol1.difftar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T181707Z.to.20111111T191708Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T191708Z.to.20111111T201708Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T201708Z.to.20111111T211709Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T211709Z.to.20111111T221709Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T221709Z.to.20111111T231710Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T231710Z.to.20111112T001709Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111112T001709Z.to.20111112T011709Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T181707Z.to.20111111T191708Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T191708Z.to.20111111T201708Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T201708Z.to.20111111T211709Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T211709Z.to.20111111T221709Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T221709Z.to.20111111T231710Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T231710Z.to.20111112T001709Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111112T001709Z.to.20111112T011709Z.si gtar.gz': No such file or directory
root@firewall:/media/sambaa/fisiere# ls var/www/
ls: cannot access var/www/duplicity-full.20111112T021708Z.vol1.difftar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T181707Z.to.20111111T191708Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T191708Z.to.20111111T201708Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T201708Z.to.20111111T211709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T211709Z.to.20111111T221709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T221709Z.to.20111111T231710Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T231710Z.to.20111112T001709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111112T001709Z.to.20111112T011709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T181707Z.to.20111111T191708Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T191708Z.to.20111111T201708Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T201708Z.to.20111111T211709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T211709Z.to.20111111T221709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T221709Z.to.20111111T231710Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T231710Z.to.20111112T001709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111112T001709Z.to.20111112T011709Z.si gtar.gz: No such file or directory
duplicity-full.20111112T021708Z.vol1.difftar.gz duplicity-new-signatures.20111111T181707Z.to.20111111T191708Z.si gtar.gz
duplicity-inc.20111111T181707Z.to.20111111T191708Z.vol1.diff tar.gz duplicity-new-signatures.20111111T191708Z.to.20111111T201708Z.si gtar.gz
duplicity-inc.20111111T191708Z.to.20111111T201708Z.vol1.diff tar.gz duplicity-new-signatures.20111111T201708Z.to.20111111T211709Z.si gtar.gz
duplicity-inc.20111111T201708Z.to.20111111T211709Z.vol1.diff tar.gz duplicity-new-signatures.20111111T211709Z.to.20111111T221709Z.si gtar.gz
duplicity-inc.20111111T211709Z.to.20111111T221709Z.vol1.diff tar.gz duplicity-new-signatures.20111111T221709Z.to.20111111T231710Z.si gtar.gz
duplicity-inc.20111111T221709Z.to.20111111T231710Z.vol1.diff tar.gz duplicity-new-signatures.20111111T231710Z.to.20111112T001709Z.si gtar.gz
duplicity-inc.20111111T231710Z.to.20111112T001709Z.vol1.diff tar.gz duplicity-new-signatures.20111112T001709Z.to.20111112T011709Z.si gtar.gz
duplicity-inc.20111112T001709Z.to.20111112T011709Z.vol1.diff tar.gz
root@firewall:/media/sambaa/fisiere# ls var/www/ -ls
ls: cannot access var/www/duplicity-full.20111112T021708Z.vol1.difftar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T181707Z.to.20111111T191708Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T191708Z.to.20111111T201708Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T201708Z.to.20111111T211709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T211709Z.to.20111111T221709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T221709Z.to.20111111T231710Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T231710Z.to.20111112T001709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111112T001709Z.to.20111112T011709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T181707Z.to.20111111T191708Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T191708Z.to.20111111T201708Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T201708Z.to.20111111T211709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T211709Z.to.20111111T221709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T221709Z.to.20111111T231710Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T231710Z.to.20111112T001709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111112T001709Z.to.20111112T011709Z.si gtar.gz: No such file or directory
total 0
? -????????? ? ? ? ? ? duplicity-full.20111112T021708Z.vol1.difftar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T181707Z.to.20111111T191708Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T191708Z.to.20111111T201708Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T201708Z.to.20111111T211709Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T211709Z.to.20111111T221709Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T221709Z.to.20111111T231710Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T231710Z.to.20111112T001709Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111112T001709Z.to.20111112T011709Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T181707Z.to.20111111T191708Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T191708Z.to.20111111T201708Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T201708Z.to.20111111T211709Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T211709Z.to.20111111T221709Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T221709Z.to.20111111T231710Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T231710Z.to.20111112T001709Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111112T001709Z.to.20111112T011709Z.si gtar.gz

PaulHuffman
December 9th, 2011, 07:21 PM
I must have too much time on my hands. I must want to punish myself. I must think I don't have enough frustration. I just went through a series of upgrades with Update Manager from 10.04. Each step looked pretty cool so I went for the next major upgrade offered. Until 11.11, and then the system hung during reboot. Then I thought "Dang, I wish I had saved my fstab and other modifications to a different file system".

I had to do a fresh install of 11.04 from a CD. Besides getting used to the strangeness of the desktop interface, I'm trying to restore the automatic network mounts I used to have to three Windows XP shares. I did the prework per the first post in this thread. Then I added mount points off my home directory rather than off media. Created a .smbcredentials file in /root. Then I added three lines to my fstab in the form of //paule6500/avdata /home/paul/avdata cifs credentials=/root/.smbcredentials ioch
arset=utf8,file_mode=0777,dir_ mode=0777 0 0

But when I ran sudo mount -a I got a message that lines 14,15,and 16 in fstab are bad.

I tried mounting the shares from terminal using the form //netbiosname/sharename /media/sharename cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
These mounts worked, showed up in Nautilus as folders with disk drives icon, and have an eject arrow in the left hand pane. Haven't seen that before. Pretty good, except these mounts are read-only.

The other strange thing is that these mounts seem to persist after a reboot. Is this the way 11.04 is supposed to work?

dmizer
December 12th, 2011, 05:53 AM
Looks like your mount line was missing a comma (highlighted in red).
//paule6500/avdata /home/paul/avdata cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
Double check all your lines to make sure there are no extra spaces or missing punctuation. If your mount line wraps, it'll probably error. This will happen if you've edited your fstab in a GUI editor like gedit.

These mounts worked, showed up in Nautilus as folders with disk drives icon, and have an eject arrow in the left hand pane. Haven't seen that before. Pretty good, except these mounts are read-only.
Check the troubleshooting section for fixes on read only files. Specifically the section that is titled 'Files owned by root / "The folder contents could not be displayed'."

The other strange thing is that these mounts seem to persist after a reboot. Is this the way 11.04 is supposed to work?
I've never heard of that happening with a manual CLI mount. The only thing I can think of is that your fstab entries are actually working correctly despite your earlier error after sudo mount -a.

TaTaE
December 12th, 2011, 05:59 AM
This share is mounted as domain administrator, I must say.

I have a problem accessing some files on a CIFS share. All other files and folders are accessible.


root@firewall:/media/sambaa/fisiere# ls
fullbackup var www
root@firewall:/media/sambaa/fisiere# ls
fullbackup var www
root@firewall:/media/sambaa/fisiere# rm -rf var/
^C
root@firewall:/media/sambaa/fisiere# rm -rf var/www/
^C
root@firewall:/media/sambaa/fisiere# rm -rf var/www/*
root@firewall:/media/sambaa/fisiere# rm -rf var/www/
^C
root@firewall:/media/sambaa/fisiere# rm -rf var/
^C
root@firewall:/media/sambaa/fisiere# mv var/ /tmp/
mv: cannot stat `var/www/duplicity-full.20111112T021708Z.vol1.difftar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T181707Z.to.20111111T191708Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T191708Z.to.20111111T201708Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T201708Z.to.20111111T211709Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T211709Z.to.20111111T221709Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T221709Z.to.20111111T231710Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111111T231710Z.to.20111112T001709Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-inc.20111112T001709Z.to.20111112T011709Z.vol1.diff tar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T181707Z.to.20111111T191708Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T191708Z.to.20111111T201708Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T201708Z.to.20111111T211709Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T211709Z.to.20111111T221709Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T221709Z.to.20111111T231710Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111111T231710Z.to.20111112T001709Z.si gtar.gz': No such file or directory
mv: cannot stat `var/www/duplicity-new-signatures.20111112T001709Z.to.20111112T011709Z.si gtar.gz': No such file or directory
root@firewall:/media/sambaa/fisiere# ls var/www/
ls: cannot access var/www/duplicity-full.20111112T021708Z.vol1.difftar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T181707Z.to.20111111T191708Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T191708Z.to.20111111T201708Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T201708Z.to.20111111T211709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T211709Z.to.20111111T221709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T221709Z.to.20111111T231710Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T231710Z.to.20111112T001709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111112T001709Z.to.20111112T011709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T181707Z.to.20111111T191708Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T191708Z.to.20111111T201708Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T201708Z.to.20111111T211709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T211709Z.to.20111111T221709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T221709Z.to.20111111T231710Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T231710Z.to.20111112T001709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111112T001709Z.to.20111112T011709Z.si gtar.gz: No such file or directory
duplicity-full.20111112T021708Z.vol1.difftar.gz duplicity-new-signatures.20111111T181707Z.to.20111111T191708Z.si gtar.gz
duplicity-inc.20111111T181707Z.to.20111111T191708Z.vol1.diff tar.gz duplicity-new-signatures.20111111T191708Z.to.20111111T201708Z.si gtar.gz
duplicity-inc.20111111T191708Z.to.20111111T201708Z.vol1.diff tar.gz duplicity-new-signatures.20111111T201708Z.to.20111111T211709Z.si gtar.gz
duplicity-inc.20111111T201708Z.to.20111111T211709Z.vol1.diff tar.gz duplicity-new-signatures.20111111T211709Z.to.20111111T221709Z.si gtar.gz
duplicity-inc.20111111T211709Z.to.20111111T221709Z.vol1.diff tar.gz duplicity-new-signatures.20111111T221709Z.to.20111111T231710Z.si gtar.gz
duplicity-inc.20111111T221709Z.to.20111111T231710Z.vol1.diff tar.gz duplicity-new-signatures.20111111T231710Z.to.20111112T001709Z.si gtar.gz
duplicity-inc.20111111T231710Z.to.20111112T001709Z.vol1.diff tar.gz duplicity-new-signatures.20111112T001709Z.to.20111112T011709Z.si gtar.gz
duplicity-inc.20111112T001709Z.to.20111112T011709Z.vol1.diff tar.gz
root@firewall:/media/sambaa/fisiere# ls var/www/ -ls
ls: cannot access var/www/duplicity-full.20111112T021708Z.vol1.difftar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T181707Z.to.20111111T191708Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T191708Z.to.20111111T201708Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T201708Z.to.20111111T211709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T211709Z.to.20111111T221709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T221709Z.to.20111111T231710Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111111T231710Z.to.20111112T001709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-inc.20111112T001709Z.to.20111112T011709Z.vol1.diff tar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T181707Z.to.20111111T191708Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T191708Z.to.20111111T201708Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T201708Z.to.20111111T211709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T211709Z.to.20111111T221709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T221709Z.to.20111111T231710Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111111T231710Z.to.20111112T001709Z.si gtar.gz: No such file or directory
ls: cannot access var/www/duplicity-new-signatures.20111112T001709Z.to.20111112T011709Z.si gtar.gz: No such file or directory
total 0
? -????????? ? ? ? ? ? duplicity-full.20111112T021708Z.vol1.difftar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T181707Z.to.20111111T191708Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T191708Z.to.20111111T201708Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T201708Z.to.20111111T211709Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T211709Z.to.20111111T221709Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T221709Z.to.20111111T231710Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111111T231710Z.to.20111112T001709Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-inc.20111112T001709Z.to.20111112T011709Z.vol1.diff tar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T181707Z.to.20111111T191708Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T191708Z.to.20111111T201708Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T201708Z.to.20111111T211709Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T211709Z.to.20111111T221709Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T221709Z.to.20111111T231710Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111111T231710Z.to.20111112T001709Z.si gtar.gz
? -????????? ? ? ? ? ? duplicity-new-signatures.20111112T001709Z.to.20111112T011709Z.si gtar.gz

dmizer
December 12th, 2011, 10:51 AM
This share is mounted as domain administrator, I must say.

Can you post the output of:
ls -la /media/sambaa/fisiere/var/www/

Also, double check the share permissions on the server side of things.

TaTaE
December 12th, 2011, 11:10 AM
Can you post the output of:
ls -la /media/sambaa/fisiere/var/www/

Also, double check the share permissions on the server side of things.



Thank you for your suggestions. I have checked and indeed, I was using a limited user account. When using Domain Administrator to mount the share, I was then able to delete those pesky folders. The ghosted files also disappeared after changing the user for mounting.

Thank you a lot and sorry for my lack of attention,

PaulHuffman
December 12th, 2011, 03:29 PM
I took out the space and added the comma. I'm not using a gui editor. I'm such a dinosaur I still use vi. Now the fstab lines are like //paule6500/elevation /home/paul/elevation cifs credentials=/root/.smbcredentials,iocharset=utf8,file_
mode=0777,dir_ mode=0777 0 0
//paule6500/docs /home/paul/pauldocs cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0
777,dir_ mode=0777 0 0
//paule6500/avdata /home/paul/avdata cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0
777,dir_ mode=0777 0 0

I umount ed one of my read only mounts. It disappeared from the desktop. Then tried mount -a and got messages
[mntent]: line 14 in /etc/fstab is bad
[mntent]: line 15 in /etc/fstab is bad
[mntent]: line 16 in /etc/fstab is bad


Rebooted, now all my previously persistent samba mounts have disappeared from the desktop.

dmizer
December 12th, 2011, 11:48 PM
I took out the space and added the comma. I'm not using a gui editor. I'm such a dinosaur I still use vi. Now the fstab lines are like //paule6500/elevation /home/paul/elevation cifs credentials=/root/.smbcredentials,iocharset=utf8,file_
mode=0777,dir_ mode=0777 0 0
//paule6500/docs /home/paul/pauldocs cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0
777,dir_ mode=0777 0 0
//paule6500/avdata /home/paul/avdata cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0
777,dir_ mode=0777 0 0

Your fstab line still wraps to the next line after file_ (probably an arbitrary space) so you'll have to fix that too. The mount line must be all on the same line or it will error. It also looks like you also have an arbitrary space after dir_ so this will need to be fixed as well.

Let me know if that works for you. Not sure why vi has included these, but if you continue to have problems, I suggest trying nano instead.

PaulHuffman
December 13th, 2011, 02:50 PM
Your fstab line still wraps to the next line after file_ (probably an arbitrary space) so you'll have to fix that too. The mount line must be all on the same line or it will error. It also looks like you also have an arbitrary space after dir_ so this will need to be fixed as well.

Let me know if that works for you. Not sure why vi has included these, but if you continue to have problems, I suggest trying nano instead.

I assure you that the mount lines are not split after file_ although they might look that way in this forum's code blocks.

The problem was the extra space after dir_ . Good eye. No more errors from mount -a . And now the mounts are rw. Thanks for all your help.

kamiller42
December 17th, 2011, 05:26 PM
This guide was very helpful to me, especially this part...

"Although smbfs is no longer part of Ubuntu, smbfs is still the metapackage (https://help.ubuntu.com/community/MetaPackages) which contains all the dependencies (https://help.ubuntu.com/community/InstallingSoftware#Package%20Dependencies) necessary for using cifs to mount Samba shares. Ubuntu does allow for some cifs functionality out of the box, so it may seem like this command is not necessary, but the smbfs metapackage is critical for this howto. Even if you are positive you DO have the smbfs metapackage installed, run this command anyway."

It was driving me mad as to why my credentials file was not working. That paragraph is why. Since I seemed able to browse to and manually amount shares on my Ubuntu server, I didn't think the client needed to install smbfs.

matt.s.wise
December 27th, 2011, 08:37 PM
Glad I came across this post - I was having the mount I/O error and had tried all sorts of combination of options - the nounix works!! cheers

When I don't use the "nounix" option I get this error message:

mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

If I use the fstab line that you suggested, I get the same problem, not being able to overwrite an excisting file with another version of it, nor
being able to delete a directory with something in it from nautilus or thunar. (these programs sometimes don't respond anymore)

Humanity to others
January 31st, 2012, 05:38 AM
Hi

I am using Ubuntu 10.04.3 LTS. I have permaentaly mounted samba shares on few pcs and running dos application by using dosemu. while I calling same exe file which is using another system that not running, ie I can run same dos application in serval system.

Using 11.04, I am suceessfully running dos application on shared environment. Because 10.04.3 is LTS version I planning change from 11.04 to 10.04.3. Kindly Help...

my fstab enty on Ubuntu 11.04 is

//192.168.0.1/share /mnt/share smbfs username=********,password=******* 0 0