porear
asked on
Mount smb share with special characters in name
I need to mount an NT smb network share from Linux that has special characters (ampersand & and spaces) in the name.
//server/a & bc
I can do this from a shell with quotes, as
mount -t smbfs "//server/a & bc" /mnt/mountat
but fstab will not accept such an entry:
"//server/a & bc" /mnt/mountat smbfs noauto 0 0
and I get a "bad line in fstab" error. The man page for fstab states that a space can be escaped with its octal ASCII code \040, but when leaving the ampersand or using its octal ASCII code \046, a browser pops up in KDE looking for navigation.realnames.com. ?? So neither of the following work in fstab:
//server/a\040&\040bc /mnt/mountat smbfs noauto 0 0
//server/a\040\046\040bc /mnt/mountat smbfs noauto 0 0
What format must I use in fstab to mount this share?? Thanks!
//server/a & bc
I can do this from a shell with quotes, as
mount -t smbfs "//server/a & bc" /mnt/mountat
but fstab will not accept such an entry:
"//server/a & bc" /mnt/mountat smbfs noauto 0 0
and I get a "bad line in fstab" error. The man page for fstab states that a space can be escaped with its octal ASCII code \040, but when leaving the ampersand or using its octal ASCII code \046, a browser pops up in KDE looking for navigation.realnames.com. ?? So neither of the following work in fstab:
//server/a\040&\040bc /mnt/mountat smbfs noauto 0 0
//server/a\040\046\040bc /mnt/mountat smbfs noauto 0 0
What format must I use in fstab to mount this share?? Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
//server/a\040\046\040bc /mnt/mountat smbfs noauto, credentials=/root/credfile
I just tried this method again, and for some reason a browser is still popping up in KDE and trying to navigate to http://navigation.realnames.com/resolver.dll.
I am trying to mount using a KDE desktop shortcut created by right clicking on the desktop, choosing "Create New" - "Hard Disc" and choosing the net mount point from the drop down list in the Device tab.
HOWEVER: although the desktop shortcut does not show to be successfully mounted, I looked at my mountat directory, and it really was mounted. ???? Upon checking, the same was true when not escaping the ampersand, as
//server/a\040&\040bc /mnt/mountat smbfs noauto, credentials=/root/credfile
So... I apparently have a problem with the KDE mount shortcut method and special characters. Thanks for the reply, I was doing better than I thought! :)