Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old October 30th, 2006   #1
dmizer
The Earth is banana shaped.
 
dmizer's Avatar
 
Join Date: Mar 2006
Location: Kitakyushu Japan
Beans: 7,505
Xubuntu 8.04 Hardy Heron
Mount samba shares with utf8 encoding using cifs

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 (see disclaimer below). If you do have a NAS device, besure to include the device name and model in your post if you are having trouble.

SMBFS has depreciated is no longer included in Ubuntu. If your network needs require smbfs, you will have to compile it from source, or use a version of Ubuntu earlier than Hardy (not recommended).

Finally, there are two alternatives to the following howto that may be of interest to some people. There is a nicely written tutorial for hard-mounting via GVFS: http://ubuntuforums.org/showthread.php?t=1186877. I have also written a tutorial for fixing Samba browsing here: http://ubuntuforums.org/showthread.php?t=1169149
==================================

Pre-work

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

Although smbfs is no longer part of Ubuntu, smbfs is still the metapackage which contains all the dependencies necessary for using cifs to mount Samba shares. Hardy 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.
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:
Code:
hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
and add "wins" to the line so it looks something like this:
Code:
hosts:          files mdns4_minimal [NOTFOUND=return] wins dns mdns4
Save the file by hitting ctrl+x, type "y" to save the buffer, and <enter> to exit.
note: Order does matter. "wins" MUST be before "dns".

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):
Quote:
username=winusername
password=winpassword
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 see the "Troubleshooting" section below, 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.

Troubleshooting

******ERRORS******
Internal error failed to initialize HAL!
If you see this error in your dmesg, 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

---------####---------

CIFS VFS: Server not responding
If you see this error during 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
Run these two commands:
Code:
ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh
ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh
Source: http://ubuntuforums.org/showthread.php?t=1128729

*thanks to incoming429 for testing the fix on this error.

The above fix doesn't work in all situations. There are more fixes listed in this thread: http://ubuntuforums.org/showthread.php?t=293513, or see the Jaunty specific fix below.

Bug information here: https://bugs.launchpad.net/ubuntu/+s...r/+bug/211631/

******Jaunty USERS******
CIFS VFS: Server not responding error needs a bit different fix.

Edit /etc/gdm/PostSession/Default:
Code:
sudo nano /etc/gdm/PostSession/Default
Add /etc/init.d/umountnfs.sh to the top of the file like so:
Code:
#!/bin/sh
/etc/init.d/umountnfs.sh

PATH="/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH:/bin:/usr/bin"
OLD_IFS=$IFS

gdmwhich () {
  COMMAND="$1"
  OUTPUT=
  IFS=:
  for dir in $PATH
  do
    if test -x "$dir/$COMMAND" ; then
      if test "x$OUTPUT" = "x" ; then
        OUTPUT="$dir/$COMMAND"
      fi
    fi
  done
  IFS=$OLD_IFS
  echo "$OUTPUT"
}

exit 0
******HARDY USERS******
Mount error 13. 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

******ALL USERS******
Space in path name. If you have a space in your path (example: //netbiosname/sharename with space), you should replace the space with '\040' like so:
Code:
//netbiosname/sharename\040with\040space    /media/sharename        cifs    credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
---------####---------

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

---------####---------

Open Office save errors. If you get save errors when modifying an Open Office document in a CIFS mounted share, you will need to include the nobrl option like so:

Code:
//netbiosname/sharename    /media/sharename        cifs    credentials=/root/.smbcredentials,iocharset=utf8,nobrl,file_mode=0777,dir_mode=0777 0 0
Thanks to jwrede for providing the solution to this troublesome problem.

---------####---------

Gedit save errors.
A bug (described here) in gedit prevents gedit from saving to files located on CIFS mounted shares. Thank you MountainX for reporting this very helpful information. A workaround for this error was located here. The link is no longer valid, but the described workaround was to uncheck "Create backup of files before saving" (under "Edit" > "Preferences" > "Editor"). Also, a patch was recently posted so current versions of Gedit may not be effected.

---------####---------

Problems connecting to Vista? Take a look at this thread: http://ubuntuforums.org/showthread.php?p=6120780

Also, you will not be able to connect to any UAC protected drive/directory. Because of this, sharing the entire drives will not give you access (unlike it did in XP). Believe me when I say ... this is a very good thing. You don't want your entire system hanging out there for all to see. It's possible to override this protection but I wouldn't advise it.

Instead, share a single folder that your Vista user has control over. More information here:
http://www.vistax64.com/vista-securi...ss-denied.html

---------####---------

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:

1) Find your uid and gid (normally both are 1000, but double check):
Code:
cat /etc/passwd | grep ubuntu-username
The output will look something like this (my uid and gid are marked in red):
Code:
$ cat /etc/passwd | grep dmizer
dmizer:x:1000:1000:dmizer,,,:/home/dmizer:/bin/bash
2) Add gid, uid, and nounix options to your fstab line like so:
Code:
//netbiosname/sharename    /media/sharename        cifs    credentials=/root/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,nounix,file_mode=0777,dir_mode=0777 0 0
KARMIC: Files owned by root / "The folder contents could not be displayed"
Note for KARMIC users encountering this error:
There is a bug affecting some users (particularly those with NAS devices like the Timecapsule) which gives the same symptoms as this problem. Bug report is here: https://bugs.launchpad.net/ubuntu/+s...ux/+bug/406466

