How to access a share on an NT Server from Linux
Posted: 9/23/1999 6:55:22 PM
By: Comfortably Anonymous
Times Read: 2,134
0 Dislikes: 0
Topic: Linux
Parent Message
Yes, it CAN be done. And it's quite easy once you figure it out! It's all done with SAMBA (AKA SMB). (It's best to try this first logged in as ROOT)

Here's how:

1) Edit your /etc/lmhosts file on the Linux box - put in the name and IP address of the NT Server in it.

2) Create an EMPTY directory under /mnt for the mount point. It can be named anything, it doesn't have to match anything on the NT side, this just sets how you will reference the NT Share from Linux.

Such as: MKDIR /mnt/NTShare

3) Say you have a share on the NT Server (Let's call the server NTSERVER for this example) called SHARE (Original, huh?). This is typically reference in NT as \\NTSERVER\SHARE (Probably Duh, but just in case you didn't know)
The domain name is DOMAIN and your user ID in that domain is JOE. (And we are assuming that Joe has permissions on the NT Share!)

The command to link (I gotta start thinking in Linux terms, which would use MOUNT instead Link) the /mnt/NTShare mount point to the \\NTSERVER\SHARE share location is:

smbmount \\\\NTSERVER\\SHARE -c 'mount /mnt/NTShare' -W DOMAIN -U JOE

It should then ask you for the password for the NT user account JOE. Type that in and then it will complete the mount if all goes well!! (Don't panic if it takes a while, I've had it take up to 20 seconds for it to get everything linked/mounted/whatever)

4) That's all there is to it!

[If you want a non-Root user to have access, then you have to change the permissions for the /mnt/NTShare directory (before mounting the NT share) to allow the normal user or group to have the desired permissions to the /mnt/NTShare directory.]

----------------

Now, if anyone can explain to me how to do the opposite: Linking to a shared folder on a Linux Server. I've heard it can be done, but I do not know how.
Rating: (You must be logged in to vote)
Discussion View:
Replies:

How to access a share on an NT Server from Linux
Posted: 9/23/1999 6:55:22 PM
By: Comfortably Anonymous
Times Read: 2,134
0 Dislikes: 0
Topic: Linux
The smbmount in the previous command sets the permissions so that only root has write access to the share. The following command sets some additional information to give members of a certain group (wheel in this case) read/write to the share, while forbidding any access to users who are not members of wheel.

(All this should be on one line)
mount -t smbfs -o username=NTUserName,workgroup=NTDomainName,gid=wheel,rw,dmask=770,fmask=770
//NTServerName/ShareName /mnt/MountPoint

Rating: (You must be logged in to vote)