Page 80 of 137 FirstFirst ... 3070787980818290130 ... LastLast
Results 791 to 800 of 1362

Thread: Mount samba shares with utf8 encoding using cifs

  1. #791
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by LordKelvan View Post
    Hmm, you don't say.... well thanks for the tip. Is that why I always see people using SAMBA for home networks where both client and server are on the same network?
    yes, SAMBA is meant for intranet only. You need to do a very thorough scan of your Windows machine. I would go so far as to suggest that you reinstall, or at least do a recovery.

    Quote Originally Posted by LordKelvan View Post
    Would you happen to have any free and simple solutions to my problem (like free VPN or something).

    Cheers,
    LK
    Both SSH and openVPN are available in Windows.

  2. #792
    Join Date
    Jun 2007
    Beans
    129

    Re: Mount samba shares with utf8 encoding using cifs

    Hi:

    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:
    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 the following message:
    Code:
    CIFS VFS: cifs_read_super: get root inode failed
    mount error 13 = Permission denied
    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?

    Cheers,
    LK

  3. #793
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    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).

    Several questions:
    1. What virtualization software are you using?
    2. Do you have your VM configured for NAT or Bridged networking?
    3. Is your Windows share really located at "//netbiosname/sharename"?
    4. Are you sure your gid and uid is 1000?
    5. Does "/media/sharename" exist as an empty folder in your Ubuntu virtual machine?


    From the ubuntu virtual machine, please post the output of:
    Code:
    smbclient -L netbiosname
    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.

  4. #794
    Join Date
    Jun 2007
    Beans
    129

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by dmizer View Post
    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).
    I am running an SSH server on the VM, so I plan to simply use SSHFS to mount the relevant directory (on my VM) onto my school computer

    My answers to your questions:
    1. VMware Player/Server
    2. Bridged networking
    3. 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.
    4. Yes, when I make the above changes, and the share is mounted, I see that the owner & group are correctly set.
    5. Refer to the answers above.


    As for the command, I actually had to run the following one:
    Code:
    smbclient -L netbiosname -U windows_username
    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.

    The output is:
    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
    ---------            -------
    A couple of funny things, I'm not sure if they are relevant:
    1. 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.
    2. 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).


    Cheers,
    LK
    Last edited by LordKelvan; December 16th, 2008 at 05:55 PM.

  5. #795
    Join Date
    Dec 2006
    Location
    /dev/null
    Beans
    351

    Re: Mount samba shares with utf8 encoding using cifs

    I have a script that simply mounts a samba share via this one line command:

    Code:
    sudo mount -t cifs -o username=user,password=password //192.168.1.2/stuff ~/stuff
    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?

    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

  6. #796
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by graysky View Post
    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?
    According to man mount.cifs, it's perfectly legal to use a credentials file for any cifs mount. I'm not sure why you're getting an error.

    Just to be sure, try this:
    Code:
    sudo aptitude install smbfs
    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.

  7. #797
    Join Date
    Dec 2006
    Location
    /dev/null
    Beans
    351

    Re: Mount samba shares with utf8 encoding using cifs

    @dmizer - installing smbfs solved the problem, thanks! Great guide you've written here btw, I have referenced it numerous time.

  8. #798
    Join Date
    Mar 2007
    Beans
    42

    Re: Mount samba shares with utf8 encoding using cifs

    Hm.
    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.
    Code:
    //SERVER/Documents             /media/Server/Documents                 cifs    credentials=/root/.smb_pwd,rw,nounix,iocharset=utf8,file_mode=0755,dir_mode=0755  0 0
    And the error:
    Code:
    $sudo mount /media/Server/Documents
    
    mount error 13 = Permission denied
    Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
    So I have two questions:
    1. 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.
    2. help.

  9. #799
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by Gammell View Post
    Hm.
    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.
    Code:
    //SERVER/Documents             /media/Server/Documents                 cifs    credentials=/root/.smb_pwd,rw,nounix,iocharset=utf8,file_mode=0755,dir_mode=0755  0 0
    And the error:
    Code:
    $sudo mount /media/Server/Documents
    
    mount error 13 = Permission denied
    Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
    So I have two questions:
    1. 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.
    2. help.
    Please try this:
    Code:
    sudo aptitude install smbfs
    If that is not successful, please post the output of:
    Code:
    smbclient -L SERVER
    Where SERVER is the actual netbios name of your Gutsy 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.

  10. #800
    Join Date
    Mar 2007
    Beans
    42

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by dmizer View Post
    Please try this:
    Code:
    sudo aptitude install smbfs
    Yeah, I'd already ran apt-get to make sure it hadn't some how been removed


    Quote Originally Posted by dmizer View Post
    If that is not successful, please post the output of:
    Code:
    smbclient -L SERVER
    Where SERVER is the actual netbios name of your Gutsy server.
    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
    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?


    Quote Originally Posted by dmizer View Post
    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.
    This has been on my To-Do list for a very long time. I can never get rid of SAMBA because there are nonlinux boxes on my network from time to time, but the only reason I still use it is legacy. (I learnt linux on the server and didn't switch to linux for day to day use until a year or two later). Thanks for the link, it will be helpful someday soon (I think updating from Gutsy will have priority though ...)

Page 80 of 137 FirstFirst ... 3070787980818290130 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •