Page 50 of 137 FirstFirst ... 40484950515260100 ... LastLast
Results 491 to 500 of 1362

Thread: Mount samba shares with utf8 encoding using cifs

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

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by boardman View Post
    Hi dmizer. below is my /etc/hosts file.
    The MSHOME thing I think is from where I tried making my ubuntu workgroup MSHOME (which is the same windows workgroup name entered on my DNS323). I thought I had removed this in the Admin>Network gui but it seems to have stuck.

    Code:
    127.0.0.1 localhost
    127.0.1.1 fridge.MSHOME
    
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    I'd like to stay with Hardy as I have installed all the little bits and pieces I like, I don't want to redo all my fiddling

    There is a potential problem with upgrading the firmware which is that from reading a few forum posts etc it appears that the firmware upgrade nessesitates a reformat of the drives. I am going to ask a couple of questions on the DNS323 forum as I don't currently have enough free harddrive space to copy everything off the nas drive while I update.

    As an aside my mothers family from Hamamatsu, small planet I guess
    wow ... small planet indeed.

    well, the MSHOME in your /etc/hosts file is causing your "unable to resolve host <COMPUTER NAME>" problem. edit /etc/hosts and remove the ".MSHOME" from the end of "fridge.MSHOME" so it will look like this:
    Code:
    127.0.0.1 localhost
    127.0.1.1 fridge
    
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    this may help with your netbios name resolution, as well as with your permissions.

  2. #492
    Join Date
    May 2008
    Beans
    9

    Re: Mount samba shares with utf8 encoding using cifs

    I think I have found the root of my problem and, like many problems it is a little embarrasing.

    As cifs was not going too well and smbfs was out of the question I decided to try NFS (which I had been avoiding as it is run via a 'user mod').

    Under NFS I had the same problem, the difference was that this time under in nautilus the properties the folders showed as having various users (either 501 or 502 which later I found were the UID's on the nas box for the users 'nobody' and 'leslie').

    When mounting the drive using CIFS all the folders appear as being owned by 'root'.

    The only folder that was not owned by 501 or 502 when mounted using NFS was the Util directory. The Util directory just happens to be the folder I was using to test copying and pasting files to subdirectories to. Typical.

    EDIT: I should note here that I created the util directory when I telneted in to the nas unit. I think the issue is that the telnet fucntion is added using a thing called "fun_plug". On telneting in the user is 'root'. The DNS323 does not have a user called 'root' in its standard list of users (it calls the 'root' user 'admin'. I suspect that as the DNS323 did not know who root was it limited access to the folder.

    I tried pasting in to a differnt folders (one owned by leslie and one owned by nobody) and it worked, so long as I added the 'noperm' option, which I now beleive makes cifs ignore UID/GID settings.

    If I don't add 'noperm' I still get the problem where the new file can be deleted and renamed but is otherwise read only until the share is remounted.

    I did find another how to where the person mentioned needing to make his ubuntu UID the same as the UID of the user on the nas box.

    Sorry for leading you on a goose-chase, I had incorrectly assumed that when mounting shares the underlying permissions were not important so never checked.

    Thank you very much for your help,

    Leslie

    PS: removing the .MSHOME part from my /etc/hosts worked and now the 'unable to resolve' error is gone as well.
    Last edited by boardman; June 2nd, 2008 at 10:14 PM.

  3. #493
    Join Date
    May 2008
    Beans
    21

    Re: Mount samba shares with utf8 encoding using cifs

    Thanks for a great thread - it has been a huge help to me.
    I am using a network with a single windows machine and a number of Hardy boxes. The windows machine has a partition D$ which gives access to the Hardy machines using cifs.

    If I use the following format in /etc/fstab of a Hardy box it mounts the share correctly in the directory /media/windata at boot.

    //192.168.72.1/D$ /media/windata cifs rw,user=<MyUsername>,pass=<MyPassword>,domain=<MyW orkgroup>,nounix 0 0

    However, If I use a credentials file as below:

    //192.168.72.1/D$ /media/windata cifs rw,credentials=/root/.smb_credentials,domain=<MyWorkgroup>,nounix 0 0

    the directory is empty. Changing permissions on the credentials file appears to make no difference nor does placing the credentials file in my home directory.

    Why?

  4. #494
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    double check your credentials file for the following:
    - that everything is spelled correctly
    - that it is formatted correctly (there must not be a space before or after the equal sign)

    do you have a space in your username? did you use a gui text editor to create the credentials file?

    if you're still having problems, do the following:
    Code:
    sudo umount /media/windata
    sudo mount /media/windata
    tail /var/log/syslog
    and post the output.

  5. #495
    Join Date
    May 2008
    Beans
    21

    Re: Mount samba shares with utf8 encoding using cifs

    Thanks for the reply.
    I have checked the credentials file carefully - in fact I removed the original and replaced it just to be sure. No spaces and I used nano to create it.

    Using in /etc/fstab
    //192.168.72.1/D$ /media/windata cifs rw,credentials=/root/.smb_credentials,domain=<MyWorkgroup>,nounix 0 0

    Output

    bob@server2:/$ sudo umount /media/windata
    [sudo] password for bob:
    umount: /media/windata: not mounted
    bob@server2:/$ sudo mount /media/windata
    mount: wrong fs type, bad option, bad superblock on //192.168.72.1/D$,
    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

    bob@server2:/$ tail /var/log/syslog
    Jun 5 12:58:56 server2 rsyncd[4240]: rsyncd version 2.6.9 starting, listening o n port 873
    Jun 5 12:59:01 server2 /usr/sbin/cron[4333]: (CRON) INFO (pidfile fd = 3)
    Jun 5 12:59:01 server2 /usr/sbin/cron[4334]: (CRON) STARTUP (fork ok)
    Jun 5 12:59:01 server2 /usr/sbin/cron[4334]: (CRON) INFO (Running @reboot jobs)
    Jun 5 12:59:02 server2 kernel: [ 217.951553] eth0: no IPv6 routers present
    Jun 5 13:02:24 server2 kernel: [ 420.060179] CIFS: Unknown mount option nounix
    Jun 5 13:02:24 server2 kernel: [ 420.060216] CIFS VFS: No username specified
    Jun 5 13:02:24 server2 kernel: [ 420.060296] CIFS VFS: cifs_mount failed w/re turn code = -22

    There are no files in /media/windata

    If I revert to the successful mount option in /etc/fstab
    //192.168.72.1/D$ /media/windata cifs rw,user=<MyUsername>,pass=<MyPassword>,domain=<MyW orkgroup>,nounix 0 0

    I get
    bob@server2:/$ sudo umount /media/windata
    umount: /media/windata: not mounted
    bob@server2:/$ sudo mount /media/windata
    bob@server2:/$ tail /var/log/syslog
    Jun 5 12:59:01 server2 /usr/sbin/cron[4333]: (CRON) INFO (pidfile fd = 3)
    Jun 5 12:59:01 server2 /usr/sbin/cron[4334]: (CRON) STARTUP (fork ok)
    Jun 5 12:59:01 server2 /usr/sbin/cron[4334]: (CRON) INFO (Running @reboot jobs)
    Jun 5 12:59:02 server2 kernel: [ 217.951553] eth0: no IPv6 routers present
    Jun 5 13:02:24 server2 kernel: [ 420.060179] CIFS: Unknown mount option nounix
    Jun 5 13:02:24 server2 kernel: [ 420.060216] CIFS VFS: No username specified
    Jun 5 13:02:24 server2 kernel: [ 420.060296] CIFS VFS: cifs_mount failed w/return code = -22

    but the share is mounted in /media/windata and I can browse the directories.
    Last edited by bobd72; June 5th, 2008 at 04:40 AM. Reason: Added information

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

    Re: Mount samba shares with utf8 encoding using cifs

    it's not reading the smb credentials file correctly for some reason.

    try this ... post the output of:
    Code:
    sudo slocate .smb_credentials

  7. #497
    Join Date
    May 2008
    Beans
    21

    Re: Mount samba shares with utf8 encoding using cifs

    bob@server2:/$ sudo slocate .smb_credentials
    [sudo] password for bob:
    sudo: slocate: command not found

  8. #498
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    well, let's install slocate then:
    Code:
    sudo aptitude install slocate
    then update the slocate database:
    Code:
    sudo updatedb
    reboot, and then try the search again:
    Code:
    sudo slocate .smb_credentials

  9. #499
    Join Date
    May 2008
    Beans
    21

    Re: Mount samba shares with utf8 encoding using cifs

    OK - installed.
    bob@server2:/$ sudo slocate .smb_credentials
    /root/.smb_credentials

  10. #500
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    please pm me the output of:
    Code:
    sudo cat /root/.smb_credentials

Page 50 of 137 FirstFirst ... 40484950515260100 ... 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
  •