Broblem mounting an smbfs in fstab without username/pass and weird names
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Broblem mounting an smbfs in fstab without username/pass and weird names
Hi!
What I need:
there's this windows computer in our network, that has the shared folders 'MSK Archive' and 'MSK Uploads' .
As you can see, those names have a whitespace.
Additionally, i'd like to mount those folders in fstab, without username and password, but i don't know how to do this.
I'm assuming the quoting fixed it? If so can you specify which one did it so anyone perusing the thread in future will know without having to ask?
FYI: Quoting/escaping is sometimes more of an art than a science. Different utiltiies will use different things and sometimes you have to nest your quoting escaping and get really bizarre looking command lines just to get it right.
A perfect example:
How to pipe find output into xargs when some of the files have spaces in their names (Oracle is retarded - does this and also names thing "core" just to annoy *NIX users). Had to do this for refreshes on a regular basis.
The above command would list all files in the specified directory owned by the specifid user and change the owner to the new user specified. It would blow up because of spaces in files as it would think each space was a separate file.
This did not work though. After some discussion with a coworker we came up with:
find <dirname> -user <UID> |awk '{print "\""$0"\""} | xargs chown <newuser>
Basically had to "quote" the "escapes" that were "escaping" the following "quotes". (Aaaaaaaaaaaaaaaaaaaggggggggggggghhhhhhhhhh!)
On Unix there's a man page called "regexp" - you can find it on line to get some detail. Unfortunately my Linux distros don't have it. You have to do "man egrep" or "man awk" and search for Regular Expressions to get some info that way.
Most utilities that do any amount of text processing will indicate if they do Regular Expressions and also if they depart from its normal operation (see "man sed" for example) if they do.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.