Results 1 to 4 of 4
Hi,
I want to automount a samba/cifs share that has a lethal special character in it. Does somebody know how to escape it properly?
//host/special&char/mp /mnt/mp/ smbfs credentials=/etc/samba/cred-file,uid=nobody,gid=somebody,file_mode=066,dir_mod e=077 0 ...
- 02-24-2011 #1
[SOLVED] fstab and special characters
Hi,
I want to automount a samba/cifs share that has a lethal special character in it. Does somebody know how to escape it properly?
I tried out://host/special&char/mp /mnt/mp/ smbfs credentials=/etc/samba/cred-file,uid=nobody,gid=somebody,file_mode=066,dir_mod e=077 0 0
- \& (this kind of escape works fine for spaces, but not the ampersand)
- \046 (this kind of escape works fine for spaces too, but again not the ampersand)
- Escape the samba uri (//host/special&char/mp) with " and ', didn't work either
It should somehow be possible, but I'm kind of too stupid to realize how.
- 02-24-2011 #2Just Joined!
- Join Date
- Mar 2005
- Location
- Sweden
- Posts
- 47
Maybe this can help you:
SAMBA and special characters (accents, ñ...) | NSFAQ (Not So Frequently Asked Questions)
- 02-25-2011 #3
Thanks for your feedback.
Unfortunatly this article proposes only to force a charset for the file and directory informations. This is not the problem I've got here.
My problem is caused by fstab (/etc/fstab) that does not accept mount lines that contain special characters like "&" (ampersand).
Somehow fstab should be able to handle mount targets that contain characters like "&" (ampersand).
BTW: I probably have found a workaround - which is to use autofs as there one has better control on the configuration files and thus more possibilities. But setting up autofs is a huge overhead for my rather small problem. That's why I refuse to configure it like that as long there could be another way.
EDIT: Just posted to the ubuntu mailing-users mailing list (see here).Last edited by Kloschüssel; 02-25-2011 at 06:39 AM.
- 02-25-2011 #4
Resolved. *banging head* All worked out fine once I used the octal ascii representation of all special characters.
SPACE = \040
AMPERSAND = \046
See Ascii Table - ASCII character codes and html, octal, hex and decimal chart conversion for a complete list.


