Page 69 of 137 FirstFirst ... 1959676869707179119 ... LastLast
Results 681 to 690 of 1362

Thread: Mount samba shares with utf8 encoding using cifs

  1. #681
    Join Date
    Sep 2008
    Beans
    5

    Re: Mount samba shares with utf8 encoding using cifs

    hi dmizer

    Sorry for the late reply. haven't been in the office for the last 2 days.

    I use the same windows domain password for both the servers. So i would assume then tha i can use the same credentials file for both servers?

    I have tried both the administrator username and my own username to ensure that i'm not having a problem with rights once i'm on the windows servers.

  2. #682
    Join Date
    Sep 2008
    Location
    New Orleans, LA
    Beans
    3
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Mount samba shares with utf8 encoding using cifs

    Dmizer,

    I figured out a problem that might have been giving me the permission denied error, which was a part of the way my credentials file was written (it had a space at the end of password=*****).

    So now, the folder is mounting (thank you), but I have read-only permission despite the "nounix" option and the "rw" option. So that is my main problem.

    The windows machine has a firewall, but I cannot take that down. It is open to sharing folders, however, and my admin tells me I might have to force ubuntu to use certain ports to access it, however. I most certainly have no clue how to go about this.

    Also, the workgroup of the windows machine (which I assume is the domain) is not "WORKGROUP", it is "reily". Any way I can change that setting on my machine? Why does the machine insist on WORKGROUP?

  3. #683
    Join Date
    Mar 2008
    Beans
    39

    Re: Mount samba shares with utf8 encoding using cifs

    Hello,

    How can I allow other users from the same client machine access to the Samba shares? One my main machine my wife and I have accounts. When I log in from my wifes account, I don not have access to the mounted samba shares like I do with my account. In my .smbcredentials file I only have my username and password. When I add a second entry for my wife's account I get mounting errors.

    TIA

  4. #684
    Join Date
    Oct 2007
    Beans
    10

    Re: Mount samba shares with utf8 encoding using cifs

    First of all:
    Thanks for a great thread!

    This thread helped me alot configuring my home network.

    The case:
    I want you to help me to mount an password encrypted ftp (with RW permission's) when mounting a password protected network share fails. I would find that very helpful for my laptop that i carry with me.

    So when:

    For a password protected share with read/write permission.
    Code:
    //netbiosname/sharename    /media/sharename        cifs    credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
    ...Fails connecting. I want the system to mount an password encrypted ftp with static ip to that sharename instead.

    How do i pull this off?

    Your help is appreciated!

  5. #685
    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 timsa View Post
    hi dmizer

    Sorry for the late reply. haven't been in the office for the last 2 days.

    I use the same windows domain password for both the servers. So i would assume then tha i can use the same credentials file for both servers?

    I have tried both the administrator username and my own username to ensure that i'm not having a problem with rights once i'm on the windows servers.
    Believe it or not, I'm still working on this. Most of my problem is that I can't duplicate your issues.

    Quote Originally Posted by mmavrice View Post
    Dmizer,

    I figured out a problem that might have been giving me the permission denied error, which was a part of the way my credentials file was written (it had a space at the end of password=*****).

    So now, the folder is mounting (thank you), but I have read-only permission despite the "nounix" option and the "rw" option. So that is my main problem.

    The windows machine has a firewall, but I cannot take that down. It is open to sharing folders, however, and my admin tells me I might have to force ubuntu to use certain ports to access it, however. I most certainly have no clue how to go about this.

    Also, the workgroup of the windows machine (which I assume is the domain) is not "WORKGROUP", it is "reily". Any way I can change that setting on my machine? Why does the machine insist on WORKGROUP?
    Sorry, try this instead then:
    Code:
    //CSI/Outdoors /mnt/csi cifs credentials=/home/mmavrice/.smbcredentials,rw,domain=reily,nounix,iocharset=utf8,file_mode =0777,dir_mode=0777 0 0
    Quote Originally Posted by kwisher View Post
    Hello,

    How can I allow other users from the same client machine access to the Samba shares? One my main machine my wife and I have accounts. When I log in from my wifes account, I don not have access to the mounted samba shares like I do with my account. In my .smbcredentials file I only have my username and password. When I add a second entry for my wife's account I get mounting errors.

    TIA
    In your case, you'll have to add your ubuntu username and password to your windows computer. Then, update your credentials file with your Ubuntu login and password.

    Quote Originally Posted by Skalman5 View Post
    First of all:
    Thanks for a great thread!

    This thread helped me alot configuring my home network.

    The case:
    I want you to help me to mount an password encrypted ftp (with RW permission's) when mounting a password protected network share fails. I would find that very helpful for my laptop that i carry with me.

    So when:

    For a password protected share with read/write permission.
    Code:
    //netbiosname/sharename    /media/sharename        cifs    credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
    ...Fails connecting. I want the system to mount an password encrypted ftp with static ip to that sharename instead.

    How do i pull this off?

    Your help is appreciated!
    Sorry, but this is outside the scope of this howto. You should try looking into howto's for fuse.

  6. #686
    Join Date
    Oct 2008
    Beans
    7

    Re: Mount samba shares with utf8 encoding using cifs

    I was able to use your tutorial to connect to my test server at work. However, I'm having issues with my production server because they're using ntlmv2i

    I posted a question about it separately here:
    http://ubuntuforums.org/showthread.php?t=947858 but it occurred to me that maybe I should post a comment here to see if you could help.

    Thanks for this!

  7. #687
    Join Date
    Dec 2006
    Beans
    701
    Distro
    Ubuntu

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by dmizer View Post
    Introduction
    I was having the most difficult time in the world trying to figure out the best way to connect from my ubuntu workstation to a server hosting shares which were created on a windows 2000 server.

    Nautilus mounted them fine, and displayed the correct folder and file names. However, the files were not cashed which meant that I was getting very slow response times, and applications which were Nautilus unaware (Open office) could not access the shares. I was also having difficulty with my keyring among a few other share related issues.

    I tried using the smbfs mount function, but it didn't want to cooperate with the Japanese file names. So, since cifs is suppose to be poised for a smbfs replacement I decided to take a look into it and see what it could do. So, even if you don't have Japanese (or other non-latin based characters) in your shared folder/file names, you should still take a look at cifs.

    Disclaimer:
    ==================================
    Despite the fact that this is a CLI tutorial, I have tried to write at a fairly basic level. Therefore, I've included a lot of commentary to address the needs of a newly established Linux/Ubuntu user which makes this howto seem lengthy (it's really only a couple lines of cli edits). So, if there is confusion, please let me know so I can attempt to clear it up.

    Also, I have focused on command line instruction so the methods can be used in any of the Ubuntu based releases (Ubuntu, Kubuntu, Xubuntu et. al.)

    Some NAS devices (like the ARGOSY HD363N) have difficulty handling cifs, so if you are trying to connect to a network attached storage unit, you may be stuck with smbfs. If you do have a NAS device, besure to include the device name and model in your post if you are having trouble.

    A bug (described here) in gedit prevents gedit from saving to files located on CIFS mounted shares. If you need to use gedit, you should explore other share options. This is not a bug with Samba or CIFS, so other text editors will work fine. Thank you MountainX for reporting this very helpful information.
    ==================================

    Pre-work

    There are a few preliminary actions we need to take before we can start mounting using cifs.

    Although cifs installs right alongside smbfs, smbfs is not installed by default. Hardy does allow for some cifs functionality out of the box, so it may seem like this command is not necessary, but it is for this howto. Even if you DO have smbfs installed, there's no harm in running this command anyway.
    Code:
    sudo aptitude install smbfs
    Now we need to create a location where the samba share can mount. Change "sharename" in the following code to something unique to the remote share, and that you will recognize (usually the share name itself). By creating the mount point in the /media folder, you will get a nifty icon to appear on your desktop like when a cdrom mounts.
    Code:
    sudo mkdir /media/sharename
    To mount a windows share on a DHCP network, it is convenient to be able to mount by netbios name, so you don't have to modify the mount parameters every time you reboot your network. This can be easily enabled by doing the following:

    Edit your nsswitch file
    Code:
    sudo nano /etc/nsswitch.conf
    search through the file and look for the line that looks something like so:

    and add "wins" to the end of the line so it looks something like this:

    Save the file by hitting ctrl+x, type "y" to save the buffer, and <enter> to exit.
    note: "wins" MUST come before "dns" if you are using the openDNS service.

    Now you'll need to install winbind
    Code:
    sudo aptitude install winbind
    Reboot, or restart your network.

    Before you move on, you'll need to know the netbios name and share name of the computer you are trying to connect to. If you don't know what they are, please see the next post in this thread before continuing


    ----------------------------------------------------

    There are two ways you can mount using cifs; you can mount it manually as a one time use type purpose, or you can mount it permanently. If you only want to mount the share a few times, it's probably best to follow the directions under "Manual mount". If you will be mounting the same share over and over again, follow the directions under "Permanent mount".

    In all cases, you will have to replace the following words:
    > netbiosname
    > sharename

    with the actual netbios name and shared folder name of the shares on your remote computer.


    Manual mount

    If all you want to do is mount the samba share a few times, it's probably not necessary to make modifications to fstab as is the case with a permanent arrangement. Just modify one of the following lines so that it reflects your local needs (ie, change "netbiosname" to the netbios name of the samba server you are attempting to connect to, change "sharename" to the network name of your share, and change 'winusername' and 'winpassword' to the appropriate username and password of the share you are attempting to connect to).

    For a samba server with password protection:
    Code:
    sudo mount -t cifs //netbiosname/sharename /media/sharename -o username=winusername,password=winpassword,iocharset=utf8,file_mode=0777,dir_mode=0777
    If your samba share does not require a password (shame on you ) just use the following line instead:
    Code:
    sudo mount -t cifs //netbiosname/sharename /media/sharename -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777
    If your guest access does not allow write access, just remove the file and dir modes like so:
    Code:
    sudo mount -t cifs //netbiosname/sharename /media/sharename -o guest,iocharset=utf8
    Permanent mount

    If you connect to the same samba share day in and day out, you'll likely want to mount it with a more permanent arrangement so you don't have to go looking for your mount command every time you boot your computer. To do this, you'll need to modify your fstab file. This is a system critical file (your Ubuntu box will not work correctly if it has a mistake), so you'll want to make a backup in case things go haywire on you:
    Code:
    sudo cp /etc/fstab /etc/fstab_old
    if you need to restore your backup, use the following command:
    Code:
    sudo mv /etc/fstab_old /etc/fstab
    If your samba server requires a password to access the shared files, you should create a credentials file so the username and password are hidden from prying eyes. If you don't have password protected access to your samba share, skip this section and start with the line that says "Now we edit fstab:".

    To create a credentials file, do the following:
    Code:
    sudo nano /root/.smbcredentials
    WARNING!!! Do not use a GUI text editor (like KATE) to create this file!!!

    Add the following lines (change winusername and winpassword to the correct username and password for the samba/windows server you want to connect to):

    Save the file by hitting ctrl+x, type "y" to save the buffer, and <enter> to exit.

    Now, change the permissions of the file so only root can read and edit it:
    Code:
    sudo chmod 700 /root/.smbcredentials
    Now we edit fstab:
    Code:
    sudo nano /etc/fstab
    and at the end of the file, insert one (1) of the following 3 lines according to your needs. Make sure you change "netbiosname" and "sharename" to the correct names for the server you are trying to connect to. (if you don't know what these are, please see the next post)

    For a password protected share with read/write permission.
    Code:
    //netbiosname/sharename    /media/sharename        cifs    credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
    For a non-password protected share with read/write permission use this instead:
    Code:
    //netbiosname/sharename    /media/sharename        cifs    guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
    For read only guest access:
    Code:
    //netbiosname/sharename    /media/sharename        cifs    guest,iocharset=utf8 0 0
    Save the file by hitting ctrl+x, type "y" to save the buffer, and <enter> to exit.
    note: if you've used a text editor other than nano, make sure that there is a blank line at the end of this file.

    Finally, test your settings to make sure they work:
    Code:
    sudo mount -a
    If you get a folder on your desktop with your server shares, then you have configured everything correctly. If not, please review the howto, or post in the thread.

    Now, your samba shares will be mounted every time you start the computer. If you are not connected to your network when you boot, this will not cause problems. The share will simply not appear on your desktop.

    After word

    If you see an error in your dmesg that reads:

    you can fix the problem by following the directions here: https://launchpad.net/distros/ubuntu...74/comments/48

    Thanks to bigbadsi for all the troubleshooting done to find the solution to this error, and for providing the inspiration for this howto: http://www.ubuntuforums.org/showthread.php?t=282008

    ******FEISTY USERS******
    If you see an error on shutdown, and or your shutdown sequence halts because of this error message:
    Code:
    [18.312000] CIFS VFS: Server not responding
    [18.312000] No response for cmd 5 mid 8
    please see the fix provided in this link: http://ubuntuforums.org/showthread.php?t=293513
    *thanks to incoming429 for testing the fix on this error.

    ******HARDY USERS******
    If you are seeing "mount error 13 = Permission denied" error ("CIFS VFS: cifs_mount failed w/return code = -13" in dmesg) when entering the "sudo mount -a" command, add the nounix option like so:
    Code:
    //netbiosname/sharename    /media/sharename        cifs    credentials=/root/.smbcredentials,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
    thanks to TonyS for posting this solution here: http://ubuntuforums.org/showthread.php?t=800313

    smbfs is not included in Hardy. If your network needs require smbfs, you will have to compile it from source, or continue to use Gutsy.

    ******ALL USERS******
    Here is a fantastic thread for how to configure Firestarter so that name resolution works correctly: http://ubuntuforums.org/showthread.php?t=190542

    You can also use this howto for normal samba shares (without utf8 encoding). If the share does not have utf8 encoding, the iocharset option is simply ignored.

    Let me know if this helps!

    version history:
    2007-01-11 > included information about NAS devices in the disclaimer section.
    2007-03-10 > changed fstab lines to code bbc markup instead of quote markup in order to fix an arbitrary space.
    2007-04-09 > added option "rw" to the mount options for non-password protected read/write shares.
    2007-05-11 > possible work-around for opendns. testers wanted.
    2007-06-14 > added fix for "cifs vfs: server not responding" error appearing on shutdown in some feisty installs
    2007-09-27 > updated with fix for use with openDNS servers.
    2008-03-28 > included bug information regarding gedit.
    2008-05-20 > added fix for "mount error 13" in Hardy.
    2008-05-29 > minor edit in "Disclaimer"
    2008-06-01 > added note about the lack of smbfs in Hardy
    2008-06-05 > clarified the need for installing smbfs package
    2008-06-11 > added link for firestarter configuration
    Quote Originally Posted by dmizer View Post
    Just like to add:

    If you don't know what the server netbios name is you can find it this way:

    For windows servers
    To find the netbios name in Windows xp:
    • start > my computer > view system information (under "system tasks" on the left) > computer name (tab)

      The netbios name is next to "full computer name"


    To find the share name in Windows xp:
    • Right click on the shared folder and select "properties", and click on the tab that says "sharing".

      The share name is listed under "network sharing and security" next to "share name".


    For linux servers
    Best way I can think of is to look at your smb.conf file to see what your computer is called:
    Code:
    cat /etc/samba/smb.conf | grep netbios
    the output will show your ubuntu server's netbios name.

    Alternatively, you can find all the shares and share names on your network by entering the following command:
    Code:
    smbtree
    or if your server requires a password:
    Code:
    smbtree user=winusername[winpassword]
    and you should get results that look like this:
    Code:
    $ smbtree
    Password:
    MSHOME
            \\YAMADA                        山田
                    \\YAMADA\SharedDocs
                    \\YAMADA\IPC$                   Remote IPC
            \\SPROUT                        kasuga
                    \\SPROUT\C$                     Default share
                    \\SPROUT\ADMIN$                 Remote Admin
                    \\SPROUT\Common Files
                    \\SPROUT\SharedDocs
                    \\SPROUT\IPC$                   Remote IPC
            \\OYAMA
                    \\OYAMA\IPC$            Remote IPC
            \\HIMUROPC                      himuro
                    \\HIMUROPC\SharedDocs
                    \\HIMUROPC\IPC$                 Remote IPC
    \\netbiosname\sharename

    the password it asks for is the password for the samba server's share.
    Amazing guide, This helped me alot. I have this saved for further use


  8. #688
    Join Date
    Oct 2008
    Beans
    28

    Question Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by dmizer View Post
    Introduction
    I was having the most difficult time in the world trying to figure out the best way to connect from my ubuntu workstation to a server hosting shares which were created on a windows 2000 server.......
    Hi, first of all, many thanks for this post, it's be very helpful in introducing me to the basics of Ubuntu, now that I am trying to get rid of Vista.

    I have followed the procedure carefully, but I still get the error 13 :

    alexandre@XXXXX:~$ sudo mount -a
    sudo: unable to resolve host XXXXX
    mount error 13 = Permission denied
    Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
    alexandre@XXXXX:~$

    I am in a Windows 2003 Domain.

    Here the line I have added to the end of my fstab file :

    //data01/alexandre /media/alexandre cifs credentials=/root/.smbcredentials,rw,domain=domain.net,nounix,iochar set=utf8,file_mode=0777,dir_mode=0777 0 0

    In the .smbcredentials file, I have put alexandre@domain.net as the username, but the result is the same without the @domain.net

    Any idea on what's wrong? What additional information shall I provide to help the community help me resolve this problem?

    Regards, Alexandre

  9. #689
    Join Date
    Jun 2007
    Beans
    8

    Re: Mount samba shares with utf8 encoding using cifs

    This guide worked perfectly. After spending several hours searching, it was wonderful to find a guide that is clearly worded in understandable language.

    Thanks!

  10. #690
    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 Alexandre76 View Post
    Hi, first of all, many thanks for this post, it's be very helpful in introducing me to the basics of Ubuntu, now that I am trying to get rid of Vista.

    I have followed the procedure carefully, but I still get the error 13 :

    alexandre@XXXXX:~$ sudo mount -a
    sudo: unable to resolve host XXXXX
    mount error 13 = Permission denied
    Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
    alexandre@XXXXX:~$

    I am in a Windows 2003 Domain.

    Here the line I have added to the end of my fstab file :

    //data01/alexandre /media/alexandre cifs credentials=/root/.smbcredentials,rw,domain=domain.net,nounix,iochar set=utf8,file_mode=0777,dir_mode=0777 0 0

    In the .smbcredentials file, I have put alexandre@domain.net as the username, but the result is the same without the @domain.net

    Any idea on what's wrong? What additional information shall I provide to help the community help me resolve this problem?

    Regards, Alexandre
    Are you attempting to mount a share on an active directory?

Page 69 of 137 FirstFirst ... 1959676869707179119 ... 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
  •