Resolving an alias to a remote server

-1

I have what I think is called an IP alias, which is used to access a Windows file server from a Unix server. The path on Unix looks something like:

/folder/file.txt

which is somehow resolved as:

\\server\folder\file.txt

This is used within an ftp command from a SAS program running on Unix. I know very little about Unix, but I believe the alias is configured on Unix itself (not by the SAS server). As a normal (non-root) user, is there a way of looking up this alias and seeing the IP address it refers to? Or even better, a list of aliases and their IP addresses?

Perhaps I'm using the wrong terminology? My Google searches have turned up command aliases, but otherwise I've found very little helpful information.

JDB still remembers Monica

Posted 2013-03-06T21:40:05.277

Reputation: 154

Question was closed 2013-05-18T00:28:52.147

2Questions about Unix and Linux are equally on topic here and should not be migrated away. However, if you don't get an answer within, say a few days, feel free to have it migrated there by flagging again. Cheers – slhck – 2013-03-06T22:07:31.960

1@slhck - Thanks. Didn't want to open a second, identical question on another site. The suggestion above is reasonable. – JDB still remembers Monica – 2013-03-06T22:14:13.733

Now reposted on [unix.se]: http://unix.stackexchange.com/questions/76130/resolving-an-alias-to-a-remote-server

– Gilles 'SO- stop being evil' – 2013-05-17T22:41:18.843

Answers

1

Unix lets you mount filesystems, including remote filesystems, under directories on your system. This is similar to the way you can attach a remote filesystem as a drive on your windows machine, e.g. creating a Z: that refers to \\server\folder. Instead of using drive letters, we have directories that refer to filesystems. So /folder could be a remote mount of a shared folder on the Windows file server, i.e. \\server\folder. Run the mount command, it will show you currently mounted filesystems, including remote ones. Also, do cat /etc/fstab and look for a line like

//192.168.0.244/Public  /networkstorage cifs    rw,user,noauto,guest  0 0

where //192.168.0.244/Public stands for \\192.168.0.244\Public and /networkstorage is the "mountpoint", the place in the Unix filesystem where the remote filesystem is attached.

IP aliases are something entirely different. Command aliases are not what you want either.

wingedsubmariner

Posted 2013-03-06T21:40:05.277

Reputation: 1 432

mount gave me a list, but it does not include the mounts that I use in the SAS program. I don't have access to /etc/fstab. Clearly I'll need to work this out with the admins. Thanks though. – JDB still remembers Monica – 2013-05-18T04:33:42.330

0

If the alias is defined on the Unix system, it should be in /etc/hosts.  Try using grep to search for the server name in /etc/hosts, or just browse the whole file to see all aliases that are defined there.

Scott

Posted 2013-03-06T21:40:05.277

Reputation: 17 653

I actually tried that, but I thought I must have been mistaken because I couldn't find the alias there. (I used vi to search for "folder" and got nothin') – JDB still remembers Monica – 2013-03-07T22:22:20.357

Oops; I misread your question.  I thought you were using an alias for the server name when you accessed the file on the server.  If the server’s folder directory is showing up on the Unix system as /folder, then the Unix system probably has it mounted (as a remote file system).  Type mount (or /etc/mount, if you get a “not found” error) and see whether you see server listed. – Scott – 2013-03-07T22:41:23.033