Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Mount smb share with special characters in name

Posted on 2002-07-11
2
Medium Priority
?
2,188 Views
Last Modified: 2012-05-04
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!
0
Comment
Question by:porear
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
Techno__Mage earned 600 total points
ID: 7153474

I was able to successfully work the situation using your second format :  

//server/a\040\046\040bc /mnt/mountat smbfs noauto 0 0

You may or may not need to adjust the options column to something like "noauto,user,username=somewindowsuser"
0
 
LVL 5

Author Comment

by:porear
ID: 7155672
Actually, I left the details off on the original message, but I am using a credentials file so the form is

//server/a\040\046\040bc /mnt/mountat smbfs noauto, credentials=/root/credfile 0 0

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 0 0

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! :)
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question