View Full Version : Mount samba shares with utf8 encoding using cifs
dmizer
May 6th, 2007, 06:23 PM
fantastic! glad to hear you got it working.
as far as security goes. obviously the problem here is that anyone who can connect to your network (wireless?) could potentially connect to your nfs shares. however, keep in mind of course that windows computers won't be able to connect to nfs shares.
and frankly ... i use the same nfs configuration for my network shares.
latle
May 6th, 2007, 07:13 PM
fantastic! glad to hear you got it working.
as far as security goes. obviously the problem here is that anyone who can connect to your network (wireless?) could potentially connect to your nfs shares. however, keep in mind of course that windows computers won't be able to connect to nfs shares.
and frankly ... i use the same nfs configuration for my network shares.
Good to hear! :-) And once again, thanks a lot!
trixon
May 12th, 2007, 06:23 AM
I'm using Kubuntu 7.04 connected to a WesternDigital MyBook World Edition NAS.
It mounts, but I get problems with writing to the NAS.
If I do a smbfs mount, I get full access, but it is too slow to use.
fstab line:
\\192.168.0.99\public /media/pub cifs credentials=/etc/fstab_smb_credentials_1,iocharset=utf8,file_mode=0 777,dir_mode=0777,uid=1000,gid=1000 0 0
I get rw-access to files and directories in the root (not user root) /media/pub, but not to the subobjects.
For /media/pub:
drwxrwxr-x 8 root www-data 0 2007-05-12 11:29 pub
And for ALL subobjects to /media/pub
drwxr-xr-x 7 www-data www-data 0 2007-05-05 11:29 music
I have added myself to the group www-data, but that only gave me rw to the first level of /media/pub.
I've tried some chmod and chowns, as sudo, but the result is things like this:
chown: changing ownership of `music': Permission denied
Anyone?
v4ebp
May 12th, 2007, 08:59 AM
thank you all, great guide.
Works for me except for the following error messae:
[18.312000] CIFS VFS: Server not responding
[18.312000] No response for cmd 5 mid 8
displayed at the end of shutdown process. Hangs around on screen for several seconds befor switch off.
Any ideas what is causing it and how to get rid of it?
dmizer
May 13th, 2007, 08:48 PM
I'm using Kubuntu 7.04 connected to a WesternDigital MyBook World Edition NAS.
It mounts, but I get problems with writing to the NAS.
If I do a smbfs mount, I get full access, but it is too slow to use.
fstab line:
\\192.168.0.99\public /media/pub cifs credentials=/etc/fstab_smb_credentials_1,iocharset=utf8,file_mode=0 777,dir_mode=0777,uid=1000,gid=1000 0 0
I get rw-access to files and directories in the root (not user root) /media/pub, but not to the subobjects.
For /media/pub:
drwxrwxr-x 8 root www-data 0 2007-05-12 11:29 pub
And for ALL subobjects to /media/pub
drwxr-xr-x 7 www-data www-data 0 2007-05-05 11:29 music
I have added myself to the group www-data, but that only gave me rw to the first level of /media/pub.
I've tried some chmod and chowns, as sudo, but the result is things like this:
chown: changing ownership of `music': Permission denied
Anyone?
i'm afraid i found zero information on your nas device. i did find lots of information with people having folder permission problems in windows. also, your device doesn't work with mac, and it doesn't work in vista yet.
was the www-data folder created with mionet? if so, you may not be able to get access to it under cifs.
thank you all, great guide.
Works for me except for the following error messae:
[18.312000] CIFS VFS: Server not responding
[18.312000] No response for cmd 5 mid 8
displayed at the end of shutdown process. Hangs around on screen for several seconds befor switch off.
Any ideas what is causing it and how to get rid of it?
i'm still working on this one. i'll post again if i come up with an answer for you.
trixon
May 14th, 2007, 01:36 AM
was the www-data folder created with mionet? if so, you may not be able to get access to it under cifs.
www-data is not a folder on my nas, it is a auto created group and a user on my kubuntu system.
I do not use mionet.
phazon.
May 14th, 2007, 06:42 PM
thank you all, great guide.
Works for me except for the following error messae:
[18.312000] CIFS VFS: Server not responding
[18.312000] No response for cmd 5 mid 8
displayed at the end of shutdown process. Hangs around on screen for several seconds befor switch off.
Any ideas what is causing it and how to get rid of it?
Me too, but hangs around for more than a few seconds for me. Would love to know what's causing it.
dmizer
May 14th, 2007, 06:44 PM
are either of you using vmware?
phazon.
May 15th, 2007, 06:02 AM
I did have it installed, but not anymore. I reinstalled 7.04 over my '/' partition, leaving my '/home' untouched - could be there's some remnants of vmware hanging around?
dmizer
May 15th, 2007, 09:09 PM
www-data is not a folder on my nas, it is a auto created group and a user on my kubuntu system.
I do not use mionet.
i'm really sorry to say ... but nas devices have been particularly troublesome. from experience in this thread, i'd say that probably about 50% work with no trouble. probably 15-20% will work with a firmware upgrade, and the rest are hopeless. from what i've been reading about your device, i'd place it squarely in the latter category.
you should probably keep your eye open for a firmware update which will likely be released soon so the device can work with vista. beyond that i'm sincerely sorry to report that i have nothing else to offer you.
vk4ebp
May 16th, 2007, 03:14 AM
Thank you for your question Dmizer re VMware. I believe I don't have it, the only closest thing to virtual OS is my Wine install.
dmizer
May 17th, 2007, 06:34 PM
vk4ebp ... gm es hello.
i finally had this happen to my test machine the other night. the only thing different was that i disconnected the lan cable before i shut the machine down. i'll do some more testing if i have time today.
73 sk ee
vk4ebp
May 19th, 2007, 08:51 PM
dmizer, re the shutdown error:
My LAN cables remain connected to all three Kubu machines when I get the error. When not connected, the Samba share naturally does not mount and there is no errors on shutdown.
mni tnx es 73 de vk4ebp tu e e
:)
dmizer
May 19th, 2007, 09:18 PM
okay ... i'm still coming up empty for this one. this is a bug. anyone experiencing this issue, please post a bug https://bugs.launchpad.net/ and link it to this thread please.
vk4ebp
May 20th, 2007, 03:43 AM
dmizer, guess what....
I have changed the distro on one of my machines from kubuntu to ubuntu and the bug dossappeared. This may sound like a silly question from a newb, but is it possible that system with KDE handles network differently to Gnome? (btw the reason for change was an unrelated display problem with an ATI card).
dmizer
May 20th, 2007, 07:25 AM
i had it happen at least once in xubuntu, but as stated before ... it was a result of having the network cable disconnected. though xubuntu does carry some of the kde libs so it's still possible. i'll test directly to kde (i don't normally use it) tomorrow. thanks for the tip though.
everyone else experiencing this bug using kde?
Clay_Banger
May 22nd, 2007, 11:04 PM
just wanna say thanks for the great how to! worked great for me! (kubuntu 7.04)
galileux
May 24th, 2007, 07:46 AM
Hi Dmizer
I followed your tutorial but I am getting two problems:
1) I configured three samba shares, but I only get one on the client desktop.
2) Even with the one that appears, I have permission problems and cannot read the files within.
I am posting below the contents of my client's fstab and the smb.conf from the server.
What do you think I'm doing wrong?
Thanks!
Here is the current FSTAB on the client (Ubuntu Feisty with Nautilus)
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=081bcdf6-c016-4453-8348-5e87f529aa80 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda5
UUID=681fff98-ab4e-40c3-ae39-4b91eaca97cb none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
# Added for supporting USB in virtual machines
# (http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=3862823)
usbfs /proc/bus/usb usbfs auto 0 0
# Added to mount samba shares
# http://ubuntuforums.org/showthread.php?t=288534
//callisto/hda1 /media/hda1 cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
//callisto/hdb1 /media/hdb1 cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
//callisto/hdc1 /media/hdc1 cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
This is the current SMB.CONF on the server (Ubuntu edgy-server)
#
# Configuration file for the Samba suite from http://www.howtoforge.com/samba_setup_ubuntu_5.10_p4.
#
#
#
[global]
workgroup = CIUSSIGROUP
netbios name = callisto
server string = %h
# added to try to fix slow transfers
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
passdb backend = tdbsam
security = user
username map = /etc/samba/smbusers
name resolve order = wins bcast hosts
domain logons = yes
preferred master = yes
wins support = yes
# Set CUPS for printing
printcap name = CUPS
printing = CUPS
# Default logon
logon drive = X:
# logon script = scripts/logon.bat
logon path = \\server1\profile\%U
# Useradd scripts
add user script = /usr/sbin/useradd -m %u
delete user script = /usr/sbin/userdel -r %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/sbin/usermod -G %g %u
add machine script = /usr/sbin/useradd -s /bin/false/ -d /var/lib/nobody %u
idmap uid = 15000-20000
idmap gid = 15000-20000
# sync smb passwords with linux passwords
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
passwd chat debug = yes
unix password sync = yes
# set the loglevel
log level = 3
[homes]
comment = Home
valid users = %S
read only = no
browsable = no
[printers]
comment = All Printers
path = /var/spool/samba
printable = yes
guest ok = yes
browsable = no
[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
admin users = Administrator
valid users = %U
read only = no
[profile]
comment = User profiles
path = /home/samba/profiles
valid users = %U
create mode = 0600
directory mode = 0700
writable = yes
browsable = no
[hda1]
comment = hda1
path = /home/shares/hda1
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes
[hdb1]
comment = hdb1
path = /home/shares/hdb1
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes
[hdc1]
comment = hdc1
path = /home/shares/hdc1
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes
[USB]
comment = USB
path = /mnt/USB
valid users = @users
write list = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes
dmizer
May 24th, 2007, 08:20 AM
okay ... let's see if we can get some more information.
i don't know which share shows on the desktop and which doesn't ... but replace the following with one of the shares which do not display on your desktop (assuming i've guessed incorrectly).
please post the output of the following:
sudo umount /media/hda1
sudo mount -t cifs //callisto/hda1 /media/hda1 --verbose -o credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
galileux
May 24th, 2007, 10:32 AM
Hi dmizer ant thanks for your quick reply!
Sorry for the omitted info:
the share that mounts but cannot be browsed is hda1
The shares that do not mount at all are hdb1 and hdc1
Here are the outputs:
For hda1:
sudo mount -t cifs //callisto/hda1 /media/hda1 --verbose -o credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
parsing options: rw,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
mount.cifs kernel mount options unc=//callisto\hda1,ip=192.168.1.102,user=USER,pass=PASS ,ver=1,rw,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
mount error 11 = Resource temporarily unavailable
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
For hdb1:
sudo mount -t cifs //callisto/hdb1 /media/hdb1 --verbose -o credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
parsing options: rw,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
mount.cifs kernel mount options unc=//callisto\hdb1,ip=192.168.1.102,user=USER,pass=PASS ,ver=1,rw,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
Thanks for helping!
galileux
May 24th, 2007, 10:39 AM
Hi again dmizer
Thought you may need to have a look at callisto's (the server) fstab too...
Here it is:
UUID=8e31cb81-ccce-40ef-82e0-f217d6114ff1 / ext3 defaults,errors=remount-ro 0 1
/dev/hdb1 /home/shares/hdb1 ext3 defaults 0 1
/dev/hdc1 /home/shares/hdc1 ext3 defaults 0 1
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
proc /proc proc defaults 0 0
UUID=54b6497f-63e2-42e2-aba1-25ca76db3819 none swap sw 0 0
galileux
May 25th, 2007, 01:37 PM
Here's the SMBTREE output...
CIUSSIGROUP
\\XP07CLONE XP_07_CLONE
cli_start_connection: failed to connect to XP07CLONE<20> (0.0.0.0)
\\GANYMEDE
cli_start_connection: failed to connect to GANYMEDE<20> (0.0.0.0)
\\EUROPA europa server (Samba, Ubuntu)
\\EUROPA\IPC$ IPC Service (europa server (Samba, Ubuntu))
\\EUROPA\SHARED
\\EUROPA\print$ Printer Drivers
\\CALLISTO callisto
\\CALLISTO\ruggero Home
\\CALLISTO\ADMIN$ IPC Service (callisto)
\\CALLISTO\IPC$ IPC Service (callisto)
\\CALLISTO\USB USB
\\CALLISTO\hdc1 hdc1
\\CALLISTO\hdb1 hdb1
\\CALLISTO\hda1 hda1
\\CALLISTO\netlogon Network Logon Service
noMScraig
May 30th, 2007, 01:08 PM
Another low-tech answer to my problem...meaning no editing configs etc.
I tried konquerer to view my network shares and still could not get the shares to work.
I finally loaded smb4k and now I can access my windows shares
I had to configure smb4k to mount the windows shares as a super user (sudo) but now I can view through conqueror.
Anyway, that's how I got it to work.
the following is my samba conf
Now with the minimum conf I have a share with no users but I have a hardware firewall. Eventually I will work on users but off to get cups working now.
[global]
workgroup = @home
security = share
wins support = yes
# CUPS printing. See also the cupsaddsmb( manpage in the
# cupsys-client package.
; printing = cups
; printcap name = cups
[Share]
path = /home/craig/Desktop/Share
available = yes
browsable = yes
public = yes
writable = yes
[Movies and Pictures]
path = /media/NETHDD_/Movies and Pictures
available = yes
browsable = yes
public = yes
writable = yes
dmizer
May 30th, 2007, 05:33 PM
noMScraig: this howto focusses on a CLI answer so as to answer the problems faced by all ubuntu systems (including those without a gui installed)
also, if you try to save a document to your samba shares from open office ... can you save directly to your share when mounting by smb4k? this is usually the biggest limitation of a gui mounting method.
finally, if your server is linux, and you are trying to access those shares from another linux box, you should use nfs instead of samba.
either way though, glad you got it working to your satisfaction.
likwid
May 31st, 2007, 05:48 AM
Thanks dmizer for howto, it's really helpful.
thank you all, great guide.
Works for me except for the following error messae:
[18.312000] CIFS VFS: Server not responding
[18.312000] No response for cmd 5 mid 8
displayed at the end of shutdown process. Hangs around on screen for several seconds befor switch off.
Any ideas what is causing it and how to get rid of it?
I'm having this same problem after a new installation.
dmizer
May 31st, 2007, 06:03 AM
those of you with the "server not responding" problem on shutdown, are you using the fstab solution or the command line solution?
likwid
May 31st, 2007, 03:19 PM
I'm using fstab
Grexe
June 6th, 2007, 01:43 PM
also experienced the shutdown-problem "occasionally", using fstab, on both Edgy and Feisty, both x86 and PPC, with KDE 3.5.6 - not anymore on 3.5.7 it seems until now.
On a sidenote, I am currently struggling with a "Permission denied"-problem on a new share although all other shares are configured the same way and work fine (?!):
Cannot even "touch" a file as superuser (?!).
Here is my fstab (I tried both "gid=100" (for users-group access) and "1000" to no avail):
//jagor/grexdox /media/grexdox cifs exec,credentials=/home/grexe/.smbcredentials,iocharset=utf8,uid=1000,gid=1000 0 0
//jagor/backup /media/backup cifs credentials=/home/grexe/.smbcredentials,iocharset=utf8,uid=1000,gid=100 0 0
Currently I am stuck and would consider nfs if there were only Linux-clients in my network... (is it much overhead to run a NFS-server alongside Samba?)
Grexe
June 6th, 2007, 01:57 PM
Solved - maybe worth a hint in the FAQ...:
I did not have write access to the directory on the server... I saw this before but did not look further as the other shares' directories had the same (root) user and group, only with the difference that the shares I use in the end lie in directories one level beneath, with correct user and group privileges... confusing;)
dmizer
June 6th, 2007, 08:18 PM
thank you all, great guide.
Works for me except for the following error message:
[18.312000] CIFS VFS: Server not responding
[18.312000] No response for cmd 5 mid 8
displayed at the end of shutdown process. Hangs around on screen for several seconds befor switch off.
Any ideas what is causing it and how to get rid of it?
those of you with the above error on shutdown, please test with the the "users" option. please only test this option if you have configured fstab to mount your share.
//netbiosname/sharename /media/sharename cifs credentials=/root/.smbcredentials,users,iocharset=utf8,file_mode=077 7,dir_mode=0777 0 0
likwid
June 9th, 2007, 04:45 AM
That didn't help i'm afraid. The only apparent difference was that my drives were also mounted in /media.
dmizer
June 10th, 2007, 02:17 AM
just ran across this today. http://ubuntuforums.org/showthread.php?t=293513 it appears to contain a fix for the cifs vfs: server not responding issue.
anyone willing to test and report back, and i'll slap it up on the first post. :)
blankko
June 12th, 2007, 01:07 AM
Thanks dmizer for the guide.
While everything went fine for me, copying files from ubuntu to samba shares changed and updated the 'date modified' for the files.
Is there a way to preserved the original 'date modified' value of the files that are being written to samba shares?
dmizer
June 12th, 2007, 01:37 AM
not sure exactly what you're asking for here ... every time there is a write, the date modified should be updated. in this case, the modification was that the location changed. this is the same in both windows and linux.
likwid
June 17th, 2007, 06:02 AM
My problem with :
CIFS VFS: Server not responding
seems to have gone away. Not sure how. Worth mentioning, i installed debian etch amd it originally exhibited the same problems, so it seems definitely to be server side.
Thanks again for great guide. Whenever/wherever i'm installing linux i always google "difficult time cifs samba" to find your guide.
dmizer
June 17th, 2007, 06:11 AM
glad you find it so useful. my biggest problem was that for a while, this thread was the only thing returning recent google results on that error ... lol.
motoperpetuo
June 27th, 2007, 11:00 AM
When I run 'sudo mount -a' I get this error:
mount: unknown filesystem type ' '
Anyone know what that could mean?
robyoko
July 11th, 2007, 09:40 AM
Have 2 laptops at home, one 32 bits, one 64 bits. Both run Ubuntu 7.04 both have exactly the same fstab. One mounts the remote share no problem to /media/network (which the user XXX owns). When user XXX wants to write something to the disk there is no problem.
On the 64 bit PC the share mounts no problem either. /media/network is owned by user XXX. When the user tries to save a file to the share (from example open office), it gives a general io error. When the user drags something from his homedirectory to the share it is copied but is automatically locked. Looking at the permissions says that owner of the copied file is root. What gives? How to solve?
Thanks!
gmoney
July 23rd, 2007, 09:50 PM
DMIZER,
Thanks a lot for the good howto. It helped me out with a problem I was experiencing under Openoffice. I kept on getting an error message stating:
** Protocol "smb" is supported only partially. Local copy of the file will be created. **
This howto worked for me! I've also noticed quite a few other people having that same error message when connecting to a SMB server while running open office under kubuntu feisty. Thus, I have posted a link to your howto over at the openoffice bugtracker.
Here's the url
https://bugs.launchpad.net/openoffice/+bug/15451
Thanks again!
dmizer
July 24th, 2007, 06:59 AM
Have 2 laptops at home, one 32 bits, one 64 bits. Both run Ubuntu 7.04 both have exactly the same fstab. One mounts the remote share no problem to /media/network (which the user XXX owns). When user XXX wants to write something to the disk there is no problem.
On the 64 bit PC the share mounts no problem either. /media/network is owned by user XXX. When the user tries to save a file to the share (from example open office), it gives a general io error. When the user drags something from his homedirectory to the share it is copied but is automatically locked. Looking at the permissions says that owner of the copied file is root. What gives? How to solve?
Thanks!
sorry for the delay in reply ... i've been busy with a big move.
the server you are trying to connect to from the 64 bit machine ... is it linux or windows? also, is it a NAS device?
trixon
July 24th, 2007, 09:01 AM
FYI
I wrote the post at the end a while back, and today a solved the problem.
I added the noperm option to my mount line, good or not, now it works.
Excerpt from man mount.cifs:
noperm
Client does not do permission checks. This can expose files on this
mount to access by other users on the local client system. It is
typically only needed when the server supports the CIFS Unix Exten‐
sions but the UIDs/GIDs on the client and server system do not match
closely enough to allow access by the user doing the mount. Note
that this does not affect the normal ACL check on the target machine
done by the server software (of the server ACL against the user name
provided at mount time).
I'm using Kubuntu 7.04 connected to a WesternDigital MyBook World Edition NAS.
It mounts, but I get problems with writing to the NAS.
If I do a smbfs mount, I get full access, but it is too slow to use.
fstab line:
\\192.168.0.99\public /media/pub cifs credentials=/etc/fstab_smb_credentials_1,iocharset=utf8,file_mode=0 777,dir_mode=0777,uid=1000,gid=1000 0 0
I get rw-access to files and directories in the root (not user root) /media/pub, but not to the subobjects.
For /media/pub:
drwxrwxr-x 8 root www-data 0 2007-05-12 11:29 pub
And for ALL subobjects to /media/pub
drwxr-xr-x 7 www-data www-data 0 2007-05-05 11:29 music
I have added myself to the group www-data, but that only gave me rw to the first level of /media/pub.
I've tried some chmod and chowns, as sudo, but the result is things like this:
chown: changing ownership of `music': Permission denied
Anyone?
stueyboy
August 12th, 2007, 01:43 PM
Thanks for this guide. It has proved to be a much better way for me to access my linkstation pro without any nasty timeouts. Great
Thanks
BoneZZZ
August 29th, 2007, 08:16 PM
I am trying to migrate from smbfs to cifs so I followed the instructions changing in fstab, this line:
//netbiosname/share /mnt/dir smbfs auto,user,owner,guest 0 0
to this line:
//netbiosname/share /mnt/dir cifs guest,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
I had a wrong IP resolution message, so the first thing I had to add is an ip= option in the cifs line (or add an entry in hosts file).
Then I got a "mount error 20: not a directory" and this is a wall ](*,)
Any idea?
dmizer
August 29th, 2007, 09:31 PM
please post the EXACT fstab line with your actual netbios name and share name, as well as your actual mount directory path.
also post the output of:
smbtree
thisispeace
August 30th, 2007, 12:09 AM
I have a fun little problem.
The share mounts automatically, but the owner is "500", not root. I can't edit permissions or access the drive. Where did I go wrong?
dmizer
August 30th, 2007, 12:31 AM
the samba server you're trying to connect to ... is it a windows server, or a linux samba server?
are you able to access the same share from another computer (linux or windows)?
BoneZZZ
August 30th, 2007, 05:48 PM
fstab:
//NAS-300GB/DATOS /media/NAS cifs user,guest,ip=192.168.1.9,iocharset=utf8,file_mode =0777,dir_mode=0777 0 0
smbtree:
TRAUMA
\\PORTATIL-JOSE portatil-jose server (Samba, Ubuntu)
\\PORTATIL-JOSE\IPC$ IPC Service (portatil-jose server (Samba, Ubuntu))
\\PORTATIL-JOSE\print$ Printer Drivers
\\NAS-300GB
\\NAS-300GB\IPC$
\\NAS-300GB\DATOS
\\NAS-300GB\MEDIA
\\NAS-300GB\PUBLIC
NAS-300GB is a Conceptronic CHD3LAN. No permissions stablished in it. Firmware upgraded to NAS-BASIC47 ...and still ](*,)
dmizer
August 30th, 2007, 06:52 PM
try this:
//192.168.1.9/DATOS /media/NAS cifs user,guest,iocharset=utf8,file_mode =0777,dir_mode=0777 0 0
BoneZZZ
August 31st, 2007, 04:06 PM
Mount error 20 = not a directory
](*,)](*,)
PS: Ubuntu 7.04
dmizer
August 31st, 2007, 08:05 PM
post the output of this command:
sudo mount -t cifs //192.168.1.9/DATOS /media/NAS --verbose -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77
also, do you have iptables (firewall) configured via a gui of some kind like firestarter or shorewall?
BoneZZZ
September 1st, 2007, 11:45 AM
parsing options: rw,guest,iocharset=utf8,file_mode=0777,dir_mode=07 77
mount.cifs kernel mount options unc=//192.168.1.9\DATOS,ip=192.168.1.9,user=root,ver=1,r w,iocharset=utf8,file_mode=0777,dir_mode=0777
mount error 20 = Not a directory
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
No firewall. The share is accesible through smbfs in Ubuntu box and through Netbios from XP box, but I have problems with accents so I am trying cifs. Iocharset and codepage in smbs don't change anything.
Join the club ... ](*,)](*,)](*,) ... another kick in the wall!!!
dmizer
September 1st, 2007, 11:53 AM
wait a second ...
what is the output of:
ls /media
BoneZZZ
September 1st, 2007, 07:22 PM
jose@portatil-jose:~$ ls /media
NAS WinXP
jose@portatil-jose:~$
I have two folders, NAS for the share in CHD3LAN an WinXP for a NTFS partition in the local drive.
vanaltj
September 5th, 2007, 12:34 AM
been trying to use these instructions to mount drive attached to Airport Extreme base station. I can connect as CIFS from my windows xp machine, connect using Airport Disk Utility from my mac mini, but in ubuntu having troubles. i am not a linux guru to say the least. i can usually follow and sometimes-often understand instructions but cannot effectively troubleshoot error messages like this:
***EDITED FOR PRIVACY***
user@ubuntu:~$ sudo mount -a
mount: wrong fs type, bad option, bad superblock on //192.restofip/sharename,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
user@ubuntu:~$ dmesg | tail
[ 64.191206] Bluetooth: L2CAP ver 2.8
[ 64.191214] Bluetooth: L2CAP socket layer initialized
[ 64.518288] Bluetooth: RFCOMM socket layer initialized
[ 64.518316] Bluetooth: RFCOMM TTY layer initialized
[ 64.518319] Bluetooth: RFCOMM ver 1.8
[ 73.498892] eth0: no IPv6 routers present
[ 387.016651] CIFS VFS: No username specified
[ 387.016702] CIFS VFS: cifs_mount failed w/return code = -22
[ 684.666692] CIFS VFS: No username specified
[ 684.666710] CIFS VFS: cifs_mount failed w/return code = -22
***END***
It seems like when trying to mount it is not properly getting the creds from /root/.smbcredentials
Or is this possibly a hiccup related to it being a somewhat NAS-like hardware? Any ideas?
dmizer
September 5th, 2007, 01:06 AM
no reason to mask your local ip (192.168.x.x) as it doesn't reveal anything private.
please post your entire mount line in your fstab. also, did you create your .smbcredentials file with a gui editor?
vanaltj
September 5th, 2007, 09:25 PM
aye, sometimes i be a little overzealous in my privacy effort. *shrug*...
Here is the line in fstab:
//192.168.1.100/sharename /media/sharename cifs credentials=/root/.smbcredentidentials,iocharset=utf8,file_mode=0777 ,dir_mode=0777 0 0
No gui editor touched this file, did nano from terminal. Appreciate any suggestions!
vanaltj
September 5th, 2007, 09:26 PM
whoops, lets try that again. here is the actual line in fstab:
//192.168.1.100/sharename /media/sharename cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
dmizer
September 5th, 2007, 10:03 PM
whoops, lets try that again. here is the actual line in fstab:
//192.168.1.100/sharename /media/sharename cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
in the file, are there any spaces in the username or password ... also any spaces before and/or after the equal sign? there cannot be spaces in this file.
if there are no spaces, try mounting manually with this line:
sudo mount -t cifs //192.168.1.100/sharename /media/sharename -o username=basestationusername,password=basestationp assword,iocharset=utf8,file_mode=0777,dir_mode=077 7
BoneZZZ
September 6th, 2007, 05:33 PM
Any idea for my problem?
The "wallknocker"
](*,)](*,)](*,)](*,)
BoneZZZ
September 8th, 2007, 06:56 AM
More clues:
I have an XP box in my net. I have shared a folder in the XP box and have changed the fstab line with the ip and name of the shareinXP. Everything works perfect.
I think the problem is in the Samba version of the CHD3LAN device. No support for Unicode?
vanaltj
September 8th, 2007, 10:16 AM
Sorry to be so long in reply. I tried mount from command line using the command provided above, and it works - partially. The mount appears on the desktop, but I went to open it up and it took a LONG time (several hours), now Nautilus has the drive open BUT it does not behave correctly. All of the contents of the drive (the files and folders at the root of the drive) appear but as zero byte generic file icons (folders do not appear as folders, files do not appear as filetype specific icons). And none of them respond, I cannot further open the files or folders. So close and yet so far! Any more suggestions?
dmizer
September 12th, 2007, 11:00 PM
I think the problem is in the Samba version of the CHD3LAN device. No support for Unicode?
no ... more likely the chd3lan device is not compatible with cifs. you may be successful in looking for a firmware update.
BoneZZZ
September 14th, 2007, 11:08 AM
Yes. I'm waiting from response from the firmware programmer. I use the last version publised. As it works fine with M$, don't expect many help :cry:
PsycoGeek
September 27th, 2007, 11:03 PM
OK, I need help with this one now. Forgive me if it was covered elsewhere, but I didn't see it.
Here goes... So far I am able to connect to my server (a win2k box), and mount the shares OK. I have even implimented the umount fix from the other thread and that is working OK. However, I am using a laptop and connecting via WiFi, and have to "sudo mount -a" every time I boot the system. Any way around this?
dmizer
September 28th, 2007, 12:00 AM
do you need to log into your user account before you can connect to your wifi network?
if that's the case, i'm not too sure what to tell you. i can try looking for a fix, but it may not be forthcoming. it might also be useful to know what client you're using to connect to your network, as well as what version of ubuntu you're using.
depending on what you use to connect to your wireless network, there may be a smiple fix, or there may be a very complicated fix.
PsycoGeek
September 28th, 2007, 12:24 AM
do you need to log into your user account before you can connect to your wifi network?
Not sure I follow you on this one, but I think so.
Ubuntu 7.04, Wicd network manager.
BTW, great thread and How-To. I was up and running in no time with CIFS. This is how a How-To should be done, with the latest information posted in the beginning of the thread so you don't have to hunt through 30 pages to find the best info.
dmizer
September 28th, 2007, 08:42 PM
Not sure I follow you on this one, but I think so.
okay, this won't fix your problem but it will tell us when your network becomes active.
reboot your computer, but do not log in. hit the <ctrl>+<alt>+<F2> keys. this should bring you to a command line log in. log in.
then try to ping google:
ping www.google.com
if you can ping google, then it's an easy fix, if not, it's a difficult fix.
you can return to your graphical login by entering the following command:
sudo /etc/init.d/gdm restart
PsycoGeek
September 28th, 2007, 09:43 PM
OK dmizer, I tried ctrl-alt-f2 and logged into the command line prompt. I was able to ping google! Where do we go from here?
Again, thanks, and not just for me. This thread is fantastic, and you are very helpful.
dmizer
September 28th, 2007, 09:47 PM
no problem at all.
as root (sudo) edit the file /etc/rc.local
and add the line:
mount -a
just before the line that says "exit 0"
save the file, and your share should mount on reboot.
PsycoGeek
September 28th, 2007, 10:25 PM
Did not work dmizer.
dmizer
September 29th, 2007, 01:22 AM
Did not work dmizer.
sorry, i couldn't come up with a solution quickly. in the mean time, you may want to do some searching on automount.
i think it's wicd that's messing up the works.
PsycoGeek
September 29th, 2007, 12:00 PM
That's OK dmizer. I can still type mount -a whenever I boot the thing (like once a day), so it isn't a real urgent issue.
Do you recommend using the Ubuntu manager instead? I may give that a try anyway. What do I have to install from Synaptic to get the Ubuntu Network Manager back? Can't remember right now.
PsycoGeek
September 29th, 2007, 04:38 PM
dmizer, I found the network manager and installed it. As soon as I configured the wireless connection my two shares popped up on the desktop! Looks like it WAS Wicd that was messing with the shares.
Thank you for all your help!
-edit- The network manager is a bit funky. Had to enable roaming mode on both wired and wireless. After the first reboot, no share connections.
-edit, part deux- seems to be working on reboots now.
dmizer
September 29th, 2007, 08:47 PM
great to hear. glad you got it working.
AgentZ86
October 9th, 2007, 03:59 PM
Uhhhh What ?
Which button do I click again ? LOL
Sorry thats a bit too much information for me.
I have the desktop folder created using a clickety method of browsing thru the network and opening the folder I wish to make a shortcut to. Then I use the menu at the top to create a connect to server file on the desktop, and select connect permanantly.
So it's working fine, but the make link did not appear to allow it.
Anyhow thanks for the response If I run into a problem I'll try the konsole method etc.
Thanks:)
ghcaine
October 10th, 2007, 10:07 AM
Ok, dumb question here.
There are 2 shares on my windows box that are shared.
I use the same credentials to access them.
public = works great.
backup = "Permission denied"
For the record, I have tried using the same credentials file and got the same results. Is it not possible to open two shares from the same machine? Now that'd be odd...
//myservername/public /media/public cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
//myservername/backup /media/backup cifs credentials=/root/.mycredentials,iocharset=utf8,file_mode=0777,dir_m ode=0777 0 0
dmizer
October 10th, 2007, 10:17 AM
interesting, what's the output of:
smbtree
PsycoGeek
October 10th, 2007, 10:56 AM
Ok, dumb question here.
There are 2 shares on my windows box that are shared.
I use the same credentials to access them.
public = works great.
backup = "Permission denied"
For the record, I have tried using the same credentials file and got the same results. Is it not possible to open two shares from the same machine? Now that'd be odd...
//myservername/public /media/public cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
//myservername/backup /media/backup cifs credentials=/root/.mycredentials,iocharset=utf8,file_mode=0777,dir_m ode=0777 0 0
You definitely need to check the permissions on the shares themselves.
I have recently had one heck of a problem with my win2K server and the shared folders on it (accessing it from my new laptop). I have two major shares on the server (music and shares). I had to go into each and grant access to the laptop user account on not only the root share (music and shares), but on each folder directly under each share. It was a real pain in the booty, but it worked. If you need more help on doing that just let me know. I will post a detailed list of what you need to do.
ghcaine
October 10th, 2007, 11:10 AM
Mind you, its actually a linux server in disguise...CENTOS 5 with samba shares. Shares work fine from a windows box....its been working well for almost 2 years except for the occasional downtime.
sambatree....
my computer said..."samba what?"...lol ...command not found.
however...smbtree said this:
\\MY-SERVER\ADMIN$ IPC Service (SME Server)
\\MY-SERVER\IPC$ IPC Service (SME Server)
\\MY-SERVER\spt spt
\\MY-SERVER\public Office Public Folder
\\MY-SERVER\Primary Primary i-bay
\\MY-SERVER\print$ Printer drivers
Strangely, my "other" share known as "backup" does not appear.
As far as "child" folder permissions, it should be fine as I can access them like normal from a windows box.
dmizer
October 10th, 2007, 11:18 AM
sambatree....
my computer said..."samba what?"...lol ...command not found.
doh ... fixed that.
however...smbtree said this:
\\MY-SERVER\ADMIN$ IPC Service (SME Server)
\\MY-SERVER\IPC$ IPC Service (SME Server)
\\MY-SERVER\spt spt
\\MY-SERVER\public Office Public Folder
\\MY-SERVER\Primary Primary i-bay
\\MY-SERVER\print$ Printer drivers
Strangely, my "other" share known as "backup" does not appear.
As far as "child" folder permissions, it should be fine as I can access them like normal from a windows box.
humm ... could you post the smb.conf from the server?
PsycoGeek
October 10th, 2007, 11:23 AM
Mind you, its actually a linux server in disguise...
Never mind than... I was under the impression it was a windows box you were sharing from. Can't help you with it...
ghcaine
October 10th, 2007, 11:38 AM
Surely:
#------------------------------------------------------------
# !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------
[global]
add machine script = /sbin/e-smith/signal-event machine-account-create '%u'
admin users = admin
bind interfaces only = no
case sensitive = no
deadtime = 10080
display charset = ISO8859-1
dns proxy = no
domain logons = no
domain master = no
dos charset = 850
encrypt passwords = yes
guest account = public
guest ok = no
hosts allow = 127.0.0.1 10.1.1.0
interfaces = 127.0.0.1 10.1.1.135/255.255.255.0
log file = /var/log/samba/log.%m
logon drive = Z:
map to guest = never
max log size = 50
name resolve order = wins lmhosts bcast
netbios name = MY-SERVER
oplocks = true
kernel oplocks = true
level2 oplocks = true
passdb backend = smbpasswd:/etc/samba/smbpasswd
pid directory = /var/run
preserve case = yes
printer admin = admin
security = user
server string = SME Server
short preserve case = yes
smb passwd file = /etc/samba/smbpasswd
smb ports = 139
socket options = TCP_NODELAY
strict locking = no
unix charset = UTF8
unix password sync = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*success fully*
check password script = /sbin/e-smith/samba_check_password
wins support = no
workgroup = WORKGROUP
printcap name = /etc/printcap
load printers = yes
printing = lprng
print command = /usr/bin/lpr -b -h -r -P%p %s
[homes]
comment = Home directory
browseable = no
guest ok = no
read only = no
writable = yes
printable = no
create mode = 0660
force create mode = 0660
directory mode = 0770
force directory mode = 0770
path = /home/e-smith/files/users/%S/home
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
use client driver = yes
[print$]
comment = Printer drivers
path = /home/e-smith/files/samba/printers
guest ok = yes
browseable = yes
use client driver = yes
writable = no
[Primary]
comment = Primary i-bay
path = /home/e-smith/files/ibays/Primary
read only = no
writable = yes
printable = no
inherit permissions = yes
create mode = 0640
[public]
comment = Office Public Folder
path = /home/e-smith/files/ibays/public/files
read only = no
writable = yes
printable = no
inherit permissions = yes
create mode = 0664
[spt]
comment = spt
path = /home/e-smith/files/ibays/spt/files
read only = no
writable = yes
printable = no
inherit permissions = yes
create mode = 0640
dmizer
October 10th, 2007, 11:43 AM
your server doesn't appear to be offering a share by the name of "backup" unless it's on another computer? windows maybe? with a firewall?
ghcaine
October 10th, 2007, 12:07 PM
your server doesn't appear to be offering a share by the name of "backup" unless it's on another computer? windows maybe? with a firewall?
Right on...
/public
is browsable because well, its public.
However, my "backup" folder is under my home folder on that linux server. So its not
//My-Server/backup its something more like this:
//My-Server/files/home/e-smith/users/backup
I had to change that path in fstab, and thus, it mounts.
However...I cannot access it unless I run thunar as root. very very very odd, because I have chown'd and chmod'd it to my user account/group in xubuntu.
ghcaine
October 10th, 2007, 02:10 PM
Yeah I just confirmed this. Its definitely a problem in trying to work with CentOS. Not a problem though, I just wanted to see if it would work. I successfully mounted a share on a real windows box without any problems.
Your HowTo works great. Thank you so much for the help. I can finally understand how samba works now. I can even see how I could map to multiple windows machines too.
Cheers!
:popcorn:
dmizer
October 10th, 2007, 10:25 PM
actually, there's no reason you can't mount multiple shares hosted by your CentOS server either. you would just need to add a share section in your smb.conf that looks something like this:
[Backup] # <-- this is the netbios name of your share (it will appear in your fstab)
comment = Backup files
path = /home/e-smith/users/backup # <--- this is the location of the shared content (it will NOT appear in your fstab).
read only = no
writable = yes
printable = no
inherit permissions = yes
create mode = 0640
you would mount the above share with this command:
//MY-SERVER/Backup /media/backup cifs credentials=/root/.mycredentials,iocharset=utf8,file_mode=0777,dir_m ode=0777 0 0
Paqman
November 12th, 2007, 04:46 AM
I'm having some trouble with mounting shares from my Qnap TS-209 NAS using this method.
Basically they mount read-only. I believe this is because my uid on Linux and on the NAS are different, resulting in me having guest access. Am I correct in thinking I could specify the uid in the entry in fstab? I've tried adding:
uid=500,guid=500
to the line, but when I "mount -a" it spits it out as an error. Is my syntax wonky, or am I way off track here?
abubin
November 12th, 2007, 08:50 AM
i am trying to mount my d-link NAS with cifs but get this funky file mods.
> ls -l
-rwxrwSrwt 1 root root 11806897 2007-11-02 14:49 webmin-1.330-1.noarch.rpm
Here is what I typed to mount :
sudo mount -t cifs //192.168.10.32/Volume_1 /mnt/mynas2 -o rw,username=user111,password=pass111
Any idea?
What does that "-rwxrwSrwt" means?
Dan_N
November 15th, 2007, 07:47 AM
I am trying to switch from SMBFS to CIFS but can’t solve problems with Swedish characters.
This is my setup:
Dell workstation running Ubuntu 7.10, Swedish setup, with latest patches installed.
Shares from a D-link DNS-323 NAS.
The current samba mounts in fstab looks like:
//192.168.1.32/MEDIA /mnt/Media smbfs credentials=/root/dansmbcredentials,lfs,iocharset=utf8,codepage=cp85 0,uid=dan,gid=users,fmask=550,dmask=550 0 0
But swapping to cifs:
//192.168.1.32/MEDIA /mnt/ Media cifs credentials=/root/dansmbcredentials,iocharset=utf8,uid=dan,gid=users ,file_mode=0550,dir_mode=0550 0 0
results in that Swedish characters are replaced with “?”
Waiting for help, Dan
The problem might have to do with NAS only supporting Samba 2.x, http://forum.dsmg600.info/t539-Swedish-characters-when-using-samba-share-from-linux.html
//Dan
a_posse_ad_esse
November 17th, 2007, 05:04 AM
Hey all. I have been working on an automated backup solution, would like to use cifs for the mounting as I am debating making my server accessible via the internet at large. So far, I am only able to get the dread "mount error 13 = Permission denied."
My setup is as follows:
relevant smbtree (server and client)
\\TIM-LAPTOP tim-laptop
\\TIM-LAPTOP\IPC$ IPC Service (tim-laptop)
\\TIM-LAPTOP\home home
\\SERVER server server (Samba, Mythbuntu)
\\SERVER\tim laptop home tim laptop home
my mount command (server)
sudo mount.cifs //192.168.2.4/home/tim /sync/tim/laptop/home -o credentials=x -v
which yields
parsing options: credentials=x mount.cifs kernel mount options unc=//192.168.2.4\home,ip=192.168.2.4,user=tim,pass=x,ve r=1,credentials=/sync/credentials/tim/laptop/home,prefixpath=tim
mount error 13 = Permission denied
The IP is correct and can be pinged, and both files are appropriately shared. I don't get it... Any suggestions? Thanks
dmizer
November 19th, 2007, 10:19 PM
to the line, but when I "mount -a" it spits it out as an error. Is my syntax wonky, or am I way off track here?
what error do you get? this could be a problem with the way that samba is served on your NAS device.
========================
Here is what I typed to mount :
sudo mount -t cifs //192.168.10.32/Volume_1 /mnt/mynas2 -o rw,username=user111,password=pass111
in order to connect with correct permissions, you will need to mount with the file and directory modes like so:
sudo mount -t cifs //192.168.10.32/Volume_1 /mnt/mynas2 -o rw,username=user111,password=pass111,file_mode=077 7,dir_mode=0777
you'll also have better luck if you mount with fstab instead of the command line. "sudo" means you're mounting as root, so it does mess with permissions.
========================
The problem might have to do with NAS only supporting Samba 2.x, http://forum.dsmg600.info/t539-Swedish-characters-when-using-samba-share-from-linux.html
//Dan
well, the problem is certainly related to the nas device rather than cifs. during testing, i could mount regular windows hosted samba shares with cifs and unicode and was able to view the sweedish characters just fine.
looks like there are some updates to the thread which indicated that you can fix the problem by disabling easy search?
Languange settings cannot be changed in EasySearch using 1.04. This could only be done downgrading firmware to 1.03 which I didn't like. I presume 1.04 supports UTF8 after all(?). So I dropped that alternative and tried to get it right with 1.04 without using EasySearch.
========================
parsing options: credentials=x mount.cifs kernel mount options unc=//192.168.2.4\home,ip=192.168.2.4,user=tim,pass=x,ve r=1,credentials=/sync/credentials/tim/laptop/home,prefixpath=tim
mount error 13 = Permission denied
The IP is correct and can be pinged, and both files are appropriately shared. I don't get it... Any suggestions? Thanks
post the contents of your credential file. mask username and password with **** or similar (if you're concerned about security).
if your network is dhcp, you may not be able to mount with an ip address. see the section in the howto under "prework" as well as the second post in the thread regarding how to find netbios names.
on dhcp networks, i have run into this error when trying to mount with ip instead of mounting with netbios name.
no3mail
November 28th, 2007, 11:59 PM
Thanks for the howto it worked great. I needed to add a couple of tweaks here and there for my network, but other then that it worked great.:)
BjBlaster
December 16th, 2007, 06:54 AM
Hi guys,
I've been a Fedora bloke for quite some time, and finally snapped over to Ubuntu, I've currently running 7.10 and have this issue I would love some info on...
I have a Fedora server running samba, I have had this for several years and been using winXP to connect to my shares without any trouble in shared mode without user auth.
Now I have an Ubuntu desktop machine if I use the built in Places/Connect to a server option I can connect and read and write to the share I have (which is a share without any username or password) without trouble. That is; this path works: smb://hanna/hanna_d/Mp3s
If I then mount the path using this:
mount -t cifs //hanna/hanna_d /mnt/hanna/j_drive -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77
It mounts ok, I can read everything from the new mounted point, but if I create a directory, I then can't delete the directory I just made. If i then go in this way -> smb://hanna/hanna_d/ I can then delete the folder and read and write fine, just not to the actual mounted location /mnt/hanna/j_drive.
I know it's some permissions thing, but I would like to know how the smb: method avoids this, and how I can get my shares to mount with full read write access.
Thanks for any help.
Bj
djinn1973
December 29th, 2007, 09:59 AM
I found your tutorial after about 3 hours of hair pulling, teeth clinching, and obscenity laced web searching...
Your directions were easy to follow and in the end every thing worked. I wanted to say,
THANK YOU!
now I am going to bed.... :)
bayvista
January 20th, 2008, 01:17 AM
I followed the first part of your guide up to 'Manual Mount' and all went well, but I cannot get 'Permanent Mount' to work. Here is a copy of my FSTAB and I would appreciate any suggestions:
/etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# Entry for /dev/hda5 :
UUID=9f123026-fafc-4ffc-8279-a5fd7eeba0a5 / ext3 defaults,errors=remount-ro 0 1
# Entry for /dev/hda1 :
UUID=24F4B62EF4B6025A /media/hda1 ntfs-3g defaults,locale=en_AU.UTF-8 0 1
# Entry for /dev/hda3 :
UUID=14203FD2203FB996 /media/hda3 ntfs-3g defaults,locale=en_AU.UTF-8 0 1
# Entry for /dev/hda6 :
UUID=CA246D23246D142B /media/hda6 ntfs-3g defaults,locale=en_AU.UTF-8 0 1
# Entry for /dev/sda1 :
UUID=02505FF0505FE945 /media/sda1 ntfs-3g defaults,locale=en_AU.UTF-8 0 1
# Entry for /dev/sda5 :
UUID=13D61B93DEF50771 /media/sda5 ntfs-3g defaults,locale=en_AU.UTF-8 0 1
# Entry for /dev/hda7 :
UUID=f6b50d1f-8037-4c8c-b858-15a21f42bc46 none swap sw 0 0
# Entry for /dev/sda6 :
UUID=3e2dfddd-5548-7a88-2420-b67970126ad9 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdd /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
# Added for HP-LAPTOP
//HP-LAPTOP/Public /media/HP-Laptop cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
dmizer
January 20th, 2008, 01:25 AM
i don't see anything wrong with it. what was the line you used for your manual mount?
have you tried rebooting?
bayvista
January 20th, 2008, 02:19 AM
sudo mount -t cifs //HP-Laptop/Public /media/HP-Laptop -o username=david,password=xxxxxxxx,file_mode=0777,di r_mode=0777
This works fine and I have tried rebooting
dmizer
January 20th, 2008, 03:10 AM
please post the output of the following:
smbtree
and
cat /etc/samba/smb.conf | grep netbios&& cat /etc/samba/smb.conf | grep workgroup
also, double check your credentials file to make sure there are no spaces before or after the equal ( = ) sign.
bayvista
January 21st, 2008, 06:29 PM
david@david-desktop:~$ smbtree
WARNING: The "printer admin" option is deprecated
Password:
BAYVISTA
\\HP-LAPTOP
\\HP-LAPTOP\Users
\\HP-LAPTOP\Send To OneNote 2007 Send To OneNote 2007
\\HP-LAPTOP\Public
\\HP-LAPTOP\print$ Printer Drivers
\\HP-LAPTOP\IPC$ Remote IPC
\\HP-LAPTOP\E$ Default share
\\HP-LAPTOP\Documents
\\HP-LAPTOP\D$ Default share
\\HP-LAPTOP\C$ Default share
\\HP-LAPTOP\ADMIN$ Remote Admin
\\DAVID-DESKTOP
\\DAVID-DESKTOP\DeskJet-960C DeskJet-960C
\\DAVID-DESKTOP\PSC-2300 PSC-2300
\\DAVID-DESKTOP\IPC$ IPC Service (david-desktop server (Samba, Ubuntu))
\\DAVID-DESKTOP\Davids Docs davids docs folder
\\DAVID-DESKTOP\backups backup folder
\\DAVID-DESKTOP\print$ Printer Drivers
david@david-desktop:~$
david@david-desktop:~$ cat /etc/samba/smb.conf | grep netbios&& cat /etc/samba/smb.conf | grep workgroup
# on a per machine basis. The %m gets replaced with the netbios name
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = BAYVISTA
david@david-desktop:~$
No spaces in my .smbcredentials file
dmizer
January 21st, 2008, 07:45 PM
looks like you have everything set up correctly. having trouble figuring out what your problem might be, and why it works manually but not with fstab.
try this
as root (sudo), add this line:
mount /media/HP-Laptop
before "exit 0" in the file /etc/rc.local
reboot, and see if your share is mounted then. if not, please post the output of:
dmesg
please enclose the dmesg output in [code] brackets so formatting is preserved.
glaxo
January 22nd, 2008, 05:22 AM
Hoping someone can help me work this one out. My setup consists of Ubuntu 7.10 and a Synology DS-207+ (http://www.synology.com/enu/products/DS207/index.php)
I created the directory /mnt/nas1 with my owner (glaxo) as the owner.
Added the following to /etc/fstab;
//192.168.0.10/share /mnt/nas1 cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
And then created /root/.smbcredentials with the following content;
username=glaxo
password=mypassword
Then ran;
sudo chmod 700 /root/.smbcredentials
This appears to mount the drive correctly. However, whilst I can create and access files I am unable to delete.
Looking into this further it appears the files are mounted with root as the owner. Also all files newly created through this mount point have root as their owner.
Running;
chown glaxo:glaxo /mnt/nas1
returns - "permission denied"
I am able to browse to the share through network places (using the same username & password as provided in .smbcredentials). When doing this there are no issues with deleting files and files newly created this way have glaxo as the owner.
Edited: For clarity of text.
bayvista
January 23rd, 2008, 05:13 AM
Tried that but no mount. Don't understand "enclose the dmesg output in brackets" Let me know if you cannot read this......
avid@david-desktop:~$ dmesg
[ 0.000000] Linux version 2.6.20-16-generic (root@terranova) (gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)) #2 SMP Tue Dec 18 05:45:12 UTC 2007 (Ubuntu 2.6.20-16.33-generic)
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] sanitize start
[ 0.000000] sanitize end
[ 0.000000] copy_e820_map() start: 0000000000000000 size: 000000000009f800 end: 000000000009f800 type: 1
[ 0.000000] copy_e820_map() type is E820_RAM
[ 0.000000] copy_e820_map() start: 000000000009f800 size: 0000000000000800 end: 00000000000a0000 type: 2
[ 0.000000] copy_e820_map() start: 00000000000f0000 size: 0000000000010000 end: 0000000000100000 type: 2
[ 0.000000] copy_e820_map() start: 0000000000100000 size: 000000003fef0000 end: 000000003fff0000 type: 1
[ 0.000000] copy_e820_map() type is E820_RAM
[ 0.000000] copy_e820_map() start: 000000003fff0000 size: 0000000000003000 end: 000000003fff3000 type: 4
[ 0.000000] copy_e820_map() start: 000000003fff3000 size: 000000000000d000 end: 0000000040000000 type: 3
[ 0.000000] copy_e820_map() start: 00000000fec00000 size: 0000000001400000 end: 0000000100000000 type: 2
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
[ 0.000000] BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000003fff0000 (usable)
[ 0.000000] BIOS-e820: 000000003fff0000 - 000000003fff3000 (ACPI NVS)
[ 0.000000] BIOS-e820: 000000003fff3000 - 0000000040000000 (ACPI data)
[ 0.000000] BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
[ 0.000000] 127MB HIGHMEM available.
[ 0.000000] 896MB LOWMEM available.
[ 0.000000] found SMP MP-table at 000f53b0
[ 0.000000] Entering add_active_range(0, 0, 262128) 0 entries of 256 used
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0 -> 4096
[ 0.000000] Normal 4096 -> 229376
[ 0.000000] HighMem 229376 -> 262128
[ 0.000000] early_node_map[1] active PFN ranges
[ 0.000000] 0: 0 -> 262128
[ 0.000000] On node 0 totalpages: 262128
[ 0.000000] DMA zone: 32 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 4064 pages, LIFO batch:0
[ 0.000000] Normal zone: 1760 pages used for memmap
[ 0.000000] Normal zone: 223520 pages, LIFO batch:31
[ 0.000000] HighMem zone: 255 pages used for memmap
[ 0.000000] HighMem zone: 32497 pages, LIFO batch:7
[ 0.000000] DMI 2.3 present.
[ 0.000000] ACPI: RSDP (v000 GBT ) @ 0x000f6ca0
[ 0.000000] ACPI: RSDT (v001 GBT AWRDACPI 0x42302e31 AWRD 0x01010101) @ 0x3fff3040
[ 0.000000] ACPI: FADT (v001 GBT AWRDACPI 0x42302e31 AWRD 0x01010101) @ 0x3fff30c0
[ 0.000000] ACPI: MADT (v001 GBT AWRDACPI 0x42302e31 AWRD 0x01010101) @ 0x3fff66c0
[ 0.000000] ACPI: DSDT (v001 GBT AWRDACPI 0x00001000 MSFT 0x0100000c) @ 0x00000000
[ 0.000000] ACPI: PM-Timer IO Port: 0x1008
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[ 0.000000] Processor #0 15:3 APIC version 20
[ 0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] disabled)
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] dfl dfl lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1])
[ 0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
[ 0.000000] IOAPIC[0]: apic_id 2, version 20, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 dfl dfl)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ2 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Enabling APIC mode: Flat. Using 1 I/O APICs
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] Allocating PCI resources starting at 50000000 (gap: 40000000:bec00000)
[ 0.000000] Detected 3401.283 MHz processor.
[ 26.757827] Built 1 zonelists. Total pages: 260081
[ 26.757833] Kernel command line: root=UUID=9f123026-fafc-4ffc-8279-a5fd7eeba0a5 ro quiet splash
[ 26.757982] mapped APIC to ffffd000 (fee00000)
[ 26.757985] mapped IOAPIC to ffffc000 (fec00000)
[ 26.757988] Enabling fast FPU save and restore... done.
[ 26.757991] Enabling unmasked SIMD FPU exception support... done.
[ 26.758006] Initializing CPU#0
[ 26.758088] PID hash table entries: 4096 (order: 12, 16384 bytes)
[ 26.759049] Console: colour VGA+ 80x25
[ 26.759810] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 26.760468] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 26.782347] Memory: 1028308k/1048512k available (1993k kernel code, 19476k reserved, 900k data, 328k init, 131008k highmem)
[ 26.782357] virtual kernel memory layout:
[ 26.782358] fixmap : 0xfff4e000 - 0xfffff000 ( 708 kB)
[ 26.782359] pkmap : 0xff800000 - 0xffc00000 (4096 kB)
[ 26.782360] vmalloc : 0xf8800000 - 0xff7fe000 ( 111 MB)
[ 26.782361] lowmem : 0xc0000000 - 0xf8000000 ( 896 MB)
[ 26.782362] .init : 0xc03d9000 - 0xc042b000 ( 328 kB)
[ 26.782363] .data : 0xc02f2429 - 0xc03d36d4 ( 900 kB)
[ 26.782364] .text : 0xc0100000 - 0xc02f2429 (1993 kB)
[ 26.782367] Checking if this processor honours the WP bit even in supervisor mode... Ok.
[ 26.862067] Calibrating delay using timer specific routine.. 6806.25 BogoMIPS (lpj=13612504)
[ 26.862117] Security Framework v1.0.0 initialized
[ 26.862126] SELinux: Disabled at boot.
[ 26.862144] Mount-cache hash table entries: 512
[ 26.862329] CPU: After generic identify, caps: bfebfbff 00000000 00000000 00000000 0000441d 00000000 00000000
[ 26.862337] monitor/mwait feature present.
[ 26.862339] using mwait in idle threads.
[ 26.862347] CPU: Trace cache: 12K uops, L1 D cache: 16K
[ 26.862349] CPU: L2 cache: 1024K
[ 26.862352] CPU: Physical Processor ID: 0
[ 26.862354] CPU: After all inits, caps: bfebfbff 00000000 00000000 00003180 0000441d 00000000 00000000
[ 26.862367] Compat vDSO mapped to ffffe000.
[ 26.862373] Remapping vsyscall page to ffffe000
[ 26.862389] Checking 'hlt' instruction... OK.
[ 26.878215] SMP alternatives: switching to UP code
[ 26.878570] Freeing SMP alternatives: 11k freed
[ 26.878779] Early unpacking initramfs... done
[ 27.124549] ACPI: Core revision 20060707
[ 27.129346] ACPI: Looking for DSDT in initramfs... file /DSDT.aml not found, using machine DSDT.
[ 27.131763] CPU0: Intel(R) Pentium(R) 4 CPU 3.40GHz stepping 04
[ 27.131800] Total of 1 processors activated (6806.25 BogoMIPS).
[ 27.131898] ENABLING IO-APIC IRQs
[ 27.132070] ..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 27.278005] Brought up 1 CPUs
[ 27.278225] Booting paravirtualized kernel on bare hardware
[ 27.278294] Time: 19:48:48 Date: 00/23/108
[ 27.278324] NET: Registered protocol family 16
[ 27.278416] EISA bus registered
[ 27.278421] ACPI: bus type pci registered
[ 27.300703] PCI: PCI BIOS revision 2.10 entry at 0xfb520, last bus=1
[ 27.300705] PCI: Using configuration type 1
[ 27.300707] Setting up standard PCI resources
[ 27.308805] ACPI: Interpreter enabled
[ 27.308808] ACPI: Using IOAPIC for interrupt routing
[ 27.309209] ACPI: PCI Root Bridge [PCI0] (0000:00)
[ 27.309213] PCI: Probing PCI hardware (bus 00)
[ 27.309250] ACPI: Assume root bridge [\_SB_.PCI0] bus is 0
[ 27.310153] Boot video device is 0000:01:00.0
[ 27.310256] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[ 27.327447] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 11 *12 14 15)
[ 27.327660] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
[ 27.327870] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 *9 10 11 12 14 15)
[ 27.328079] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)
[ 27.328293] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 *9 10 11 12 14 15)
[ 27.328506] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 11 *12 14 15)
[ 27.328722] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)
[ 27.328936] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
[ 27.330841] Linux Plug and Play Support v0.97 (c) Adam Belay
[ 27.330857] pnp: PnP ACPI init
[ 27.333551] pnp: PnP ACPI: found 12 devices
[ 27.333556] PnPBIOS: Disabled by ACPI PNP
[ 27.333604] PCI: Using ACPI for IRQ routing
[ 27.333607] PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
[ 27.341700] NET: Registered protocol family 8
[ 27.341702] NET: Registered protocol family 20
[ 27.342288] PCI: Bridge: 0000:00:01.0
[ 27.342292] IO window: 9000-9fff
[ 27.342298] MEM window: e4000000-e5ffffff
[ 27.342302] PREFETCH window: c0000000-dfffffff
[ 27.342337] NET: Registered protocol family 2
[ 27.374021] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 27.374198] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
[ 27.375062] TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
[ 27.375699] TCP: Hash tables configured (established 131072 bind 65536)
[ 27.375703] TCP reno registered
[ 27.386132] checking if image is initramfs... it is
[ 27.866100] Freeing initrd memory: 6787k freed
[ 27.866679] audit: initializing netlink socket (disabled)
[ 27.866698] audit(1201117728.188:1): initialized
[ 27.866776] highmem bounce pool size: 64 pages
[ 27.866838] VFS: Disk quotas dquot_6.5.1
[ 27.866861] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 27.866926] io scheduler noop registered
[ 27.866929] io scheduler anticipatory registered
[ 27.866931] io scheduler deadline registered
[ 27.866939] io scheduler cfq registered (default)
[ 27.867194] isapnp: Scanning for PnP cards...
[ 28.218941] isapnp: No Plug & Play device found
[ 28.242242] Real Time Clock Driver v1.12ac
[ 28.242298] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
[ 28.242415] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 28.242548] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[ 28.243114] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 28.243349] 00:08: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[ 28.243539] mice: PS/2 mouse device common for all mice
[ 28.244119] RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
[ 28.244364] input: Macintosh mouse button emulation as /class/input/input0
[ 28.244398] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
[ 28.244402] ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
[ 28.244634] PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
[ 28.244637] PNP: PS/2 controller doesn't have AUX irq; using default 12
[ 28.247078] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 28.247190] EISA: Probing bus 0 at eisa.0
[ 28.247199] Cannot allocate resource for EISA slot 1
[ 28.247224] EISA: Detected 0 cards.
[ 28.277411] TCP cubic registered
[ 28.277419] NET: Registered protocol family 1
[ 28.277442] Using IPI No-Shortcut mode
[ 28.277523] ACPI: (supports S0 S1 S4 S5)
[ 28.277565] Magic number: 8:500:850
[ 28.277720] Time: tsc clocksource has been installed.
[ 28.277763] hash matches device ptyv2
[ 28.278133] Freeing unused kernel memory: 328k freed
[ 29.487882] Capability LSM initialized
[ 29.524024] ACPI Exception (acpi_processor-0677): AE_NOT_FOUND, Processor Device is not present [20060707]
[ 29.956164] SIS5513: IDE controller at PCI slot 0000:00:02.5
[ 29.956185] ACPI: PCI Interrupt 0000:00:02.5[A] -> GSI 16 (level, low) -> IRQ 16
[ 29.956198] SIS5513: chipset revision 1
[ 29.956200] SIS5513: not 100% native mode: will probe irqs later
[ 29.956212] SIS5513: SiS 962/963 MuTIOL IDE UDMA133 controller
[ 29.956229] ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:pio
[ 29.956242] ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA
[ 29.956251] Probing IDE interface ide0...
[ 29.975733] usbcore: registered new interface driver usbfs
[ 29.975758] usbcore: registered new interface driver hub
[ 29.975786] usbcore: registered new device driver usb
[ 29.976479] ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
[ 30.031772] ieee1394: Initialized config rom entry `ip1394'
[ 30.052862] sis900.c: v1.08.10 Apr. 2 2006
[ 30.113111] Floppy drive(s): fd0 is 1.44M
[ 30.152279] FDC 0 is a post-1991 82077
[ 30.265354] hda: SAMSUNG SP2014N, ATA DISK drive
[ 30.941161] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
[ 30.953170] Probing IDE interface ide1...
[ 31.692970] hdc: HL-DT-STDVD-RAM GSA-H55N, ATAPI CD/DVD-ROM drive
[ 32.480759] hdd: HITACHI GD-2000, ATAPI CD/DVD-ROM drive
[ 32.550599] ide1 at 0x170-0x177,0x376 on irq 15
[ 32.565692] ACPI: PCI Interrupt 0000:00:03.0[A] -> GSI 20 (level, low) -> IRQ 17
[ 32.565708] ohci_hcd 0000:00:03.0: OHCI Host Controller
[ 32.565973] ohci_hcd 0000:00:03.0: new USB bus registered, assigned bus number 1
[ 32.565989] ohci_hcd 0000:00:03.0: irq 17, io mem 0xe7004000
[ 32.627018] usb usb1: configuration #1 chosen from 1 choice
[ 32.627164] hub 1-0:1.0: USB hub found
[ 32.627177] hub 1-0:1.0: 3 ports detected
[ 32.733051] ACPI: PCI Interrupt 0000:00:03.1[B] -> GSI 21 (level, low) -> IRQ 18
[ 32.733072] ohci_hcd 0000:00:03.1: OHCI Host Controller
[ 32.733171] ohci_hcd 0000:00:03.1: new USB bus registered, assigned bus number 2
[ 32.733188] ohci_hcd 0000:00:03.1: irq 18, io mem 0xe7000000
[ 32.794882] usb usb2: configuration #1 chosen from 1 choice
[ 32.795014] hub 2-0:1.0: USB hub found
[ 32.795025] hub 2-0:1.0: 3 ports detected
[ 32.900957] ACPI: PCI Interrupt 0000:00:03.2[C] -> GSI 22 (level, low) -> IRQ 19
[ 32.900975] ohci_hcd 0000:00:03.2: OHCI Host Controller
[ 32.901083] ohci_hcd 0000:00:03.2: new USB bus registered, assigned bus number 3
[ 32.901098] ohci_hcd 0000:00:03.2: irq 19, io mem 0xe7001000
[ 32.962886] usb usb3: configuration #1 chosen from 1 choice
[ 32.963025] hub 3-0:1.0: USB hub found
[ 32.963036] hub 3-0:1.0: 2 ports detected
[ 33.040440] usb 1-1: new low speed USB device using ohci_hcd and address 2
[ 33.069480] ACPI: PCI Interrupt 0000:00:03.3[D] -> GSI 23 (level, low) -> IRQ 20
[ 33.069498] ehci_hcd 0000:00:03.3: EHCI Host Controller
[ 33.069611] ehci_hcd 0000:00:03.3: new USB bus registered, assigned bus number 4
[ 33.069649] PCI: cache line size of 128 is not supported by device 0000:00:03.3
[ 33.069660] ehci_hcd 0000:00:03.3: irq 20, io mem 0xe7002000
[ 33.069669] ehci_hcd 0000:00:03.3: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
[ 33.070075] usb usb4: configuration #1 chosen from 1 choice
[ 33.070225] hub 4-0:1.0: USB hub found
[ 33.070235] hub 4-0:1.0: 8 ports detected
[ 33.182705] SCSI subsystem initialized
[ 33.187833] libata version 2.20 loaded.
[ 33.194370] sata_sis 0000:00:05.0: version 0.7
[ 33.194406] ACPI: PCI Interrupt 0000:00:05.0[A] -> GSI 17 (level, low) -> IRQ 21
[ 33.194419] sata_sis 0000:00:05.0: Detected SiS 180/181/964 chipset in SATA mode
[ 33.194488] ata1: SATA max UDMA/133 cmd 0x0001a400 ctl 0x0001a802 bmdma 0x0001b400 irq 21
[ 33.194519] ata2: SATA max UDMA/133 cmd 0x0001ac00 ctl 0x0001b002 bmdma 0x0001b408 irq 21
[ 33.194534] scsi0 : sata_sis
[ 33.201305] hda: max request size: 512KiB
[ 33.212217] hda: Host Protected Area detected.
[ 33.212220] current capacity is 390719855 sectors (200048 MB)
[ 33.212221] native capacity is 390721968 sectors (200049 MB)
[ 33.212343] hda: Host Protected Area disabled.
[ 33.212347] hda: 390721968 sectors (200049 MB) w/8192KiB Cache, CHS=24321/255/63, UDMA(33)
[ 33.212557] hda: cache flushes supported
[ 33.212607] hda: hda1 hda2 < hda5 hda6 hda7 > hda3
[ 33.278540] hdc: ATAPI 48X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache, UDMA(33)
[ 33.278550] Uniform CD-ROM driver Revision: 3.20
[ 33.300116] hdd: ATAPI 20X DVD-ROM drive, 512kB Cache, DMA
[ 33.644245] kjournald starting. Commit interval 5 seconds
[ 33.644255] EXT3-fs: mounted filesystem with ordered data mode.
[ 33.664334] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 33.703934] ata1.00: ata_hpa_resize 1: sectors = 312581808, hpa_sectors = 312581808
[ 33.703942] ata1.00: ATA-7: ST3160812AS, 2AAA, max UDMA/133
[ 33.703945] ata1.00: 312581808 sectors, multi 16: LBA48 NCQ (depth 0/32)
[ 33.770551] ata1.00: ata_hpa_resize 1: sectors = 312581808, hpa_sectors = 312581808
[ 33.770560] ata1.00: configured for UDMA/133
[ 33.770585] scsi1 : sata_sis
[ 34.084174] ata2: SATA link down (SStatus 0 SControl 300)
[ 34.094291] ATA: abnormal status 0x7F on port 0x0001ac07
[ 34.094528] scsi 0:0:0:0: Direct-Access ATA ST3160812AS 2AAA PQ: 0 ANSI: 5
[ 34.094768] ACPI: PCI Interrupt 0000:00:0b.0[A] -> GSI 19 (level, low) -> IRQ 22
[ 34.147607] ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[22] MMIO=[e7005000-e70057ff] Max Packet=[2048] IR/IT contexts=[4/8]
[ 34.154718] ACPI: PCI Interrupt 0000:00:04.0[A] -> GSI 19 (level, low) -> IRQ 22
[ 34.155712] 0000:00:04.0: ICS LAN PHY transceiver found at address 1.
[ 34.165749] 0000:00:04.0: Using transceiver found at address 1 as default
[ 34.166608] eth0: SiS 900 PCI Fast Ethernet at 0xa000, IRQ 22, 00:14:85:45:99:28.
[ 34.420076] usb 1-1: new low speed USB device using ohci_hcd and address 3
[ 34.627028] usb 1-1: configuration #1 chosen from 1 choice
[ 34.935936] usb 2-1: new full speed USB device using ohci_hcd and address 2
[ 35.152867] usb 2-1: configuration #1 chosen from 1 choice
[ 35.431955] ieee1394: Host added: ID:BUS[0-00:1023] GUID[00502266000a0124]
[ 35.463798] usb 3-1: new full speed USB device using ohci_hcd and address 2
[ 35.702678] usb 3-1: configuration #1 chosen from 1 choice
[ 43.644160] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 43.647050] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 43.902340] gameport: EMU10K1 is pci0000:00:0a.1/gameport0, io 0xc000, speed 1104kHz
[ 44.028241] Linux agpgart interface v0.102 (c) Dave Jones
[ 44.115271] agpgart: Detected SiS 661 chipset
[ 44.119317] agpgart: AGP aperture is 64M @ 0xe0000000
[ 44.142148] eth0: Media Link On 100mbps full-duplex
[ 44.157303] input: PC Speaker as /class/input/input1
[ 44.253226] SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)
[ 44.253282] sda: Write Protect is off
[ 44.253285] sda: Mode Sense: 00 3a 00 00
[ 44.253302] SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 44.253371] SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)
[ 44.253380] sda: Write Protect is off
[ 44.253382] sda: Mode Sense: 00 3a 00 00
[ 44.253397] SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 44.253400] sda:<6>parport: PnPBIOS parport detected.
[ 44.369594] parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
[ 44.371556] sda1 sda3 < sda5 sda6 >
[ 44.556800] sd 0:0:0:0: Attached scsi disk sda
[ 44.676166] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 44.715401] usbcore: registered new interface driver hiddev
[ 44.715482] usbcore: registered new interface driver libusual
[ 44.725572] drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x03F0 pid 0x3511
[ 44.838573] Initializing USB Mass Storage driver...
[ 44.902489] input: Logitech USB Receiver as /class/input/input2
[ 44.902583] input: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:03.0-1
[ 44.902659] drivers/usb/class/usblp.c: usblp1: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x03F0 pid 0x3104
[ 44.902670] usbcore: registered new interface driver usblp
[ 44.902673] drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
[ 44.903144] scsi2 : SCSI emulation for USB Mass Storage devices
[ 44.905970] usbcore: registered new interface driver usb-storage
[ 44.905975] USB Mass Storage support registered.
[ 44.905988] usbcore: registered new interface driver usbhid
[ 44.905991] drivers/usb/input/hid-core.c: v2.6:USB HID core driver
[ 44.905995] usb-storage: device found at 2
[ 44.905996] usb-storage: waiting for device to settle before scanning
[ 44.949914] ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 18 (level, low) -> IRQ 23
[ 45.263289] fuse init (API version 7.8)
[ 45.287257] lp0: using parport0 (interrupt-driven).
[ 45.363277] Adding 1060248k swap on /dev/disk/by-uuid/f6b50d1f-8037-4c8c-b858-15a21f42bc46. Priority:-1 extents:1 across:1060248k
[ 45.364499] Adding 1228932k swap on /dev/disk/by-uuid/3e2dfddd-5548-7a88-2420-b67970126ad9. Priority:-2 extents:1 across:1228932k
[ 45.612000] EXT3 FS on hda5, internal journal
[ 47.627072] NET: Registered protocol family 17
[ 49.909727] usb-storage: device scan complete
[ 49.916733] scsi 2:0:0:0: Direct-Access HP psc 2310 1.00 PQ: 0 ANSI: 2
[ 49.927762] sd 2:0:0:0: Attached scsi removable disk sdb
[ 49.927801] sd 2:0:0:0: Attached scsi generic sg1 type 0
[ 51.577435] ibm_acpi: ec object not found
[ 51.643699] input: Power Button (FF) as /class/input/input3
[ 51.647640] ACPI: Power Button (FF) [PWRF]
[ 51.674315] input: Power Button (CM) as /class/input/input4
[ 51.678258] ACPI: Power Button (CM) [PWRB]
[ 51.707024] Using specific hotkey driver
[ 51.780276] No dock devices found.
[ 51.870938] pcc_acpi: loading...
[ 56.490755] [drm] Initialized drm 1.1.0 20060810
[ 56.501167] ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 16
[ 56.504325] [drm] Initialized radeon 1.25.0 20060524 on minor 0
[ 57.160985] ppdev: user-space parallel port driver
[ 58.212913] agpgart: Found an AGP 3.5 compliant device at 0000:00:00.0.
[ 58.213035] agpgart: Putting AGP V3 device at 0000:00:00.0 into 4x mode
[ 58.213167] agpgart: Putting AGP V3 device at 0000:01:00.0 into 4x mode
[ 58.469060] apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16ac)
[ 58.469066] apm: overridden by ACPI.
[ 59.419518] Bluetooth: Core ver 2.11
[ 59.419586] NET: Registered protocol family 31
[ 59.419588] Bluetooth: HCI device and connection manager initialized
[ 59.419591] Bluetooth: HCI socket layer initialized
[ 59.473414] Bluetooth: L2CAP ver 2.8
[ 59.473419] Bluetooth: L2CAP socket layer initialized
[ 59.522954] Bluetooth: RFCOMM socket layer initialized
[ 59.522968] Bluetooth: RFCOMM TTY layer initialized
[ 59.522971] Bluetooth: RFCOMM ver 1.8
[ 68.974951] [drm] Setting GART location based on new memory map
[ 68.974962] [drm] Loading R300 Microcode
[ 68.975005] [drm] writeback test succeeded in 1 usecs
david@david-desktop:~$
rkillcrazy
January 26th, 2008, 04:21 PM
I have a similar issue as a few of these guys.
Using the code below, I can mount the folders just fine...
sudo mount -t cifs //192.168.1.250/data02 /media/mountshare -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77
Once mounted, I can browse, create and move directories as needed however, I cannot delete them. If I go to smb://192.168.1.250/data02, I can delete anything I want. If I want to delete something through the mounted share, I have to do something like sudo rmdir /media/mountshare/folder2delete.
I saw several people had this problem. I've not seen an answer for it yet. Is there one?
01-26-08
1526 EST
bayvista
January 26th, 2008, 07:41 PM
This one's easy: The problem is that the MOUNT command creates a mount point owned by ROOT. What you have to do is change the ownership of the mount point to yourself as follows:
sudo chown userid -RH /media/mountshare
(substitute your userid)
bayvista
January 26th, 2008, 07:43 PM
Still trying to get a permanent mount via FSTAB......Any suggestions?
rkillcrazy
January 26th, 2008, 09:31 PM
This one's easy: The problem is that the MOUNT command creates a mount point owned by ROOT. What you have to do is change the ownership of the mount point to yourself as follows:
sudo chown userid -RH /media/mountshare
(substitute your userid)
Two things....
1 - when I give that command, I get to watch a bunch of permission denied errors roll by.
2 - It's a file share that everyone has access to (there's a bunch of music & media on it) and if I take ownership of it, I could potentially keep others out. Luckily, it didn't look like it took as all I got were all those errors...
Keep in mind that everyone on this network has to have read/write access to it. It's set up so there's no authentication needed and all files, no matter who dumps them there, end up with no real ownership meaning all have free access to do as the wish with the data (equivelant to doing a chmod 777 after the files have been written).
01-26-08
2037 EST
rollinns
January 28th, 2008, 03:05 PM
Bayvista,
I could be wrong here, but I believe I read somewhere that the boot order mounts the drives via fstab before it initializes the Ethernet card. Thus allowing a manual mount but causing problems with a fstab mount since it can't see the network yet since it can't use the eth0 port yet.
I have exactly the same problem, it may be fixed if someone wrote a little program than could be set to auto-run at startup to do the following:
1. Automatically mount the network drives using the manual sudo command that you stated worked correctly.
2. Change the ownership of the network drives.
I'm trying to use this with a Mythbuntu to connect to an UNRAID tower.
I've been toying with Ubuntu for about 18 months but haven't have to get into writing any Auto scripts. Mythtv is set to automatically start after the Xfce desktop shows up so this could run in the background at the same time. I'd like a more simple and direct solution but if this works I'll take it.
What are your thoughts on this?
Rollinns
dmizer
January 28th, 2008, 08:02 PM
This one's easy: The problem is that the MOUNT command creates a mount point owned by ROOT. What you have to do is change the ownership of the mount point to yourself as follows:
sudo chown userid -RH /media/mountshare
(substitute your userid)
this is a bad idea. when using the manual mount command, the share is mounted as root because you mount with "sudo". this is not the case with a share mounted in fstab.
Still trying to get a permanent mount via FSTAB......Any suggestions?
i have no idea why this is not working for you. nothing is wrong, and i've suggested most of the tricks i know. it doesn't make any sense.
is the share you're connecting to a windows vista share by chance?
=======
Two things....
1 - when I give that command, I get to watch a bunch of permission denied errors roll by.
2 - It's a file share that everyone has access to (there's a bunch of music & media on it) and if I take ownership of it, I could potentially keep others out. Luckily, it didn't look like it took as all I got were all those errors...
Keep in mind that everyone on this network has to have read/write access to it. It's set up so there's no authentication needed and all files, no matter who dumps them there, end up with no real ownership meaning all have free access to do as the wish with the data (equivelant to doing a chmod 777 after the files have been written).
01-26-08
2037 EST
try unmounting the share:
sudo umount /media/sharename
and then change the permissions on the local folder to make sure it is read/writable like so:
sudo chmod 777 /media/sharename
then remount, or reboot and see if that corrects your issue.
=======
Bayvista,
I could be wrong here, but I believe I read somewhere that the boot order mounts the drives via fstab before it initializes the Ethernet card. Thus allowing a manual mount but causing problems with a fstab mount since it can't see the network yet since it can't use the eth0 port yet.
What are your thoughts on this?
Rollinns
this is correct. however, the fix is much easier than a script. the fix is outlined in the first post in this howto, and several times throughout. most recently in post 350 on the last page: http://ubuntuforums.org/showpost.php?p=4181362&postcount=350
simply add "mount -a" or "mount /media/sharename" in /etc/rc.local
this works because rc.local is the last to be run during the boot sequence.
bayvista
January 30th, 2008, 05:26 AM
Still does not work. I have added "mount /media/HP-Laptop" to /etc/rc-local as you suggest. I have also added the line to my fstab. However, it still does not mount the share, which is a Windows Vista share.
I did install NTFS-3G some time ago to enable sharing of my Windows partitions with Ubuntu (on the same computer) and this worked fine. However, NTFS-3G replaces the standard FSTAB with its own version. So, I might try restoring the original FSTAB and start from there.
I'm beginning to think that this is a Vista thing. I'm sure that when I had XP on my old notebook, it all worked like a dream.
Another thing I will try is changing the 'credentials' parameter in FSTAB to 'username=xxxx, password=ppppp'.
If the mount from FSTAB is failing, where is the error message written? It's not in DMESG.
dmizer
January 30th, 2008, 06:56 AM
i really don't know if this will work or not, but it's worth a try.
try changing the netbios name to the server's ip address like so:
//192.168.1.1/Public /media/HP-Laptop cifs credentials=/root/.smbcredentials,iocharset=utf8,f ile_mode=0777,dir_mode=0777
(of course, replace "192.168.1.1" with your vista machine's actual ip address).
try rebooting and see if your share appears either in /media or on your desktop after that.
bayvista
February 1st, 2008, 10:18 PM
Tried that but still no joy. I can ping HP-Laptop and the IP address OK. I'm sure it's a Vista problem. I'll make do with the manual mount for now until I get some more time to work on it.
Thanks
rkillcrazy
February 3rd, 2008, 12:46 AM
try unmounting the share:
sudo umount /media/sharename
and then change the permissions on the local folder to make sure it is read/writable like so:
sudo chmod 777 /media/sharename
then remount, or reboot and see if that corrects your issue.
Well, I tried using fstab to mount it in lieu of a sudo command and still no joy. Once again, it mounted just fine and I could create, move, cut, copy, et cetera but could NOT delete the any files. What's funny (not haha funny either :confused:) is my "work around" is to cut/paste to desktop and then delete from the desktop.
What shall we try next?
Side note.....AKA - rant :-?
You know - there should be a GUI for this sort of thing. I understand the command line should work fine but this should be as simple as mapping a drive in Windows. A little GUI should easily be able to ask you what to mount and if you want it mounted on startup all the time. Hell, even throw a permissions thing in there so you can choose who can do what with it. I'm a Windows Admin (yep, that's my job) and I map drives all the time. I even set NTFS and SHARING permissions for users & groups. If Ubuntu wants to compete with some big guy like Bill Gates, it will have to be able to complete little things like this without having over 30-some pages in a forum. Don't get me wrong - I may be a Windows Admin by day but by night I'm playing around with Ubuntu. I don't even use Windows at home! It's just hard to convert people over to something like this when something so petty as mapping a drive is so damn difficult. There have been several things like this where I thought to myself, "there has to be a better way..." Geeks like us will carry on and try to work around and fix things but the average guy, buying a Dell that's loaded with Ubuntu, won't. He'll get pissy and load some busted/hacked version of Windows on it and never turn his back on Bill Gates again. He'll chalk his Ubuntu experience up as a learning experience that he'll wish to never revisit. Which sucks 'cause you save electricity when you use Ubuntu in lieu of Vista. Vista constantly catalogs the drive or something....I've never been so worried about burning out an HDD activity LED in my life! I just hope 8.04 addresses a lot of this since they are advertising fewer config files and such.
OK, rant is done I'll keep playing with this stuff and hope you other folks have better luck than I.
02-02-08
2350 EST
dmizer
February 3rd, 2008, 03:10 AM
rkillcrazy, have you by any chance enabled a root user on your ubuntu system?
i understand your frustration. seriously, i was there and i still am there quite often. and point in fact, there are gui alternatives to what i'm showing here: samba gui list (http://de.samba.org/samba/GUI/). in this thread, i've used cli commands because i KNOW that the directions will be the same even if you use kde, gnome, xfce, icewm, fluxbox, or a server with cli only access. in fact, the directions are even primarily the same if you use ubuntu, fedora, gentoo, opensuse, or a multitude of other distros. to me, universiality is what gives the commandline its power.
what's more, i don't know many "average" users who want to share files across a network or even know what a network is. this does not meant that there "shouldn't be an easier way", just that when considering the needs and desires of an "average" user, you can't think from the POV of a windows network admin.
that said, you're right. it SHOULD be easier. but windows is not easy either. it creates just as many frustrations and annoyances. it's probably easier for you to handle them because you've been using windows for so much longer. in my opinion, linux is not better than windows, it's just different. some aspects of linux are better than windows, and some aspects of windows are better than linux. my reasoning for using linux is that the advantages it offers over windows are advantages which suit my needs.
rkillcrazy
February 3rd, 2008, 10:45 AM
rkillcrazy, have you by any chance enabled a root user on your ubuntu system?
i understand your frustration. seriously, i was there and i still am there quite often. and point in fact, there are gui alternatives to what i'm showing here: samba gui list (http://de.samba.org/samba/GUI/). in this thread, i've used cli commands because i KNOW that the directions will be the same even if you use kde, gnome, xfce, icewm, fluxbox, or a server with cli only access. in fact, the directions are even primarily the same if you use ubuntu, fedora, gentoo, opensuse, or a multitude of other distros. to me, universiality is what gives the commandline its power.
what's more, i don't know many "average" users who want to share files across a network or even know what a network is. this does not meant that there "shouldn't be an easier way", just that when considering the needs and desires of an "average" user, you can't think from the POV of a windows network admin.
that said, you're right. it SHOULD be easier. but windows is not easy either. it creates just as many frustrations and annoyances. it's probably easier for you to handle them because you've been using windows for so much longer. in my opinion, linux is not better than windows, it's just different. some aspects of linux are better than windows, and some aspects of windows are better than linux. my reasoning for using linux is that the advantages it offers over windows are advantages which suit my needs.
No, as far as I know I've not enabled any root users.
Yeah, I'm with ya....I've gotten tired of Windows when it pisses me off and that's why I have an Ubuntu box @ home. Now, about those average users wanting to share files... They are becoming more prevalent. In fact, Microsoft is releasing (or has already done so) a Windows Home Server (http://www.microsoft.com/windows/products/winfamily/windowshomeserver/default.mspx) OS. You and I are probably thinking the same thing - "Why would any average home user have a need for a server OS?" If MS sees a market for it, there must be a boat load of average users out there who wish to have a home file server to share files with. It seems pretty need as you can keep adding HDDs to it and it will replicate across all of them for redundancy. My best guess for the reasoning is that today's homes have more than one computer. It seem like everyone has a craptop these days. I guess people want to keep music and other media in a central location so all the PCs in the house can get to it. As far as I'm concerned, it's pretty much what we are all reading this for - we wish to share files easily.
Although my point of view may have seemed bias, it wasn't. I've always been pretty good about stepping up for the average user. I know I could script all kinds of stuff and have the users use this, that or the other but in the end, it would only be easy for me. They need simple point-n-click or they will get too frustrated and give up on the idea. I think Linux, in many ways, is better than Windows. However, where Linux excels in security and stability, it falls short in many of little things an average user can do in Windows. Because of this, I have a hard time selling my clients on Ubuntu. Haha :twisted: I do keep throwing it in their face via a dual boot setup though! They can't boot up without seeing an option for Ubuntu... And that has gotten myself and the client out a jam when they broke Windows with spyware. It's still frustrating to see all those sheep in Bill Gates' pen and I swear I could get more of them to see the better/safer/more stable side of computing if I could just get more of them to use Linux.
dmizer
February 3rd, 2008, 11:09 AM
well, shortly before my encounter with ubuntu about 2 years ago, i did my own first windows to windows (winxp to win2000) file sharing network. it took me about a month of frustrating, hair pulling google searches, lots of late hours, and a swear can full of quarters. and at that time, i would have considered myself an above average windows user. i found it less difficult to do the same in linux but that was because i'd already learned the basics.
anyway, it really doesn't address your issue, which seems to have become a common theme in the most recent posts here. i'm really at a loss as to what is going on, as everything works perfect under my setup. you aren't by chance connecting to a windows share where either ubuntu or windows is runing in a virtual machine?
i'd actually love to get some hands on time with one of these machines and see if i can figure out what the heck the problem is.
SonicSteve
February 3rd, 2008, 11:21 AM
Although my point of view may have seemed bias, it wasn't. I've always been pretty good about stepping up for the average user. I know I could script all kinds of stuff and have the users use this, that or the other but in the end, it would only be easy for me. They need simple point-n-click or they will get too frustrated and give up on the idea. I think Linux, in many ways, is better than Windows. However, where Linux excels in security and stability, it falls short in many of little things an average user can do in Windows. Because of this, I have a hard time selling my clients on Ubuntu. Haha :twisted: I do keep throwing it in their face via a dual boot setup though! They can't boot up without seeing an option for Ubuntu... And that has gotten myself and the client out a jam when they broke Windows with spyware. It's still frustrating to see all those sheep in Bill Gates' pen and I swear I could get more of them to see the better/safer/more stable side of computing if I could just get more of them to use Linux.
Careful about doing this, it could just annoy them and turn them off completely. Also I find that although we know that Linux is great and I agree better than windows, Most windows users need to be at the end of their rope before they will consider Linux. Some just can't because of Windows only apps and others are simply afraid.
I bet if you read through this thread you'll find some posts from me in here. I went through similar things setting up between Windows XP and Ubuntu. Though I just couldn't get read/write access. Once I had read/write I could delete files. Your experience is just strange, sorry, but it is.
PS I come from the exact same background as you. Windows network admin by day and full time on -all computers now- Ubuntu at home.
wildegnux
February 4th, 2008, 07:46 AM
First of all, great how-to! Thanks a lot, it helped.
I am however missing one thing and that is how do I mount a samba share with read/write access for a single user and no/limited access for other users?
dmizer
February 4th, 2008, 08:17 AM
wildegnux, i don't know if this will work or not, but it's worth a shot. i've never had do do this kind of mount on a multiple user system.
//netbiosname/sharename /media/sharename cifs credentials=/root/.smbcredentials,uid=ALLOWED-USER,gid=ALLOWED-USER,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
where "ALLOWED-USER" is the ubuntu user id you wish to allow access to the share.
MrNiceguy
February 21st, 2008, 11:26 PM
Not sure if you can help me, and sorry if this has been asked and answered already in the thread. (I did use the "Search in this thread" function, but haven't read all 37 pages.)
Your guide worked great - I now have the SMB share on my NAS box mapped to /media/music, and AmaroK can see my entire music collection.
Here's the weird thing. The automatically-created shortcuts on the desktop and under the "Storage Media" section don't work. If I try to open either one, I get a "Permissions Denied" error message. If I actually browse to /media/music, everything works fine.
Any ideas? I can live with it, but it's kinda annoying.
dmizer
February 22nd, 2008, 12:10 AM
Not sure if you can help me, and sorry if this has been asked and answered already in the thread. (I did use the "Search in this thread" function, but haven't read all 37 pages.)
Your guide worked great - I now have the SMB share on my NAS box mapped to /media/music, and AmaroK can see my entire music collection.
Here's the weird thing. The automatically-created shortcuts on the desktop and under the "Storage Media" section don't work. If I try to open either one, I get a "Permissions Denied" error message. If I actually browse to /media/music, everything works fine.
Any ideas? I can live with it, but it's kinda annoying.
well, that's a first. i actually have no knowledge of the automatic shortcut creations. i assume they are based in nautilus, so that's where i would start my troubleshooting. also, obviously permissions are amiss somewhere.
you could try unmounting the share:
sudo umount /media/music
then change the permissions of your mounted folder to world read/write:
sudo chmod 777 /media/music
then remount the share:
sudo mount /media/music
and see if that corrects your problem. if not, then i'll do some digging on the link creations.
MrNiceguy
February 24th, 2008, 12:28 AM
Didn't help any, but thanks for the suggestions. If I remember correctly, Nautilus is Gnome-specific and I'm running Kubuntu.
dmizer
February 24th, 2008, 08:38 PM
i'm even more clueless then. i've only rarely used kde.
you could try mounting the share in your home folder, and making a symbolic link to your desktop instead. wouldn't be as pretty, and it wouldn't disappear and reappear when the connection went up and down, but it may be less frustration for you.
MrNiceguy
March 1st, 2008, 02:33 AM
Now that I play around with it, it does seem to be a permissions problem. I did try your previous suggestion with unmounting, then running the chmod 777 and remounting, which didn't help.
It seems that I currently have rights to create, but not modify. I can create a blank text file, but if I open the file and try to edit it, I get an error when saving. If I try to copy a file into the share, it will create a blank file with the name of the source file, then throw up an error. I can edit files just fine as root. I seem to have full file rights if I mount it at ~/music instead of /media/music
Don't know if it will help, but here it the line from /etc/fstab
//guide/Music /media/music cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77 0 0
badmedic
March 20th, 2008, 02:24 AM
Sorry dmizer... I meant to come back here a while ago and say thank you for the great guide! It was a big help with my home media center setup. :)
mtrompeta
March 24th, 2008, 01:30 AM
dmizer,
Thanks so much for this post! I was able to successfully mount my Maxtor Shared Storage II 500GB nas with this HowTo. I didn't have to ask 1 question because this whole thread contained all the info I needed.
I followed the exact steps you prescribed, but instead used an IP instead of the NetBios (I assigned a static IP to the nas so that the DHCP doesn't always change it).
Thanks again!
El Puño
March 24th, 2008, 02:42 PM
Oh dear !
In order to "convert" Windows users to Ubuntu, why can't this be done by a simple GUI ??
Windows users (my self included) hate commandlines !
/El Puño
dmizer
March 24th, 2008, 07:35 PM
Oh dear !
In order to "convert" Windows users to Ubuntu, why can't this be done by a simple GUI ??
Windows users (my self included) hate commandlines !
/El Puño
as i have said before in this thread, this CAN be done by gui.
furthermore, as i indicated in the howto itself:
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.)
if i give gui directions for this, it will work in Ubuntu, but not in Kubuntu or Xubuntu. should i just leave the other users out, and let them fend for themselves?
vgrisham
March 24th, 2008, 09:24 PM
as i have said before in this thread, this CAN be done by gui.
furthermore, as i indicated in the howto itself:
if i give gui directions for this, it will work in Ubuntu, but not in Kubuntu or Xubuntu. should i just leave the other users out, and let them fend for themselves?
Yes please. :wink:
MountainX
March 27th, 2008, 01:12 PM
This is an excellent thread. But if you followed it exactly and still had problems saving text files to network shares, the problem might not be the way you set up the share. If you are using gedit, there is a bug you need to be aware of.
https://bugs.launchpad.net/gedit/+bug/34813
The diagnosis is described in these two comments here:
https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/34813/comments/20
https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/34813/comments/40
I kept thinking my problem was my permissions on my smbfs or cifs command. The problem turned out to be gedit.
Solution: don't use gedit (at least not for editing files on network shares)
dmizer
March 27th, 2008, 07:33 PM
This is an excellent thread. But if you followed it exactly and still had problems saving text files to network shares, the problem might not be the way you set up the share. If you are using gedit, there is a bug you need to be aware of.
https://bugs.launchpad.net/gedit/+bug/34813
The diagnosis is described in these two comments here:
https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/34813/comments/20
https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/34813/comments/40
I kept thinking my problem was my permissions on my smbfs or cifs command. The problem turned out to be gedit.
Solution: don't use gedit (at least not for editing files on network shares)
thanks for the tip. i will include this information in the howto under the "Disclaimer" section.
IwarV
March 29th, 2008, 04:35 PM
Peope, it's a long thread and I read until page 22 and tried all your tips but I am soo tired and I think I know the answer will be a disappointment, but I just gotta try this.
My network is:
main machine running Ubuntu
kids/gaming machine running XP
just bought a NAS, a western digital My Book World Edition (http://www.wdc.com/en/products/Products.asp?DriveID=347 (http:///www.wdc.com/en/products/Products.asp?DriveID=347))
No problems interfacing with the NAS from the XP machine but on the linux machine I initially just went with Ubuntu and connected to it and the wheels fell off soon after. Obviously Ubuntu defaults to samba. It's slow and unreliable or so I found.
Googled around and found this thread so obviously tried my luck setting up a cifs link to the NAS. There is only one source I found who claims that this NAS does smb and cfis.
I can set up a link between the Ubuntu machine to one of the shares on the XP box. No problems there. It's all set up nicely, right?
Then I try my luck with the NAS.
I set up a link to one of the NAS shares. It (partially) succeeds and I can browse the folders. But I can not for the life of me set up a link to the share where I get rw access.
And I *know* I have configured the NAS correctly.
At this moment I am just trying to manual mounting, so here's my smbtree:
HOME
\\TERRA terra
\\TERRA\IPC$ IPC Service (terra)
\\TERRA\PICTURES
\\TERRA\VIDEO
\\TERRA\MUSIC
\\TERRA\PUBLIC
\\STIMPY
\\STIMPY\Brother Brother HL-820
\\STIMPY\Iwar's Documents
\\STIMPY\Music
\\STIMPY\temp
\\STIMPY\Mum and Dad
\\STIMPY\DVDROM
\\STIMPY\DVDRW
\\STIMPY\print$ Printer Drivers
\\STIMPY\SharedDocs
\\STIMPY\IPC$ Remote IPC
\\REN Samba 3.0.26a
\\REN\IPC$ IPC Service (Samba 3.0.26a)
TERRA is the NAS, REN runs Ubuntu and STIMPY is the XP box
On REN I created two 'folders' in /media called 'public' and 'dvdrw'
I have also created a credentials file in root as per dmizer's instructions, who I hastily add should be at the very least be nominated for some Nobel prize or another for outstanding work in the field of CFIS mounting.
These credentials should yield rw access on ALL shares on TERRA.
Anyhoo, when I run:
sudo mount -t cifs -o rw,credentials=/root/.smbcredentials,file_mode=0777,dir_mode=0777 //terra/public /media/public
or....
sudo mount -t cifs //terra/public /media/public -o credentials=/root/.smbcredentials,username=####,password=####,file_m ode=0777,dir_mode=0777
I get the desktop 'public' icon alright, but I can only browse its contents.
Soooo... seeing as I can connect to XP using CIFS, and I can partically connect to the NAS using cifs too, can I assume that I should be able to get the whole hog working on cifs? Or should I abandon and lump samba?
Any help greatly appreciated
Iwar
dmizer
March 30th, 2008, 05:12 AM
if you can mount the NAS and browse when using the manual mount option, you should try the permanent mount option via fstab. just copy/paste this line:
//terra/public /media/public cifs credentials=/root/.smbcredentials,rw,file_mode=0777,dir_mode=0777 0 0
to the end of your /etc/fstab file, and reboot. this may solve your rw problem
IwarV
March 30th, 2008, 08:33 AM
Thanks for the suggestion. I hadn't considered trying that assuming that manual mounting would yield the same results.
Disappointingly, it seems it does :(
The share mounts, but again only as read-only.
Perhaps it wasn't too clear in my initial post, but I can mount any share on Terra using smbfs and get rw privileges.
But obviously, with slower speeds (averaging @ 1.2MB/s) and bad reliability.
I just want my cake and eat it.
So I thought I'd try
sudo chmod 777 /media/public
but that yields
chmod: changing permissions of `/media/public': Permission denied
So I unmount /media/public, then change its permissions (chmod 777) and reboot.
No joy. Still only read-only. But the plot thickens.
From a terminal I type
sudo mkdir /media/public/test
Lo and behold, a directory is created!
so I try and get this...
vdir /media/public
total 0
drwxr-xr-x 2 www-data www-data 0 2008-03-27 20:29 Alison\ (public)
drwxr-xr-x 3 www-data www-data 0 2008-03-27 22:39 Iwar\ (public)
drwxr-xr-x 2 www-data www-data 0 2008-03-30 13:24 test
So why oh why and where did my permissions get overwritten?
Iwar
dmizer
March 30th, 2008, 08:28 PM
found this potential solution here: http://www.linuxquestions.org/questions/linux-networking-3/how-to-mount-or-access-wd-my-book-via-network-573141/page2.html#post2910172
let me know if it works:
//terra/public /media/public cifs credentials=/root/.smbcredentials,uid=33,gid=33,rw,file_mode=0777,di r_mode=0777 0 0
if not, you'll have to figure out what userid and group id the www-data user is given from the nas, and use those numbers in place of "33"
humm ... or just try this:
//terra/public /media/public cifs credentials=/root/.smbcredentials,uid=www-data,gid=www-data,rw,file_mode=0777,dir_mode=0777 0 0
rkillcrazy
March 31st, 2008, 09:05 AM
Oh dear !
In order to "convert" Windows users to Ubuntu, why can't this be done by a simple GUI ??
Windows users (my self included) hate commandlines !
/El Puño
I'm a Windows Network Admin & I LOVE the command line! :biggrin:
Nonetheless, you bring up a good point since MOST Windows users don't even know a command line exists. However, the author of the thread also brings up a good point - not all GUI will work for all *buntu versions.
rkillcrazy
March 31st, 2008, 09:09 AM
found this potential solution here: http://www.linuxquestions.org/questions/linux-networking-3/how-to-mount-or-access-wd-my-book-via-network-573141/page2.html#post2910172
let me know if it works:
//terra/public /media/public cifs credentials=/root/.smbcredentials,uid=33,gid=33,rw,file_mode=0777,di r_mode=0777 0 0
if not, you'll have to figure out what userid and group id the www-data user is given from the nas, and use those numbers in place of "33"
humm ... or just try this:
//terra/public /media/public cifs credentials=/root/.smbcredentials,uid=www-data,gid=www-data,rw,file_mode=0777,dir_mode=0777 0 0
Just a thought...
What about NAS boxes that don't have credentials. For instance, FreeNAS can be set up to be wide open to anyone on the network with CIFS/SMB. I use this type of setup. For now, I use a shortcut on the desktop to gain access to it. I don't bother mounting it per se`.
03-31-08
0909 EST
dmizer
March 31st, 2008, 09:49 AM
Just a thought...
What about NAS boxes that don't have credentials. For instance, FreeNAS can be set up to be wide open to anyone on the network with CIFS/SMB.
which is fine if you didn't just unknowingly plunk down over $170 on a commercial offering instead.
rkillcrazy
March 31st, 2008, 01:53 PM
which is fine if you didn't just unknowingly plunk down over $170 on a commercial offering instead.
Yes, but what about the credentials? DO I just omit that line or is there something that must be used instead?
03-31-08
1353 EST
IwarV
March 31st, 2008, 06:26 PM
found this potential solution here: http://www.linuxquestions.org/questions/linux-networking-3/how-to-mount-or-access-wd-my-book-via-network-573141/page2.html#post2910172
let me know if it works:
Woot! Woot!
You Sir are a star !
That article provided all the answers and then some. "Hacking Western Digital MyBook World Edition" (http://martin.hinner.info/mybook) gives an excellent step-by-step guide on how to break into my NAS - which I knew was running linux - and set it up for ssh and also install NFS
So basically I have gone further! No cifs, but nfs
That's got to be worth it. Right now I am copying all my music from the Ubuntu box to the NAS at a cool 4/5 MB/sec.
However, I have one last favour to ask. It's me being a complete and utter noob one, m'fraid (but at least I am trying)
Martin's last paragraph tells me nicely how to mount the NAS' internal shares manually like so:
mount mybook_ip:/shares/internal /mnt -o rw
But obviously, I will want to do that automatically at boot up. What file on my ubuntu box do I edit and what do I put?
Also, although currently not required, is it at all possible to have different mountings for different users with different credentials (so that I can set up guest accounts with ro access or even purely personal folders that only the current user has access to.
This last one is only for extra points however and should probably be addressed elsewhere as I have just stepped off the map for this cifs thread. Even without that knowledge I am just chuffed to bits to get a stable and fast connection to my NAS.
Thanks to dmizer and also huge thanks to Martin. You are both lifesavers!
Iwar
dmizer
March 31st, 2008, 06:45 PM
Martin's last paragraph tells me nicely how to mount the NAS' internal shares manually like so:
mount mybook_ip:/shares/internal /mnt -o rw
But obviously, I will want to do that automatically at boot up. What file on my ubuntu box do I edit and what do I put?
see the last link in my sig for the howto on mounting nfs shares ;)
as to mounting different shares for different users ... i've yet to get around to that.
dmizer
March 31st, 2008, 07:28 PM
Yes, but what about the credentials? DO I just omit that line or is there something that must be used instead?
03-31-08
1353 EST
the line for mounting shares without password protection is given in the howto.
fruchtschwert
April 2nd, 2008, 05:33 PM
Hey guys,
the last few days I was struggling with the same problem, you seem to have. Samba access to my landisk wasn't working at all since the upgrade to hardy. With gutsy everything worked fine. Seem to be issues related to the 3.x version of samba and cifs replacing smbfs.
So here is my solution:
To get the authentification work at all (mounting share through Nautilus) I had to add this line to my /etc/samba/smb.conf:
client lanman auth = Yes
My Landisk can only use the insecure lanman authentification, which is disabled by default in samba 3.x (same problem with vista by the way, http://www.builderau.com.au/blogs/codemonkeybusiness/viewblogpost.htm?p=339270746). I don't know if this applies to your problem.
Then mounting with Nautilus worked. But when trying cifs, I got the "not a directory"-error. Solution is simple and nowhere to be found and not very breathtaking. You have to add the option
nounix
to the mount - command. Which leads (in my case) to these lines:
sudo mount -t cifs //192.168.1.42/PUBLIC /media/marvin -o nounix,credentials=/home/fruchtschwert/.smbcredentials,uid=1000,gid=1000
and for the fstab:
//192.168.1.42/PUBLIC /media/marvin cifs user,nounix,credentials=/home/fruchtschwert/.smbcredentials,uid=1000,gid=1000 0 0
Hope this can set an end to your neverending thread ;-)
Cheers
dmizer
April 2nd, 2008, 07:29 PM
<snip>
nounix
to the mount - command. Which leads (in my case) to these lines:
sudo mount -t cifs //192.168.1.42/PUBLIC /media/marvin -o nounix,credentials=/home/fruchtschwert/.smbcredentials,uid=1000,gid=1000
and for the fstab:
//192.168.1.42/PUBLIC /media/marvin cifs user,nounix,credentials=/home/fruchtschwert/.smbcredentials,uid=1000,gid=1000 0 0
Hope this can set an end to your neverending thread ;-)
Cheers
lol ... i don't have that kind of luck.
where did you get that option from? it's not a legal cifs or smbfs mount option, which means this may not be a lasting solution.
fruchtschwert
April 3rd, 2008, 09:00 AM
hm .. i'm sorry ! Samba can be frustrating ..
Found it while googling .. here
http://lists.samba.org/archive/linux-cifs-client/2007-November/002469.html
and for the exact description I found this:
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc1/2.6.23-rc1-mm2/broken-out/git-cifs.patch
+ nounix Disable the CIFS Unix Extensions for this mount (tree
+ connection). This is rarely needed, but it may be useful
+ in order to turn off multiple settings all at once (ie
+ posix acls, posix locks, posix paths, symlink support
+ and retrieving uids/gids/mode from the server) or to
+ work around a bug in server which implement the Unix
+ Extensions.
IwarV
April 3rd, 2008, 12:45 PM
see the last link in my sig for the howto on mounting nfs shares ;)
as to mounting different shares for different users ... i've yet to get around to that.
Apos for the long wait. Was meant to post much earlier, but had a lot on.
Essentially, using your guide this was a no-brainer. Got (most of-) all the stuff moved over to the NAS now.
That said, it did crap out on me twice while moving over 3668 or so music files, so even NFS is not completely reliable. But when it did crap out, it did not take the OS down with it.
Many many thanks, dmizer.
Bluecube
April 4th, 2008, 12:09 PM
I'm having a hell of a time here trying to get my shares to automount. I've followed the instructions on this thread and a load of others with no joy so I'm totally stumped as to what my problem is. Here's the entries from my fstab file -
//Cube/Craig /media/Craig cifs auto,iocharset=utf8,uid=craig,gid=users,credential s=/root/.cifscredentials,file_mode=0775,dir_mode=0775 0 0
//Cube/Music /media/Music cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77,auto 0 0
//Cube/Video /media/Video cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77,auto 0 0
//Cube/Pictures /media/Pictures cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77,auto 0 0
//Cube/General /media/GeneralFiles cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77,auto 0 0
As can be seen from above I'm trying to connect to a NAS called Cube. The first share is password protected while the other three are open to all. None will automount even when I use the IP address in place of the NAS name.
The shares are accessible through the Nautilus network browser and Connect to Server function. Indeed I can add them as Bookmarks. So why can't I automount them?!? This is very frustrating so any help will be gratefully received. TIA.
love2learn
April 6th, 2008, 06:49 AM
okay, went through the walkthrough and got this:
lucana@laptop:~$ sudo mount -a
mount error 111 = Connection refused
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
lucana@laptop:~$ smbtree
Password:
WORKGROUP
\\LAPTOP Samba 3.0.26a
\\LAPTOP\IPC$ IPC Service (Samba 3.0.26a)
lucana@laptop:~$
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=eafe81a0-359c-4f9e-8289-a2bdc8d1b196 / ext3 defaults,erro$
# /dev/sda5
UUID=ff38c1b7-89b0-4066-84d4-687e910a1o8e7 none swap sw $
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
//192.168.1.100/d/movie1 /media/music1 cifs guest,rw,iocharset=utf$
I should offer a bit more info. I have a ubuntu 7.10 gutsy laptop that is the client ( wireless connection ) I have XP (wired to same wireless router as ubuntu) used as a file server with 1.5 TBs of information across 4 drives.
C:\
D:\Movies1
E:\Music
F:\Movies2
my server netbios name = Media
Workgroup = CHOPPERS
I am lost please help
dmizer
April 6th, 2008, 07:09 AM
As can be seen from above I'm trying to connect to a NAS called Cube.
what NAS device do you have? make and exact model number please.
dmizer
April 6th, 2008, 07:34 AM
okay, went through the walkthrough and got this:
//192.168.1.100/d/movie1 /media/music1 cifs guest <snip>
possible problem one:
are you positive that your share name is "d"?
definite problem two:
you cannot mount a directory within a share.
so this is a valid mount command providing "d" is indeed the share name of your shared folder:
//192.168.1.100/d /media/music1 cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77 0 0
here's how to determine your share name in windows:
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".
since you did not setup netbios name resolution with winbind and nsswitch, you cannot see the netbios name and sharename from your ubuntu computer with the "smbtree" command. so you can try to include netbios name resolution by following the directions under "pre-work".
also ... don't forget to check your firewall on winXP to make sure that local filesharing is allowed through.
Bluecube
April 6th, 2008, 10:30 AM
what NAS device do you have? make and exact model number please.
It's a Thecus n2100.
dmizer
April 6th, 2008, 10:55 AM
It's a Thecus n2100.
okay ... post the output of this:
sudo mount -tv cifs //Cube/Video /media/Video -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 77
love2learn
April 6th, 2008, 11:04 AM
okay, a few fixes and still the same thing. lets start with my nsswitch for netbios.
I have this:
hosts: files wins dns mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files
my fstab now says this:
//192.168.1.100/movie1 /media/music1 cifs guest
and i have disabled my windows xp firewall.
I still get this when trying to sudo mount -a:
lucana@laptop:~$ sudo mount -a
mount error 111 = Connection refused
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
I have also put forward routing on my router ports 137-139 as suggested for samba. ( if that matters for this application)
any other information i can provide? I want to give you as much of a picture as you need. Thank you very much for your help.
love2learn
April 6th, 2008, 02:54 PM
i think i see something else wrong, when i go to places then network i see that it is on workgroup instead of CHOPPERS for my network. how do i change that?
love2learn
April 6th, 2008, 04:23 PM
Okay, I got everything to work but I can't mount the drives. I am perfectly okay with that. I can just go to places > network>windows network>choppers>then whatever drive i need to get into. I am perfectly happy with this. Thanks dmizer!!
dmizer
April 6th, 2008, 07:43 PM
i think you'll find that: "places > network > windows network > choppers" will be inadequate and too slow for most applications, but if it works for what you need power to you.
you're really close to making this work though. all you need to do is make sure all the computers on your network are under the same workgroup. here's how:
http://ubuntuforums.org/showpost.php?p=4635064&postcount=2
love2learn
April 7th, 2008, 02:16 PM
sorry I am a little thick. click on the shared folder i made in the media folder?
ubuntu: right-click on your shared folder --> General Windows sharing settings --> (change the domain/workgroup name)
dmizer
April 7th, 2008, 07:27 PM
sorry I am a little thick. click on the shared folder i made in the media folder?
ubuntu: right-click on your shared folder --> General Windows sharing settings --> (change the domain/workgroup name)
okay ... you indicated that one computer in your network was not in the same workgroup as the rest. what os is that computer running?
love2learn
April 7th, 2008, 11:33 PM
the Ubuntu 7.10 laptop is on the original 'workgroup' and i need to get it to CHOPPERS instead.
dmizer
April 8th, 2008, 12:01 AM
okay ... edit /etc/samba/smb.conf like so:
sudo nano /etc/samba/smb.conf
look for the section that reads:
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = workgroup
change it so it reads:
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = CHOPPERS
and restart samba:
sudo /etc/init.d/samba restart
this should put your ubuntu computer in the workgroup of CHOPPERS.
love2learn
April 8th, 2008, 02:55 PM
phew, this is a difficult learning curve for me. I am so used to windows it is hard to grasp. But I am here for life and I cant go back so here it goes:
I checked my smb.conf and there is absolutely Nothing
in there. Totally blank. I did however go to system>admin>network>wireless config and in general put in CHOPPERS for the workgroup and now when i go into natilus I see my 2 laptops and my server which means I am on the CHOPPERS network.
Here is the latest look at my fstab pay no attention to the # sections of course
# //192.168.1.***/Movie1 /media/Movies1 cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 $
//MEDIA/Movies1 /media/movies1 cifs credentials=/home/lucana/.smbcredentials,uid=1000 0 0
# ,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
I know it is a mess but i have tried multiple combinations to attempt a successful mount.
according to this guide:
https://help.ubuntu.com/community/SettingUpSamba
it says:
Do you need Samba?
Samba is not necessary to:
Access shared folders, drives and printers on a Windows computer (that is, act as a client with Windows servers), you only need a smbfs plugin. See MountWindowsSharesPermanently (https://help.ubuntu.com/community/MountWindowsSharesPermanently)
so maybe you can help me understand why i need a samba config file in the first place and I can get past this mental block?
I am sorry I am so thick-headed, I just want a full understanding of what I am doing.
dmizer
April 8th, 2008, 10:46 PM
okay ... now, try this command:
smbtree
if you still only see your ubuntu machine, you probably have a firewall issue. do you have firestarter installed in ubuntu? how about the xp firewall?
you do not need to install samba. you only need that if you want to share files from ubuntu to windows.
love2learn
April 9th, 2008, 01:39 AM
I see everything i need to get to:
lucana@laptop:~$ smbtree
Password:
CHOPPERS
\\MEDIA Server
\\MEDIA\Movies2 (F)
\\MEDIA\C$ Default share
\\MEDIA\ADMIN$ Remote Admin
\\MEDIA\Music (E)
\\MEDIA\F$ Default share
\\MEDIA\Movies1 (D)
\\MEDIA\SharedDocs
\\MEDIA\D$ Default share
\\MEDIA\IPC$ Remote IPC
\\MEDIA\E$ Default share
\\LAPTOP Samba 3.0.26a
\\LAPTOP\IPC$ IPC Service (Samba 3.0.26a)
\\****
\\****\Printer Microsoft Office Document Image Writer
\\****\SharedDocs
\\*****\print$ Printer Drivers
\\*****\IPC$ Remote IPC
lucana@laptop:~$
dmizer
April 9th, 2008, 01:45 AM
# //192.168.1.***/Movie1 /media/Movies1 cifs guest,rw,iocharset=utf8,file_mode=0777,dir_mode=07 $
//MEDIA/Movies1 /media/movies1 cifs credentials=/home/lucana/.smbcredentials,uid=1000 0 0
# ,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
okay ... the above lines just seem messed up, so just remove them.
I see everything i need to get to:
lucana@laptop:~$ smbtree
Password:
CHOPPERS
\\MEDIA Server
\\MEDIA\Movies2 (F)
\\MEDIA\C$ Default share
\\MEDIA\ADMIN$ Remote Admin
\\MEDIA\Music (E)
\\MEDIA\F$ Default share
\\MEDIA\Movies1 (D)
\\MEDIA\SharedDocs
\\MEDIA\D$ Default share
\\MEDIA\IPC$ Remote IPC
\\MEDIA\E$ Default share
\\LAPTOP Samba 3.0.26a
\\LAPTOP\IPC$ IPC Service (Samba 3.0.26a)
\\****
\\****\Printer Microsoft Office Document Image Writer
\\****\SharedDocs
\\*****\print$ Printer Drivers
\\*****\IPC$ Remote IPC
lucana@laptop:~$
with the above knowledge, you should now be able to automatically mount your samba shares via fstab with the following line:
//MEDIA/Movies1 /media/Movies1 cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
the above should all appear on one line in fstab.
then try this command:
sudo /etc/init.d/networking restart
and see if your share gets mounted or not.
edit:
no need to obscure your local ip address, as it cannot resolve from the internet anyway.
love2learn
April 9th, 2008, 01:55 AM
lucana@laptop:~$ sudo nano /etc/fstab
[sudo] password for lucana:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=eafe81a0-359c-4f9e-8289-a2bdc8d1b196 / ext3 defaults,erro$
# /dev/sda5
UUID=ff38c1b7-89b0-4066-84d4-687e910a18e7 none swap sw $
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
/MEDIA/Movies1 /media/Movies1 cifs credentials=/root/.smbcredentials,iochars$
lucana@laptop:~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces... [ OK ]
lucana@laptop:~$ sudo mount -a
mount error: improperly formatted UNC name. /MEDIA/Movies1 does not begin with \\ or //
No ip address specified and hostname not found
lucana@laptop:~$
*edit*
I also tried with this:
//MEDIA/Movies1 /media/Movies1 cifs credentials=/root/.smbcredentials,iochars$
but got this:
lucana@laptop:~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces... [ OK ]
lucana@laptop:~$ sudo mount -a
Password:
retrying with upper case share name
mount error 6 = No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
lucana@laptop:~$
dmizer
April 9th, 2008, 01:58 AM
mount error: improperly formatted UNC name. /MEDIA/Movies1 does not begin with \\ or //
No ip address specified and hostname not found
lucana@laptop:~$
oops :( i made a typing mistake ... sorry.
edit the fstab so there are two "/" marks in front of MEDIA like so:
//MEDIA/Movies1 /media/Movies1 cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
then try:
sudo /etc/init.d/networking restart
again
love2learn
April 9th, 2008, 02:05 AM
check my edit above, we must be typing at the same time ;)
dmizer
April 9th, 2008, 02:08 AM
indeed it appears as though we were.
okay ... what's the output of this:
ls /media
and this:
ping MEDIA
(you can stop the ping by hitting <ctrl>+c
love2learn
April 9th, 2008, 02:10 AM
lucana@laptop:~$ ls /media
cdrom cdrom0 movies movies1 Movies1
lucana@laptop:~$ ping MEDIA
PING MEDIA (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_seq=1 ttl=128 time=0.788 ms
64 bytes from 192.168.1.100: icmp_seq=2 ttl=128 time=0.888 ms
64 bytes from 192.168.1.100: icmp_seq=3 ttl=128 time=0.797 ms
dmizer
April 9th, 2008, 02:31 AM
okay ... try this:
sudo aptitude install smbfs
also this:
sudo mount -v /media/Movies1
dmizer
April 9th, 2008, 02:38 AM
couple more questions ... can you post the output of:
sudo cat /root/.smbcredentials
(be sure to replace your password with stars "*")
also, are you using opendns domain servers?
love2learn
April 9th, 2008, 02:45 AM
lucana@laptop:~$ sudo aptitude install smbfs
[sudo] password for lucana:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... 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
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
lucana@laptop:~$ sudo mount -v /media/Movies1
parsing options: rw,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
Password:
mount.cifs kernel mount options unc=//MEDIA\Movies1,ip=192.168.1.100,user=root,pass=***, ver=1,rw,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
retrying with upper case share name
mount.cifs kernel mount options unc=//MEDIA\MOVIES1,ip=192.168.1.100,user=root,pass=**,v er=1,rw,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
mount error 6 = No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
lucana@laptop:~$ sudo cat /root/.smbcredentials
lucana=lucana
**=**
lucana@laptop:~$
and to the asked question. I dont know? Its not windows server or a server application it is just shared folders/drives on windows xp.
I have to go to work now but ill be looking forward to your post. Thanks a bunch already
dmizer
April 9th, 2008, 02:50 AM
ah ah! your smbcredentials file is wrong.
it should read like so:
username=lucana
password=**
(replace "**" with your actual windows password)
opendns is something you would have needed to implement manually. so, if you don't know what it is, you aren't likely using it. besides, i think the smbcredentials file edit will fix your problem.
love2learn
April 10th, 2008, 04:25 AM
still having the sudo mount -a error. this information is after editing the smbcredentials file.
okay, edited credentials to look like this:
lucana@laptop:~$ sudo cat /root/.smbcredentials
username=lucana
password=** (password edited)
lucana@laptop:~$
fstab is:
//MEDIA/Movies1 /media/Movies1 cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
sudo mount -a is:
lucana@laptop:~$ sudo mount -a
retrying with upper case share name
mount error 6 = No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
lucana@laptop:~$
sudo mount -v /media/Movies1 is:
lucana@laptop:~$ sudo mount -v /media/Movies1
parsing options: rw,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
mount.cifs kernel mount options unc=//MEDIA\Movies1,ip=192.168.1.100,user=lucana,pass=** *,ver=1,rw,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
retrying with upper case share name
mount.cifs kernel mount options unc=//MEDIA\MOVIES1,ip=192.168.1.100,user=lucana,pass=** *,ver=1,rw,credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777
mount error 6 = No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
ping media is:
lucana@laptop:~$ ping MEDIA
PING MEDIA (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_seq=1 ttl=128 time=1.33 ms
64 bytes from 192.168.1.100: icmp_seq=2 ttl=128 time=1.34 ms
64 bytes from 192.168.1.100: icmp_seq=3 ttl=128 time=1.43 ms
--- MEDIA ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 10207ms
rtt min/avg/max/mdev = 1.330/1.372/1.439/0.056 ms
lucana@laptop:~$
ls media is:
lucana@laptop:~$ ls /media
cdrom cdrom0 movies movies1 Movies1
smbtree is:
lucana@laptop:~$ smbtree
Password:
CHOPPERS
\\MEDIA Server
\\MEDIA\Movies2 (F)
\\MEDIA\C$ Default share
\\MEDIA\ADMIN$ Remote Admin
\\MEDIA\Music (E)
\\MEDIA\F$ Default share
\\MEDIA\Movies1 (D)
\\MEDIA\SharedDocs
\\MEDIA\D$ Default share
\\MEDIA\IPC$ Remote IPC
\\MEDIA\E$ Default share
\\LAPTOP Samba 3.0.26a
\\LAPTOP\IPC$ IPC Service (Samba 3.0.26a)
lucana@laptop:~$
let me know if posting all this information is annoying. Since I cant really help with the troubleshooting train of thought, I want to be as helpfull as possible.
Het Irv
April 10th, 2008, 02:39 PM
I am running Hardy Beta, and I am having trouble. I followed this How-To (https://help.ubuntu.com/community/MountWindowsSharesPermanently) because it looked simpler than yours (no offense).
When I try to remount my drives I get this error message:hetirv@hetirv-laptop:~$ sudo mount -a
mount error: can not change directory into mount target /mnt/net
here is the fstab line//svspec30/net$ /mnt/net smbfs credentials=/home/hetirv/.smbcredentials,uid=1000 0 0
love2learn
April 10th, 2008, 03:55 PM
that is weird, that is the same install I started to follow before I followed dmizers. I wonder if it has anything to do with the chmod we did to the smb file? I dont know what I am talking about but just seems like the step that dmizers didnt have?
love2learn
April 10th, 2008, 04:01 PM
yeah, this seems to be the only thing that is different as far as the same steps go.
dmizer's how to
sudo chmod 700 /root/.smbcredentials
other how to
sudo chown root .smbcredentials
sudo chmod 600 .smbcredentials
Dunno, I am too new to linux to be of major help.
Het Irv
April 10th, 2008, 04:25 PM
I'm not in Ubuntu right now, but in doing some research:
chmod 600 file A private file only changeable by the user who entered this command.
chmod 700 file Protects a file against any access from other users, while the issuing user still has full access.
It seems like it should work either way, the difference is only in how the write permissions are given.
I also have something weird in my /etc/nsswitch.conf file. I will post the line once I get back into Ubuntu.
Het Irv
April 10th, 2008, 05:46 PM
Here is the line from /etc/nsswitch.conf
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
dmizer
April 10th, 2008, 07:32 PM
still having the sudo mount -a error. this information is after editing the smbcredentials file.
okay ... your mount should work fine. the only thing i can think of now that could be preventing you access is a firewall either on your ubuntu machine (firestarter) or on your remote windows machine. please try disabling any firewalls you may have active (norton, mcafee, XP native firewall ...), and then try the mount again.
dmizer
April 10th, 2008, 07:50 PM
I am running Hardy Beta, and I am having trouble. I followed this How-To (https://help.ubuntu.com/community/MountWindowsSharesPermanently) because it looked simpler than yours (no offense).
When I try to remount my drives I get this error message:hetirv@hetirv-laptop:~$ sudo mount -a
mount error: can not change directory into mount target /mnt/net
here is the fstab line//svspec30/net$ /mnt/net smbfs credentials=/home/hetirv/.smbcredentials,uid=1000 0 0
no offense taken. important thing is that you get it to work.
try this:
sudo chmod 777 /mnt/net
sudo mount -a
Here is the line from /etc/nsswitch.conf
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
this is fine for an nsswitch.conf file. not all nsswitch.conf files are identical, which is why i said "something like this" in my howto.
Het Irv
April 11th, 2008, 09:01 AM
I figured out my problem.....:oops:
Remember kids, Linux is case sensitive.:lolflag:
/mnt/net was actually named /mnt/Net
dmizer
April 11th, 2008, 10:11 AM
I figured out my problem.....:oops:
Remember kids, Linux is case sensitive.:lolflag:
/mnt/net was actually named /mnt/Net
can't count how many times i've gotten stung by that bee myself! glad you got it going.
PhonicLynx
April 27th, 2008, 10:45 AM
I am trying to automount a few CIFS shares with no luck:
//server/Music /media/music cifs guest,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
//server/Nathaniel$ /home/nat/server cifs guest,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
is giving the result
mount: wrong fs type, bad option, bad superblock on //server/Music,
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
mount: wrong fs type, bad option, bad superblock on //server/Nathaniel$,
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
where have I gone wrong.. just installed 8.04
dmizer
April 27th, 2008, 11:36 AM
did you perform this step?
sudo aptitude install smbfs
this howto works on my current hardy install.
PhonicLynx
April 27th, 2008, 09:24 PM
*runs away hides because he didint see that line in the mountain of forums*
Thsnks for you help ;) :) it works nicely now.
dmizer
April 27th, 2008, 09:29 PM
*runs away hides because he didint see that line in the mountain of forums*
Thsnks for you help ;) :) it works nicely now.
heh ... glad to hear it. enjoy your new found network freedom.
jcr1
April 29th, 2008, 04:14 PM
Hello,
Have been trying this method out on my Freecom Network Drive with is wired into my router, and I am trying to access through wireless connection from my laptop. I can access the control panel of the nas so no problems there...just struggling to mount it.
I am trying the following (and getting the included error):
jonr@jonr-laptop:/media$ sudo mount -t cifs //STORAGE/nas /media/nas -o username=*****,password=*******,iocharset=utf8,fil e_mode=0777,dir_mode=0777
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
earthenergie
April 30th, 2008, 09:14 AM
Thank you for these well-written instructions. Perhaps you can help me with this problem. After mounting, I can change directory ( to several levels in the mount), create directory and list directories. But if I try to read a file (with cat or more) the terminal hangs following error in kern.log:
CIFS VFS: RFC1001 size 135 bigger than SMB for Mid=48
Bad SMB: : dump of 48 bytes of data at 0xdebff380
I am running a fully patched Hardy and my /etc/fstab entry for the mount is:
//abcdef/HOME /media/documents cifs auto,iocharset=utf8,uid=abc,gid=abc,credentials=/root/.cifscredentials,file_mode=0755,dir_mode=0755 0 0
I have searched in vain for clues as to where the fault may lie, but have had no success. Have you seen this type of error before?
Many thanks.
jcr1
April 30th, 2008, 03:51 PM
Now it has changed... now i am getting
mount error 20 = Not a directory
Whats happening?
Cheers,
Jon
jcr1
May 1st, 2008, 10:52 AM
OK got somewhere at last!
I can now mount using this method but there are a few niggles. I am currently just mounting manually.
- I can only mount if I perform a command which echo's a 0 into some file (can't remember the exact phrase at the mo) something like echo 0 > /xxx/fs/proc/LinuxExtendedSomethings
Once this has been done, then I can mount with the command as per the first post, BUT I have to do that echo thing every time, and it only works if I am root (i.e. sudo -i)
Once mounting, I have to perfom a chown on the nas directory everytime to get it to be read/write, otherwise I can't do anything with it.
As I said, these things need doing everytime. Will this be a problem if I mount permenantly?
Thanks
Arnfred
May 5th, 2008, 06:59 AM
Thanks to this guide I have gotten my samba network running nice and smoothly, so I'm very thankful for the hard work that must have gotten into making it.
When that is said one problem still remains; The files I create on a remote windows drive are only edible by root.
I can read/write all files fine when I mount the drive, but when I create a new file, permissions are set so only root can edit this file. I can change permissions on the file and happily continue my work, or I can remount the samba shares and the there wont be any problems, but if I create a file and put something in it, I can't save it because of permissions.
Is there any way to make sure new files I create are set with permissions so that I can edit them too?
I never encountered this in Gutsy with the same setup, but after installing hardy I can't seem to solve this problem.
jusuchin85
May 6th, 2008, 02:16 AM
Thanks for the great tip!
Apart from a minor problem after editing the "nsswitch.conf" in which made me not being able to used the 'apt-get' command (but able to fix it! :lolflag:), everything works great!
Now I can share my downloaded anime easily! Thanks again!
Kobalt
May 7th, 2008, 11:02 AM
Thanks a lot dmizer, now I have a fully integrated Ubuntu desktop at work :)
dmizer
May 7th, 2008, 11:30 AM
** sorry folks for the delay in my replies. i've been on a week long holiday **
[snip] But if I try to read a file (with cat or more) the terminal hangs following error in kern.log:
CIFS VFS: RFC1001 size 135 bigger than SMB for Mid=48
Bad SMB: : dump of 48 bytes of data at 0xdebff380
I have searched in vain for clues as to where the fault may lie, but have had no success. Have you seen this type of error before?
Many thanks.
i am terribly sorry, earthenergie. so far, i have also had no luck with this one. i will continue to search and let you know if i find something. you may try taking a stab at the samba irc channel (which is where i will head when i have some time): http://us1.samba.org/samba/irc.html
OK got somewhere at last!
I can now mount using this method but there are a few niggles. I am currently just mounting manually.
- I can only mount if I perform a command which echo's a 0 into some file (can't remember the exact phrase at the mo) something like echo 0 > /xxx/fs/proc/LinuxExtendedSomethings
Once this has been done, then I can mount with the command as per the first post, BUT I have to do that echo thing every time, and it only works if I am root (i.e. sudo -i)
Once mounting, I have to perfom a chown on the nas directory everytime to get it to be read/write, otherwise I can't do anything with it.
As I said, these things need doing everytime. Will this be a problem if I mount permenantly?
Thanks
mounting via fstab may solve some of your problems, and it may not. try it, and see what you end up with. also, after you mount the share (before you chown the directory), post the output of this command:
vdir /media/nas
Thanks to this guide I have gotten my samba network running nice and smoothly, so I'm very thankful for the hard work that must have gotten into making it.
When that is said one problem still remains; The files I create on a remote windows drive are only edible by root
[snip]
Is there any way to make sure new files I create are set with permissions so that I can edit them too?
same request as above. please post the output of:
vdir /mount/point
be sure to change /mount/point to your actual mounted directory on your ubuntu box.
bayvista
May 11th, 2008, 08:40 PM
Thanks Dmizer
I finally got my mount automated in Hardy. It would not go in Feisty. Just followed your excellent 'Howto'.
Keep up the good work and we'll beat Ubuntu yet.
:KS:KS:KS
dmizer
May 11th, 2008, 08:56 PM
Thanks Dmizer
I finally got my mount automated in Hardy. It would not go in Feisty. Just followed your excellent 'Howto'.
Keep up the good work and we'll beat Ubuntu yet.
:KS:KS:KS
that's very good to hear. i remember wrestling with your issues a month or two ago. wonder why it wouldn't happen in gutsy.
undfined
May 12th, 2008, 10:27 PM
Hmm. I got this command to work:
sudo mount -t cifs //192.168.10.100/music ~/Music -o username=myusername,password="mypassword",iocharset=utf8,file_mode=0777,dir_mode=0777
But this won't go in fstab:
# /home/myusername/music
//192.168.10.100/music /home/myusername/Music cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
When I mount I get this:
me@hardylaptop:~$ sudo mount -a
[sudo] password for username:
mount: wrong fs type, bad option, bad superblock on //w.x.y.z/music,
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
dmesg | tail gives this:
[ 114.574932] CIFS VFS: No username specified
[ 114.574945] CIFS VFS: cifs_mount failed w/return code = -22
/root/.smbcredentials contains a proper username and password, which are also defined appropriately.
Any thoughts?
dmizer
May 12th, 2008, 10:34 PM
yes, check the formatting of your credentials file. it must not contain spaces, and there must be a line break between the username and password entries, just like this:
username=winusername
password=winpassword
undfined
May 12th, 2008, 11:21 PM
yes, check the formatting of your credentials file. it must not contain spaces, and there must be a line break between the username and password entries, just like this:
username=winusername
password=winpassword
Yep. Double checked that again in nano. Still get the same problem.
Does Hardy read fstab differently?
What's the syntax to just put in the username and password into fstab directly?
=======EDIT=======
Nevermind. smbfs had choked on install and I had overlooked it.
I also had quotes around the password in the .smbcredentials file, since that's what worked under the mount command.
Thanks for the write up and the helping hand. I'm all square now. :D
And for what it's worth, the cifs mount is a workaround for this bug: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/217137
=======EDIT2=======
Shutdown is slower. Looks like the OS is waiting for the mounted volume to close. I'll try to figure that one out later - I'm happy for now.
dmizer
May 13th, 2008, 12:14 AM
Thanks for the write up and the helping hand. I'm all square now. :D
And for what it's worth, the cifs mount is a workaround for this bug: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/217137
good to hear! enjoy.
undfined
May 15th, 2008, 12:43 AM
good to hear! enjoy.
I am. :) Amarock (with mysql) is pretty cool.
Is there a way to unmount the folder(s) automatically upon shutdown or reboot?
My system hangs for a minute or two now, when I'm rebooting or shutting down. Looks like it's waiting for the folder to close out the connection (network issue). It's a small problem I can work with but I'd like to tidy it up. I haven't googled it yet but figure the solution is out there. Just figured I'd ask here first. 8-)
Thanks again. :)
dmizer
May 15th, 2008, 12:50 AM
I am. :) Amarock (with mysql) is pretty cool.
Is there a way to unmount the folder(s) automatically upon shutdown or reboot?
My system hangs for a minute or two now, when I'm rebooting or shutting down. Looks like it's waiting for the folder to close out the connection (network issue). It's a small problem I can work with but I'd like to tidy it up. I haven't googled it yet but figure the solution is out there. Just figured I'd ask here first. 8-)
Thanks again. :)
yup, even already linked in the howto ;)
http://ubuntuforums.org/showthread.php?t=293513
undfined
May 16th, 2008, 02:24 AM
yup, even already linked in the howto ;)
http://ubuntuforums.org/showthread.php?t=293513
I'm a slacker who should have looked & figured it out.
You're the man.
Got it working just fine. 8-)
Dionikon
May 18th, 2008, 09:44 AM
I'm trying to connect an Airport Extreme disk to my Ubuntu box. I have Mythtv running on it and want to use the airport disk as one of my media stores.
I can connect to the box in the GUI without any problems but I need it to be there all the time.
If I try to manually connect using smbfs in the terminal I can do so but it requests a password, I simply hit enter and it connects. My disk allows guest read and write access.
I have put this line into my fstab file (I'm sure it's wrong but I've been tinkering with different variants for a while now )
//192.168.1.250/MediaVault /media/media cifs guest
My dmesg has this as the last line:
[19709.469887] CIFS VFS: cifs_mount failed w/return code = -13
If I attempt to run this:
sudo mount //192.168.1.250/MediaVault /media/media cifs guest
I get a list of options so I'm sure that's not right either.
Any ideas on how I should proceed?
dmizer
May 18th, 2008, 09:59 AM
this is a permissions issue with the airport extreme disk. it's not allowing your guest to access. do you have zero credentials access on the airport disk? no username or password at all? are you positively sure of this? (many people don't realize that they have a password for their email because their browser or email client is set to remember it for them).
if credentials are not required for accessing your airport disk, the best i can do is search for cifs compatibility with your specific model. and the answer will most likely result in you needing to hack your airport extreme nas device. if you're interested in such a solution, please post the exact model number of your nas device, and i'll see if i can find something. or, if you so desire, you can search on your own.
Dionikon
May 18th, 2008, 05:32 PM
Yes, I'm sure.
I used a password for some time on this disk but either the airport or my Mac seemed to lose the ability to authenticate with each other randomly, so I turned off all passwords.
I think I might have to turn the authentication back on though, I found another thread that mentioned the airport wont work using guest access, but if you set it to require a username and password it works fine. I'll try this and report back. :)
http://ubuntuforums.org/showthread.php?t=405541&page=2
Although hacking the airport does sound interesting. lol
dmizer
May 19th, 2008, 10:22 PM
Yes, I'm sure.
I used a password for some time on this disk but either the airport or my Mac seemed to lose the ability to authenticate with each other randomly, so I turned off all passwords.
[snip]
i added a possible fix for you under "After word" in the howto. try using the following fstab line for mounting your airport extreme nas:
//192.168.1.250/MediaVault /media/media cifs guest,rw,nounix,file_mode=0777,dir_mode=0777 0 0
Dionikon
May 20th, 2008, 08:33 AM
Hi again,
I added this to my fstab
//192.168.1.250/MediaVault /var/lib/mythtv/videos/airdisk cifs guest,rw,nounix,file_mode=0777,dir_mode=0777 0 0
When I then try to run this:
sudo mount -a
I get this:
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
dmesg | tail shows this:
[88852.904234] sd 7:0:0:0: Attached scsi generic sg2 type 0
[98891.018983] CIFS VFS: RFC1001 size 39 bigger than SMB for Mid=367
[98891.018991] Bad SMB: : dump of 48 bytes of data at 0xf6e521c0
[98891.018996] 00000027 424d53ff 00000074 00018800 ' . . . ? S M B t . . . . . . .
[98891.019000] 00000000 00000000 00000000 49aa0000 . . . . . . . . . . . . . . ? I
[98891.019005] 016f0000 0000ff03 00000000 00000000 . . o . . ? . . . . . . . . . .
[98907.283953] CIFS VFS: server not responding
[98907.283960] CIFS VFS: No response to cmd 116 mid 367
[98929.135736] CIFS VFS: Send error in SessSetup = -13
[98929.267819] CIFS VFS: cifs_mount failed w/return code = -13
I would rather not have to activate accounts on the airport as my g/f would then have problems connecting to it, purely due to it being more difficult to do, not for any technical reasons ;) But it's not looking promising at this stage.
I have re-checked the disk setup, I have a disk password set up, but have allowed guest read and write access. IIRC this is because if I change the permission setup on the drive it means all the files become inaccessible (or at least I can't see them when I do this. I think this could be because the airport setup moves the files into different folders. I'll have to do some testing I think.
Interestingly I can manually mount the drive using this:
sudo mount //192.168.1.250/mediavault /var/lib/mythtv/videos/airdisk
Then I need to enter the disk password, otherwise I get a permissions error.
I assume that I could potentially authenticate in this manner using fstab, but would need to figure out what the user name to use would be, I'm sure I've read something about this somewhere, just can't remember where exactly.
dmizer
May 20th, 2008, 08:58 AM
actually i have one more shot. determnine what windows domain the airport is located on. (not sure how to tell you to do that). then use this command for mount:
//192.168.1.250/MediaVault /var/lib/mythtv/videos/airdisk cifs guest,rw,domain=airportdomain,nounix,file_mode=077 7,dir_mode=0777 0 0
replace airportdomain with the actual windows domain your airport is located on.
found this (~http://www.oreillynet.com/mac/blog/2007/01/airport_disk_easy_network_stor.html):
This can easily be found by clicking on the internet button in the Airport utility and will say domain name next to it.
xoppaw
May 20th, 2008, 11:53 AM
hopefully someone here can help me out. I have followed the instructions to do this and it works pretty well but here is my situation:
I'm running rtorrent on an ubuntu server that mounts 2 windows shares, one called tor and one called download the tor directory is the watch dir for rtorrent. I can cd /home/tor and it shows the files same with /home/downloads. But when I open rtorrent and it loads the file from /home/tor/ I get this error:
Storage error: [File chunk write error: Success.]
Is this something to do with improper permissions?
Here is a copy of my fstab file:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=5def278e-edf0-4afa-91dd-ca5254ca27b2 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda5
UUID=ecffe6a6-a032-44ce-961a-e2e7fd3b1876 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
//NERDY/download /home/maddox/downloads cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=07$
//NERDY/tor /home/maddox/tor cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
also I just noticed this in rtorrent:
(20:31:23) Could not open file "./downloads/Cooking With Lasers/cooking with lasers.jpg": Permission denied
(20:31:43) Could not create directory './downloads/Cooking With Lasers': No such file or directory
(20:31:47) Could not create directory './downloads/Cooking With Lasers': No such file or directory
(20:31:47) Could not create directory './downloads/Cooking With Lasers': No such file or directory
do does this mean rtorrent is having trouble creating the dir?
dmizer
May 20th, 2008, 06:17 PM
xoppaw,
what was the exact command you used to create the /home/maddox/tor directory? or did you create the directory from nautilus?
please post the output of:
vdir /home/maddox/tor
xoppaw
May 20th, 2008, 06:30 PM
xoppaw,
what was the exact command you used to create the /home/maddox/tor directory? or did you create the directory from nautilus?
please post the output of:
vdir /home/maddox/tor
i used a mkdir command to make the directory initially. i'm all command line on this server so i didn't use nautilus
when i do the command listed it shows
total 24
-rwxrwxrwx 1 root root 21263 2008-05-20 17:28 Paul\ Westerberg\ -\ Besterberg\ -\ The\ Best\ of\ Paul\ Westerberg\ -\ 2005\ (CD\ -\ FLAC\ -\ Lossless).torrent
thanks for the quick response
dmizer
May 20th, 2008, 07:30 PM
actually, try this:
sudo umount /home/maddox/tor
sudo chmod 777 /home/maddox/tor
sudo mount -a
and repost the output of:
vdir /home/maddox/tor
is the remote server windows, or ubuntu?
xoppaw
May 20th, 2008, 07:51 PM
total 24
-rwxrwxrwx 1 root root 21263 2008-05-20 17:28 Paul\ Westerberg\ -\ Besterberg\ -\ The\ Best\ of\ Paul\ Westerberg\ -\ 2005\ (CD\ -\ FLAC\ -\ Lossless).torrent
the remote server is a windows vista box
dmizer
May 20th, 2008, 08:23 PM
strange, it's still mounting with root permissions.
try this:
sudo umount /home/maddox/tor
sudo mkdir /tmp/tor
sudo chmod 777 /tmp/tor
change your /etc/fstab line to this:
//NERDY/tor /tmp/tor cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_ mode=0777 0 0
then perform this command again
sudo mount -a
vdir /tmp/tor
also, post the output of:
smbtree
xoppaw
May 20th, 2008, 08:31 PM
maddox@SEEDBOX:~$ sudo mount -a
mount error: can not change directory into mount target /temp/tor
i get this error message when i go to remout the device using sudo mount -a
output from smbtree
maddox@SEEDBOX:~$ smbtree
Password:
Receiving SMB: Server stopped responding
anonymous failed session setup with NT_STATUS_IO_TIMEOUT
Receiving SMB: Server stopped responding
failed negprot
dmizer
May 20th, 2008, 08:32 PM
no ... not /temp ... /tmp ;)
xoppaw
May 20th, 2008, 08:35 PM
brilliant!
maddox@SEEDBOX:~$ vdir /tmp/tor/
total 24
-rwxrwxrwx 1 root root 21263 2008-05-20 17:28 Paul\ Westerberg\ -\ Besterberg\ -\ The\ Best\ of\ Paul\ Westerberg\ -\ 2005\ (CD\ -\ FLAC\ -\ Lossless).torrent
smbtree
maddox@SEEDBOX:~$ smbtree
Password:
Receiving SMB: Server stopped responding
anonymous failed session setup with NT_STATUS_IO_TIMEOUT
WORKGROUP
\\SEEDBOX SEEDBOX server (Samba, Ubuntu)
\\SEEDBOX\IPC$ IPC Service (SEEDBOX server (Samba, Ubuntu))
\\SEEDBOX\print$ Printer Drivers
maddox@SEEDBOX:~$
dmizer
May 20th, 2008, 08:46 PM
humm, your vista server is not showing up in your list. that will be why you cannot mount without root permissions.
are you sure that the vista box is in the "WORKGROUP" workgroup? if so, there may be a firewall issue on the vista box. it's possible that you could connect properly if mount via ip address rather than hostname. you could also try a couple of different options like so:
//nerdy.ip.address.here/tor /home/maddox/tor cifs credentials=/root/.smbcredentials,nounix,rw,iocharset=utf8,file_mode =0777,dir_mode=0777 0 0
of course, change nerdy.ip.address.here to nerdy's actual ip address on the network.
look for something other than root when listing the vdir.
if none of this works, i suggest taking a deeper look into your visa configuration.
xoppaw
May 20th, 2008, 08:49 PM
humm, your vista server is not showing up in your list. that will be why you cannot mount without root permissions.
are you sure that the vista box is in the "WORKGROUP" workgroup? if so, there may be a firewall issue on the vista box. it's possible that you could connect properly if mount via ip address rather than hostname. you could also try a couple of different options like so:
//nerdy.ip.address.here/tor /home/maddox/tor cifs credentials=/root/.smbcredentials,nounix,rw,iocharset=utf8,file_mode =0777,dir_mode=0777 0 0
of course, change nerdy.ip.address.here to nerdy's actual ip address on the network.
look for something other than root when listing the vdir.
if none of this works, i suggest taking a deeper look into your visa configuration.
how would i go about changing the workgroup that my ubuntu box is in? i think that this may be the issue b/c my windows box is in a different workgroup...i didnt' even that of that as an option
also i had previously had this set up using smbfs and the ip addresses and had the trouble. i could try ip addresses with cifs but i think i will address the workgroup issue first
dmizer
May 20th, 2008, 08:57 PM
regarding changing the workgroup in server ...
is there anything in /etc/samba/smb.conf?
if so, change your workgroup on this line:
workgroup = vistaworkgrouphere
then restart your samba server:
sudo /etc/init.d/samba restart
then check the output of smbtree to see if your vista machine appears.
edit:
alternatively, it may be less trouble to change your vista machine to the WORKGROUP workgroup ;)
xoppaw
May 21st, 2008, 08:21 PM
regarding changing the workgroup in server ...
is there anything in /etc/samba/smb.conf?
if so, change your workgroup on this line:
workgroup = vistaworkgrouphere
then restart your samba server:
sudo /etc/init.d/samba restart
then check the output of smbtree to see if your vista machine appears.
edit:
alternatively, it may be less trouble to change your vista machine to the WORKGROUP workgroup ;)
well i added the ubuntu box to the right workgroup. but when i do a vdir it still is showing that it is being accessed by root. and now i'm getting an error that permission is denied. maybe my offbox rtorrent won't work so well.
dmizer
May 21st, 2008, 08:39 PM
when you do smbtree now, do you see the vista computer in the tree?
xoppaw
May 21st, 2008, 09:03 PM
yeah the vista computer shows up now.
dmizer
May 21st, 2008, 09:17 PM
are you using the exact same username on both the ubuntu and vista machines?
edit:
also, do you have the root login enabled on the ubuntu machine?
xoppaw
May 21st, 2008, 09:40 PM
are you using the exact same username on both the ubuntu and vista machines?
edit:
also, do you have the root login enabled on the ubuntu machine?
i have created a specific account for rtorrent in vista with full privileges to the files tor and download. i'm not sure if the root account is enabled on my ubuntu server, i have never tried to log into root and never set a password for it that i can think of
dmizer
May 21st, 2008, 09:51 PM
the rtorrent account has little to do with cifs. the account you should add to your vista machine is your ubuntu user because that's the account that has to negotiate the permissions for the share.
so, if your ubuntu user account has been added to your vista machine, and your current fstab line looks like this:
//NERDY/tor /home/maddox/tor cifs credentials=/root/.smbcredentials,nounix,rw,iocharset=utf8,file_mode =0777,dir_mode=0777 0 0
then about the only thing i have left to suggest to you is to look into your vista setup.
xoppaw
May 21st, 2008, 10:19 PM
that is kind of what i was starting to think after all that i have done with this. i didn't have any problems setting this type stuff up on xp, but vista is making this a real pain
Krydahl
May 30th, 2008, 09:34 AM
xoppaw - I was having a similar problem with vdir reporting the share mounted as root. I've now fixed it by adding uid=<username> to my line in fstab.
Unfortunately this does not fix the real problem I'm having. When I try to edit a document on the smb share (using openoffice) I get:
Error saving the document <whatever>:
General input/output error while accessing <pathname>
I had assumed this was a permissions issue, but it may be an openoffice problem. I just tried editing an image with GIMP and that seemed to work fine.
Any ideas anyone?
dmizer
May 30th, 2008, 12:42 PM
xoppaw - I was having a similar problem with vdir reporting the share mounted as root. I've now fixed it by adding uid=<username> to my line in fstab.
Unfortunately this does not fix the real problem I'm having. When I try to edit a document on the smb share (using openoffice) I get:
Error saving the document <whatever>:
General input/output error while accessing <pathname>
I had assumed this was a permissions issue, but it may be an openoffice problem. I just tried editing an image with GIMP and that seemed to work fine.
Any ideas anyone?
There is a very similar bug report open for gedit at the moment, i think you'll get helpful information from it: https://bugs.launchpad.net/gedit/+bug/34813
Krydahl
May 30th, 2008, 01:38 PM
Interesting, thanks. I've only skimmed through it so far, but I post back if I get anywhere on a closer look.
boardman
May 31st, 2008, 04:33 AM
Hi dmizer,
As your post is the no.1 hit on google for "ubuntu mount cifs" I thought I would add my experience as it may help someone else.
I am using Hardy and have a dlink 323 NAS.
When I tried the suggestions in your first post (incl. the 'nounix' part) it mounted but if I tried to copy and paste a file it would complain about permissions denied.
Other times files would paste but I would get errors that files had not been copied successfully. Either way the file had a little lock icon on it.
Even stranger was that I could create,delete and rename files but I could not edit a file and save the changes in gedit (though this could be a gedit problem looking at a few posts around).
In the end what mostly fixed my problem was when I made my fstab line look like this:
//<NAS_IP_ADDR>/<SHARE> /media/<MOUNT_DIR> cifs credentials=/root/.smbcredentials,rw,noperm,file_mode=0777,dir_mode= 0777,domain=<COMPUTER NAME> 0 0
This is the result of much googling and experimentation (all built on top of your very clear and helpful post at the beginning of this thread). I don't know what the noperm part is but without it this does not work.
This very oddly makes it so that the shared volume is fully read/write BUT the subdirectories are all read only.
CIFS is the most frustrating thing ever!
dmizer
May 31st, 2008, 07:50 AM
thank you for your very informative post, boardman.
i have had some limited success with a possible solution for your subdirectory ro issue.
if you could post the output of:
ls -l /media/<MOUNT_DIR>/
it could shed some light on why you cannot write to your sub directories.
Irwin J. Finster
May 31st, 2008, 02:46 PM
Hi dmizer thank you for referring me to your great guide, unfortunately I am a total noob to this, and after following your guide I get this error message:
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
When I enter man mount.cifs I can't find a description what mount error 13 means and what causes it.
I am using a Lacie Ethernet Disk and when I go to places, network, I can see the disk, as well as the windows pc.
I tried to mount the public folder on my Vista PC with the same paramters and this works fine
Thanks for any help,,,
Sorry to bother you, found out the problem myself, was just a typo when entering the password for the NAS... :-)
dyerseve5867
May 31st, 2008, 05:11 PM
Hi,
My problem with cifs mount is that it won't resolve netbios names. It tries to resolve using dns instead and gets the wrong addresses. I fixed this problem for smbclient by changing smb.conf to say
name resolve order = lmhosts bcast host wins
putting bcast before host. nmblookup works fine, and
sudo mount -t cifs //192.168.1.149/e /mnt/whatever
works fine, but if I replace the IP with the netbios name I get
mount error 111 = Connection refused
Any ideas?
boardman
May 31st, 2008, 05:40 PM
Hi dmizer,
I tried a few things and the results are below. It does not seem to matter what I do I get pretty much the same result.
fstab line: //192.168.1.99/other /media/toaster/other cifs credentials=/root/.smbcredentials,rw,nounix,file_mode=0777,dir_mode= 0777 0 0
Share Result: Pastes but is read only. Oddly for a readonly file it can't be edited but can be deleted!
SubDir Result: Permission Denied.
permission on subdir: drwxrwxrwx 2 root root 0 2008-01-28 20:57 utils
fstab line: //192.168.1.99/other /media/toaster/other cifs credentials=/root/.smbcredentials,rw,nounix,noperm,file_mode=0777,di r_mode=0777 0 0
Share Result: Pastes, no errors, file is read/write
SubDir Result: Permission Denied.
permission on subdir: drwxrwxrwx 2 root root 0 2008-01-28 20:57 utils
fstab line: //192.168.1.99/other /media/toaster/other cifs credentials=/root/.smbcredentials,rw,nounix,noperm,uid=<USERNAME>,gid=<USERNAME>,file_mode=0777,dir_mode=0777 0 0
Share Result: Pastes, no errors, file is read/write
SubDir Result: Permission Denied.
permission on subdir: drwxrwxrwx 1 <USER> <USER> 0 2008-01-28 20:57 utils
fstab line: //192.168.1.99/other /media/toaster/other cifs credentials=/root/.smbcredentials,rw,nounix,uid=<USERNAME>,gid=<USERNAME>,file_mode=0777,dir_mode=0777 0 0
Share Result: Pastes, no errors, file is read/write
SubDir Result: Permission Denied.
permission on subdir: drwxrwxrwx 1 <USER> <USER> 0 2008-01-28 20:57 utils
Possbily related: whenever I do anything at the commandline this pops up: unable to resolve host <COMPUTER NAME>
dmizer
May 31st, 2008, 08:45 PM
Sorry to bother you, found out the problem myself, was just a typo when entering the password for the NAS... :-)
no bother at all, i was quite asleep when you posted. glad you got it all worked out!
Hi,
My problem with cifs mount is that it won't resolve netbios names. It tries to resolve using dns instead and gets the wrong addresses. I fixed this problem for smbclient by changing smb.conf to say
name resolve order = lmhosts bcast host wins
putting bcast before host. nmblookup works fine, and
sudo mount -t cifs //192.168.1.149/e /mnt/whatever
works fine, but if I replace the IP with the netbios name I get
mount error 111 = Connection refused
Any ideas?
if you follow my howto from start to finish, you will end up with working name resolution. smb.conf ONLY handles sharing files from ubuntu to windows. it has nothing (or very little) to do with mounting windows shares on ubuntu.
Hi dmizer,
I tried a few things and the results are below. It does not seem to matter what I do I get pretty much the same result.
fstab line: //192.168.1.99/other /media/toaster/other cifs credentials=/root/.smbcredentials,rw,nounix,file_mode=0777,dir_mode= 0777 0 0
Share Result: Pastes but is read only. Oddly for a readonly file it can't be edited but can be deleted!
SubDir Result: Permission Denied.
permission on subdir: drwxrwxrwx 2 root root 0 2008-01-28 20:57 utils
fstab line: //192.168.1.99/other /media/toaster/other cifs credentials=/root/.smbcredentials,rw,nounix,noperm,file_mode=0777,di r_mode=0777 0 0
Share Result: Pastes, no errors, file is read/write
SubDir Result: Permission Denied.
permission on subdir: drwxrwxrwx 2 root root 0 2008-01-28 20:57 utils
fstab line: //192.168.1.99/other /media/toaster/other cifs credentials=/root/.smbcredentials,rw,nounix,noperm,uid=<USERNAME>,gid=<USERNAME>,file_mode=0777,dir_mode=0777 0 0
Share Result: Pastes, no errors, file is read/write
SubDir Result: Permission Denied.
permission on subdir: drwxrwxrwx 1 <USER> <USER> 0 2008-01-28 20:57 utils
fstab line: //192.168.1.99/other /media/toaster/other cifs credentials=/root/.smbcredentials,rw,nounix,uid=<USERNAME>,gid=<USERNAME>,file_mode=0777,dir_mode=0777 0 0
Share Result: Pastes, no errors, file is read/write
SubDir Result: Permission Denied.
permission on subdir: drwxrwxrwx 1 <USER> <USER> 0 2008-01-28 20:57 utils
Possbily related: whenever I do anything at the commandline this pops up: unable to resolve host <COMPUTER NAME>
please post your /etc/hosts file, and the output of:
hostname
also, you should configure your machine for windows netbios resolution so that you can mount by name instead of ip address, as that fixes many permissions problems.
boardman
June 1st, 2008, 04:57 AM
Hi dmizer.
I tried installing netbios. Initally I skipped that step as it was all working perfectly in Gutsy. I restarted and tried your initial examples (with nounix for hardy heron) and got the same results.
Permission denied on sub directories and either full r/w on the share folder itself or sort of read/file detail write.
If I type 'hostname' it returns : fridge
fridge is the name of my machine.
I have been looking at firmware for the DNS323 and it seems there is a new firmware out. In the readme it has this:
1. Migrate Samba from Samba 2.x to Samba 3.x to support Vista and Unicode.
The weirdness of the error and the fact no-one else seems to be having it leads me to beleive it is a problem with the Dlink rather than
Unfortunatly looking at the DNS323 wiki, once you go to the new firmware you cannot connect via smbfs so if cifs is still causing problems I have no fall back.
What I intend to try is getting it working via smbfs. If that fails I'll upgrade the firmware and try cifs again. Seems strage it used to work and now does not though.
Leslie
dmizer
June 1st, 2008, 07:07 AM
smbfs is not available in hardy. if you want to try smbfs, you will have to compile it from source. a better option may be for you to simply continue to use gutsy since it was working for you, and your upgrade broke. there's absolutely nothing wrong with gutsy, it's still a perfectly usable release.
otherwise, please post the contents of:
/etc/hosts
do you get permission denied from all programs or just from open office?
boardman
June 1st, 2008, 06:23 PM
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.
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 :)
dmizer
June 1st, 2008, 07:34 PM
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.
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:
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.
boardman
June 1st, 2008, 10:32 PM
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.
bobd72
June 4th, 2008, 10:28 PM
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=<MyWorkgroup>,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?
dmizer
June 4th, 2008, 10:35 PM
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:
sudo umount /media/windata
sudo mount /media/windata
tail /var/log/syslog
and post the output.
bobd72
June 4th, 2008, 11:03 PM
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=<MyWorkgroup>,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.
dmizer
June 5th, 2008, 12:06 AM
it's not reading the smb credentials file correctly for some reason.
try this ... post the output of:
sudo slocate .smb_credentials
bobd72
June 5th, 2008, 12:11 AM
bob@server2:/$ sudo slocate .smb_credentials
[sudo] password for bob:
sudo: slocate: command not found
dmizer
June 5th, 2008, 12:22 AM
well, let's install slocate then:
sudo aptitude install slocate
then update the slocate database:
sudo updatedb
reboot, and then try the search again:
sudo slocate .smb_credentials
bobd72
June 5th, 2008, 12:32 AM
OK - installed.
bob@server2:/$ sudo slocate .smb_credentials
/root/.smb_credentials
dmizer
June 5th, 2008, 12:43 AM
please pm me the output of:
sudo cat /root/.smb_credentials
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.