Fix is simple, just add the "noserverino" option to the mount command like so:
Code:
//netbiosname/sharename    /media/sharename        cifs    credentials=/root/.smbcredentials,iocharset=utf8,noserverino,gid=1000,uid=1000,nounix,file_mode=0777,dir_mode=0777 0 0
Thanks to Dareus for posting the fix for this problem.

---------####---------

Permissions are always dr-xr-xr-x (read only) no matter how the share is mounted. Please see this Microsoft support document: http://support.microsoft.com/kb/326549/

Thanks to HyugaRicdeau for discovering the fix for that troublesome problem.

---------####---------

No international characters in your share? 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:
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
2008-10-23 > included work-around for Open Office save errors
2008-10-23 > possible workaround for Gedit save errors. testers wanted.
2008-10-27 > added solution for escaping a space in directory name
2008-11-07 > added solutions for Vista problems. added solution for "owned by root" when username is the same on both server and client. changed "after word" title to "Troubleshooting"
2009-01-07 > updated bug workaround for gedit.
2009-02-26 > more verbose reasoning for installing smbfs. added a more current example of /etc/nsswitch.conf. other minor cosmetic changes.
2009-03-26 > included more specific information about fixing gedit bug workaround. moved gedit bug information to the troubleshooting section. Removed all 2007 version history.
2009-04-20 > included updated link for CIFS VFS error; re-organized the troubleshooting section; moved warning about discontinued smbfs to the disclaimers section.
2009-05-11 > included verbose fix for CIFS VFS error.
2009-05-20 > added Jaunty CIFS VFS error fix.
2009-06-04 > included additional Vista information.
2009-06-29 > added links to alternatives to CIFS.
2009-10-30 > included fix for KARMIC bug 406466

==================================

Last edited by dmizer; 3 Weeks Ago at 12:54 PM..
dmizer is offline   Reply With Quote
Old October 31st, 2006   #2
dmizer
The Earth is banana shaped.
 
dmizer's Avatar
 
Join Date: Mar 2006
Location: Kitakyushu Japan
Beans: 7,505
Xubuntu 8.04 Hardy Heron
Re: Mount samba shares with utf8 encoding using cifs

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.

Last edited by dmizer; June 6th, 2008 at 11:15 AM..
dmizer is offline   Reply With Quote
Old November 1st, 2006   #3
ting
5 Cups of Ubuntu
 
Join Date: Dec 2005
Location: sandvika, norway
Beans: 19
Dapper Drake Testing/
Talking Re: Mount samba shares with utf8 encoding using cifs

Great guide, just used it for Xubuntu!

I had a few problems:

1. the first mkdir command didn't work since i dont have a /mount folder.
I changed the command to sudo mkdir /mnt/delings$.

2. in fstab the directions are perhaps a bit confusing.
For me the following command(permanent mount alternative 2);

//server/sharename /media/sharename cifs guest,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

after some testing became:

//pvr/delings$ /mnt/delings$ cifs guest,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

To test that everything mounts correctly you can use the command sudo mount -a

If you get any errors, something did'nt work

This saves you from restarting everytime you correct your fstab.

This is a great way to rectify the fact that xubuntu's network browsing is'nt as easy as in the other versions.

Now i can browse shares with thunar
ting is offline   Reply With Quote
Old November 1st, 2006   #4
dmizer
The Earth is banana shaped.
 
dmizer's Avatar
 
Join Date: Mar 2006
Location: Kitakyushu Japan
Beans: 7,505
Xubuntu 8.04 Hardy Heron
Re: Mount samba shares with utf8 encoding using cifs

Quote:
Originally Posted by ting View Post
Great guide, just used it for Xubuntu!
glad to know you made it work, i was beginning to wonder

Quote:
1. the first mkdir command didn't work since i dont have a /mount folder.
I changed the command to sudo mkdir /mnt/delings$.
gahhh! my bad ... that line should have read /media/share rather than /mount/share. i've updated the howto with this change. can you verify for me that xubuntu has a /media folder?

Quote:
2. in fstab the directions are perhaps a bit confusing.
i've made a few minor changes in wording and format in an effort to make things a bit less muddy.

Quote:
To test that everything mounts correctly you can use the command sudo mount -a
initially, i intentionally left this out ... but there's merit in using it, so i've included it now.

thanks a million for testing this beast out for me!

Last edited by dmizer; November 1st, 2006 at 09:38 AM..
dmizer is offline   Reply With Quote
Old November 2nd, 2006   #5
ting
5 Cups of Ubuntu
 
Join Date: Dec 2005
Location: sandvika, norway
Beans: 19
Dapper Drake Testing/
Talking Re: Mount samba shares with utf8 encoding using cifs

Xubuntu has a media folder, so no problems

I had a little unrelated accident, so I had to reinstall my xubuntu installation.

Anny how the only error I got with sudo mount -a was:

[mntent]: warning: no final newline at the end of /etc/fstab

This happened because while editing with mousepad I didn't press enter after the new line I added.

So if anybody else gets this error you now know the solution

Thanks for the Great guide!
ting is offline   Reply With Quote
Old November 2nd, 2006   #6
dmizer
The Earth is banana shaped.
 
dmizer's Avatar
 
Join Date: Mar 2006
Location: Kitakyushu Japan
Beans: 7,505
Xubuntu 8.04 Hardy Heron
Re: Mount samba shares with utf8 encoding using cifs

Quote:
Originally Posted by ting View Post
[mntent]: warning: no final newline at the end of /etc/fstab

This happened because while editing with mousepad I didn't press enter after the new line I added.
lol ... that won't happen if you use nano like the guide says

thanks for testing again, and glad to know it worked the second time too.
dmizer is offline   Reply With Quote
Old November 3rd, 2006   #7
narky
First Cup of Ubuntu
 
Join Date: Nov 2006
Beans: 6
Ubuntu 6.06 Dapper
Re: Mount samba shares with utf8 encoding using cifs

Hi there dmizer,

Thanks for the guide. I'm looking forward to learning that fstab stuff when I FINALLY get this thing workin'

I'm somewhat of a newb, so please excuse me if i've posted this in the wrong place, or feel free to 'bump' it to the right place.

I'm having some trouble understanding the difference between cifs/nfs/samba/smbfs. Samba to me seems like the linux protocol to talk to windows machines and smbfs/nfs/cifs are a means of doing that, is this correct?

I'm trying to use amarok to play files off a NAS (namely a DS-101j). After a month or so of stuffing around I think my best shot is cifs, I get that impression from this article:
http://amarok.kde.org/wiki/Samba (down the bottom).

So I think i'm in the right place! Also having a read off the amarok forums from people with similar setups, some seem to have better success off cifs than smbfs.

So using your guide when I mount with:
Code:
sudo mount -t cifs //192.168.0.2/music /mnt/music -o username=******,password=******,iocharset=utf8,file_mode=0777,dir_mode=0777
The terminal just goes to it's normal thing and so it looks like it worked. And yet when i navigate to:
/mnt/music
there's nothing in the folder! Any ideas?

When I mount with
Code:
 sudo mount -t smbfs -o username=*****,password=***** //192.168.0.2/music /mnt/music
The files appear in the folder. But if I try and copy large amounts/do an amarok collection scan it invariably crashes and the folder no longer appears as a mount, it feels like the whole mount system has just fallen over, this form of mount seems very ineffecient. The inbuilt nautilus 'connect to server' system seems quite a bit more effective but I still feel like I could get better performance...? As i'm sure your aware a lot of programs can't access the mount through the nautilus interface.

Having read a few of the bug reports for amarok some people claim they scan much larger collections using different hardware so I'm not sure what i'm doing wrong. I really have no idea what else I can try. I've also tried quite a few different GUI network mounting managers and the performance was still lacklustre/useless.

/On a side note, I gather the utf8 thing means it can read weird characters and stuff (hence the japanese fix). But what do -t/-o switches mean? And the "file_mode=0777,dir_mode=0777".

On a previous install of ubuntu I swear when I mounted things in the command prompt they would appear as desktop icons if successful, this doesn't seem to happen anymore and idea why?

My apologies at the length of this post.

Regards,
narky.

Last edited by narky; November 3rd, 2006 at 10:43 PM..
narky is offline   Reply With Quote
Old November 3rd, 2006   #8
dmizer
The Earth is banana shaped.
 
dmizer's Avatar
 
Join Date: Mar 2006
Location: Kitakyushu Japan
Beans: 7,505
Xubuntu 8.04 Hardy Heron
Re: Mount samba shares with utf8 encoding using cifs

first of all, to answer your general questions:
yes, you are exactly correct, samba is the highway, and cifs/smbfs is the vehicle.

