[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to get Linux to understand/translate windows shared drive letters links

Posted on 2011-05-10
8
Medium Priority
?
383 Views
Last Modified: 2012-05-11
Hi there,
this issue is a little hard to explain so bear with me. We have a windows network powered by a single Windows 2003 server. On that server are a number of folders shared to everyone in the company. There is also a logon script for the windows machines that maps those drives to drive letters locally. So there is an E drive, F drive etc.
Frequently the boss or someone else will email a link to a document referencing  one of those drives, like E:\somefolder\mydoc.doc.

So, the question is, is there any way I can get Ubuntu or Mac machines to see that link, convert it to a more friendly network share like \\servername\sharename\somefolder\mydoc.doc so that they are clickable?

This I think is the final step in finally ditching windows for Ubuntu/Fedora and Mac for a sizeable number in my company so any help would be much appreciated.
0
Comment
Question by:Slimshaneey
8 Comments
 
LVL 8

Expert Comment

by:DocSeltsam
ID: 35727363
Hi there,

you could put a script in the internal mail flow to translate such links, but this script
most likely will not get everything right and so be just a compromise.

 
Another way might be to mount the shared drives on the linux and mac boxes
and then put a symlink in the path of the users like

ln -s b: /smb/someserver/somedirectory

This, if \ are exchanged with / when writing mails, might work.



--TheDoctor
0
 
LVL 88

Accepted Solution

by:
rindi earned 501 total points
ID: 35727427
For one thing, most Linux browsers (like Konqueror etc), allow you to access shared files and folders directly by using the following syntax in the address bar:

smb://IPOfServer/ShareName/FolderName/

You will of course have to supply your username and password.

The filemanager also normally have a "Network" option from which you can directly access those files or folders after logging in.

Or you can mount the shares to different Linux folders and access them that way, ie:

sudo mount -t cifs username=UserName //IPOfServer/ShareName /media/FolderNameToMountTheShareOn
0
 
LVL 11

Author Comment

by:Slimshaneey
ID: 35727558
Thanks guys. I was hoping for something a little more elegant than "the user needs to write the links different". Im dealing with non-tech people who resist change at every turn. I was hoping for something like a way to intercept the protocol call, so it sees E:\something and doesnt know what to do, how would I tell it that I want say, this script to run which will translate the call into a nautilus command. Is that possible?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 11

Author Comment

by:Slimshaneey
ID: 35727584
Ah, just thinking about this, is this something I could do with Wine? So configure each of the drives in wine mapping the network drives to drive letters matching the windows machines, is there someway to then tell ubuntu to be able to see those E:\ drives as Wine drives?
0
 
LVL 88

Expert Comment

by:rindi
ID: 35727617
Wine isn't elegant and you would only be able to use those shares with Windows apps run within wine. In Linux just forget those stupid Drive Letters, they are very limited and therefore not elegant. The most "Elegant" way would be to just mount the shares and then access them directly as if they were on the Local Linux file-System like I mentioned above.
0
 
LVL 7

Assisted Solution

by:Piloute
Piloute earned 501 total points
ID: 35737498
Hi,

You need wine installed, then you can go for 'winepath' command :

http://wiki.winehq.org/winepath

Cheers,
P
0
 
LVL 8

Assisted Solution

by:eager
eager earned 498 total points
ID: 35738976
There are several different problems here.  

Drive letters:  You can map drive letters to specific file systems by doing the following:
  $  sudo mkdir /E:
  $  sudo mount server:/share /E:
  (You might need to use the mount command which rindl suggested.)

This assumes that the mapping between E: and a specific share is consistent across all machines, as is generally the case.

This allows you to access E:/somefolder/mydoc.doc which should be the same as on your Windows system.

This brings us to the second problem.  Windows uses back slashes in it's paths, while Linux uses forward slashes.  Worse, backslashes are interpreted as escape characters and are either converted to special characters or discarded when passed to a program.  It isn't difficult to translate the path by hand or within a bash or perl program, but I'm not aware of any email reader or web browser which does this automatically. Possibly there is an extension, but I'm not aware of one.

If people are willing to copy a link from email and paste it, you could write a small GUI frontend to Nautilus which translated the path and passes it along to the program.  It isn't easy to do this with a CLI command, since Bash will gobble up the back slashes.  

The third problem is handling \\servername\path.  If you can get past the path translation problem, you can use automount to connect to servername:/path.
0
 
LVL 11

Author Closing Comment

by:Slimshaneey
ID: 35980988
Thanks for the help, never did find a workable solution but thank you for the input anyway!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month18 days, 2 hours left to enroll

829 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