Well I've decided with a slightly more roundabout approach. I am running a VM with an Ubuntu 8.10 Server guest OS, and I'm going to use that to connect to the Music folder (that is shared) on the host OS. Then, I'll use SSHFS to mount the mountpoint on the guest OS onto my school computer. Right now, my Music folder is configured to allow "Full Control" for the admin and lim account (a non-administrative account on my machine). However, if I try to mount it from within the guest OS with:
I get the following message:Code:sudo mount -t cifs //netbiosname/sharename /media/sharename -o username=***,password=***,nounix,rw,iocharset=utf8,uid=1000,gid=1000, file_mode=0777,dir_mode=0777
I get this error message regardless of whether I try to login as admin or as lim. The only way to get rid of this error is to allow "Everyone" "Full Control" to the Music folder (under remote permissions) on my Windows host, which I obviously don't want to do. Do you have any ideas as to how I might fix this problem?Code:CIFS VFS: cifs_read_super: get root inode failed mount error 13 = Permission denied
Well, first of all even if you could mount the SAMBA share from your Ubuntu VM, you wouldn't be able to share it (as far as I know).
- What virtualization software are you using?
- Do you have your VM configured for NAT or Bridged networking?
- Is your Windows share really located at "//netbiosname/sharename"?
- Are you sure your gid and uid is 1000?
- Does "/media/sharename" exist as an empty folder in your Ubuntu virtual machine?
From the ubuntu virtual machine, please post the output of:
Where "netbiosname" should be replaced with the actual netbios name for your Windows computer. If you don't know what this is, please see the second post in this thread.Code:smbclient -L netbiosname
My answers to your questions:
- VMware Player/Server
- Bridged networking
- Yes. I am sure of this, because if I add the group "Everyone" and give it "Full Control" in Windows, then I am able to mount the share.
- Yes, when I make the above changes, and the share is mounted, I see that the owner & group are correctly set.
- Refer to the answers above.
As for the command, I actually had to run the following one:
since my VM username and Windows username (the particular Windows user account is a non-administrator account I specifically created for this purpose) are different.Code:smbclient -L netbiosname -U windows_username
The output is:
A couple of funny things, I'm not sure if they are relevant:Code:Sharename Type Comment --------- ---- ------- E$ Disk Default share IPC$ IPC Remote IPC D$ Disk Default share print$ Disk Printer Drivers SharedDocs Disk G$ Disk Default share Music Disk ADMIN$ Disk Remote Admin C$ Disk Default share Server Comment --------- ------- Workgroup Master --------- -------
- When it prompts me for a password, and I type in the actual password, it claims that "session setup failed: NT_STATUS_LOGIN_FAILED". However, if I just hit "Enter" (i.e., don't enter in a password), it gives me the above output.
- If I run the smbclient command above with "-U admin_username", and I don't enter in a password, then it correctly states that permission is denied, but also correctly lists the Workgroup and Master. If I do enter the correct admin password, then I get the same output as above (including the fact that the Workgroup and Master entries are empty).
Last edited by LordKelvan; December 16th, 2008 at 05:55 PM.
I have a script that simply mounts a samba share via this one line command:
I don't want to add an entry to my /etc/fstab and prefer to mount it via this script (I have another script that unmounts it as well). This method works just fine EXCEPT that it makes the username/password public. I'd like to use a credentials file, but to my knowledge, this is only appropriate for an entry in the /etc/fstab. Is there a way to use one with a mount command?Code:sudo mount -t cifs -o username=user,password=password //192.168.1.2/stuff ~/stuff
When I tried to via the follow, I got an error:
Code:$ sudo mount -t cifs -o credentials=/root/.cred_for_smb //192.168.1.2/stuff ~/stuff mount: wrong fs type, bad option, bad superblock on //192.168.1.2/stuff, 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
Just to be sure, try this:
If you are using Hardy or Ibex, they are shipped with a stripped down version of cifs for mounting with Nautilus, but you may not get full functionality until you install the smbfs metapackage.Code:sudo aptitude install smbfs
@dmizer - installing smbfs solved the problem, thanks! Great guide you've written here btw, I have referenced it numerous time.
So I recently updated from Gutsy->Intrepid on my laptop (I'd had a full HDD for the longest time and was lazy) and started getting an error 13 when trying to mount my smbfs shares. I've updated my fstab following the ideas in this guide, but I still get the error. The samba shares are across my LAN between two linux machines, my laptop (now) running Intrepid and my old desktop serving as a file server/mythtv box and still running Gutsy.
And the error:Code://SERVER/Documents /media/Server/Documents cifs credentials=/root/.smb_pwd,rw,nounix,iocharset=utf8,file_mode=0755,dir_mode=0755 0 0
So I have two questions:Code:$sudo mount /media/Server/Documents mount error 13 = Permission denied Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
- is this problem solely on my laptop's side? Is the difference between CIFS/SMBFS transparent to a server or do I need to update my old desktop too? (ok. I know I *need* to update it eventually, but I mean to fix this problem). As I understand it, CIFS came in with Hardy.
If that is not successful, please post the output of:Code:sudo aptitude install smbfs
Where SERVER is the actual netbios name of your Gutsy server.Code:smbclient -L SERVER
Also, since both of your machines are Ubuntu, please consider using NFS instead of SAMBA. It's much more simple to configure, and you'll get better performance. The 4th link in my signature contains great instructions for configuring both the server and the client.
Hmm... 'ROOMMATE-PC' is my roommates pc (which I've obviously renamed), it looks like it's won that samba-master negotiation-thingy for the workgroup... That shouldn't affect anything though, should it?Code:$smbclient -L SERVER Sharename Type Comment --------- ---- ------- IPC$ IPC IPC Service (File Server) print$ Disk Printer Drivers CD-ROM Disk CD-ROM DVD-ROM Disk DVD-ROM Documents Disk Documents MythTV Disk MythTV Storage 960c Printer HP Deskjet 960c Server Comment --------- ------- Workgroup Master --------- ------- WORKGROUP ROOMMATE-PC