nfs is a linux specific protocol used for the same purpose. windows can't use it (that i'm aware of). but if your trying to talk from a linux machine to a linux file server, then nfs is the way to go.

nfs and samba are simply two different ways of transferring files across a network. there are many others ... scp, ftp ... all with varying positive and negative aspects.

to address your problem, did you install smbfs?
Code:
sudo aptitude install smbfs
if so, try this as well:
Code:
sudo aptitude install samba
and then give that line another try. it should work.

you don't get any errors or anything do you?

also, icons appear on the desktop if you mount in the /media folder, i don't think they will appear on the desktop if you mount from the /mnt folder. i really don't know about that for sure though ... i DO know that you WILL get a link on the desktop if you mount in the /media folder.

Last edited by dmizer; November 3rd, 2006 at 11:04 PM..
dmizer is offline   Reply With Quote
Old November 3rd, 2006   #9
narky
First Cup of Ubuntu
 
Join Date: Nov 2006
Beans: 6
Ubuntu 6.06 Dapper
Re: Mount samba shares with utf8 encoding using cifs

dmizer,

Thanks for your reply. It's amazing how much (and random reading) i've done on such simple answers. I really do appreciate you answering ALL my questions. I'm having a very painful (and somewhat masochistically enoyable!) conversion to ubuntu. Anyway, sadly i had already installed the samba and smbfs... Just to confirm I tried it anyway:
Code:
sudo aptitude install smbfs
Password:
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
narky@narky-laptop:~$ sudo aptitude install samba
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
To answer your question;
No, I do not get any errors on the aforementioned mount methods.
(What's the markup for 'quote' can't find it.)
A few days ago I was but that was because I hadn't installed samba!

One thing I noticed on reading the other ubuntu forum threads is that some people seemed to think different versions of samba could cause issue with cifs, could this be my problem?

What are the differences between smbfs and cifs? What protocol/pathway does nautilus mount stuff with?

So am I to understand you think my file server Synology DS-101j is linux based? (And hence, should be interfaced with using 'nfs') I've always thought it was linux based but never been sure. Assuming this is the case, how do I mount something using nfs rather than samba?

Cheers,
Chris


Ps.
So, I'm reading this guide:
HOWTO: NFS Server/Client (http://www.ubuntuforums.org/showthread.php?t=249889)

Do I have to that stuff:
"sudo apt-get install portmap nfs-common"
and
"sudo mount server.mydomain.com:/files /files"
-The trouble with above line is I don't think ubuntu will be able to resolve the dns name of my NAS...? Will it? What was that WINS stuff actually for in your howto? So if you do mount with out any switches does it assume to use 'nfs'?

Last edited by narky; November 3rd, 2006 at 11:34 PM..
narky is offline   Reply With Quote
Old November 4th, 2006   #10
dmizer
The Earth is banana shaped.
 
dmizer's Avatar
 
Join Date: Mar 2006
Location: Kitakyushu Japan
Beans: 7,505
Xubuntu 8.04 Hardy Heron
Re: Mount samba shares with utf8 encoding using cifs

okay ... let's hope that the 4th times' to charm here. the touchpad driver keeps browsing backwards when i touch it

anyway [quote] is your quote markup. bet you'll kick yourself for not figuring that out.

according to your hardware specs, you're not going to be able to use nfs. but cifs is supported, so there shouldn't be a problem with that. but i assume you have this connected and transferring files with no problems to a windows client? if so, did you have to install software or drivers to make it work?

i don't know of any problems with the current version of cifs working with window servers (it's important to note here that windows does not use samba, linux uses samba to emulate windows file sharing). there are sometimes problems when connecting to older linx samba servers with cifs, but if you have dapper, you'll not have this issue.

how about firewall protection. you must have a router in place, so it's something worth checking.

really, i'm grasping at straws here because i've never worked with nas units except for in windows clients, but from what i have experienced, you should be connecting with no problems.

differences between samba and nfs is that nfs is built on an open sourced file sharing structure. so it works fast on linux with very little configuration. samba on the other hand is a linux version of window's proprietary netbios file sharing. as such, it's a backwards engineered system that works tolerably only because people have been hacking at it for so long.

since nfs is a completely different functionality for mounting shared files, the command in fstab and in the cli is completely different. so no, if you just use "mount" it does not assume nfs.

the wins stuff at the beginning is designed to allow your ubuntu computer to resolve netbios names, so you will be able to mount your nas by name rather than ip.

do me a favor and post the output of
Code:
smbtree
i think you will be able to get more specific answers to many of your questions by using the man command. for example:
Code:
man mount.cifs
man mount
it'll give you a better idea of what opitons are available to you for mounting your share.

Last edited by dmizer; November 4th, 2006 at 01:40 AM..
dmizer is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:52 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry