2005-03-21, 10:52 PM
After seeing the how to mount a fat32 partition I thought I'd show you how to mount a share.
First off you need to make sure the share it setup correctly on your Windows system, I'll only focus on sharing with WinXP.
Its not hard on WinXP. First off right-click on the folder you wish to share and select "Sharing and Security".
Select "Share this folder".
You can now set the Share name, you can also fiddle with the maximum number of users allowed at one time (the default is normally good enough).
If you want to heighten the security in this share you can click on "Permissions" and remove the default "Everyone" group (select and click Remove). After this you can click Add. Type the username that will be used to allow access (this has to be a valid user on your WinXP machine). Click Ok, and Ok again. The folder icon should alter and a hand will be holding the folder. This indicates a network share.
Ok so you need to know these things:
The hostname of the WinXP PC (eg winpc). Right click on "My Computer" click on "Computer Name". Look at the "Full Computer Name".
The sharename of the folder (eg shared) Do you remember what you called it :P.
A user/pass for the winxp system. This is only required if you altered the permissions (i.e. if its not sharing to Everyone).
Phew 50% of the way there.
Ok so onto the Linux system, its relatively simple:
Make the directory you want to mount the share to.
Code:
mkdir /mnt/share
Next either...
Mount the share with user/pass:
Code:
smbmount //winpc/shared /mnt/share -o username=user,password=pass,rw
Or mount the share without a user/pass (this is true if Everyone is still set)
Code:
smbmount //winpc/shared /mnt/share -o rw
Hopefully thats it. Now you can use the share. You cannot create symbolic links or chmod the system (this is restriction on the WinXP side).
If you wish to allow users on the linux side access to the share then you will need to alter the options. Adding in uid= or gid= to allow access to users or groups respectively by mounting the drive with there permissions. Here's an example:
Code:
smbmount //winpc/shared /mnt/share -o rw,uid=znx
This will mount the drive as if user znx had done it. Thus he will have rw access to the shared.
Hands up who I managed to confuse ;)