Mounting Win2K share folder in Linux

Posted on 2004-09-03
Last Modified: 2010-03-18
Hello experts,
I am using Redhat 9 and want to mount a share folder that is located in a Win2K server machine. (I have an account already)
Can anyone show me how to do it?
Question by:sctccomm
  • 3
  • 2
  • 2
  • +1
LVL 16

Assisted Solution

xDamox earned 250 total points
ID: 11977374
The best thing use is Samba so do:

smbclient //hostname/sharename -U username

and you will connect to the share

hope this helps

Author Comment

ID: 11977976
It works
Can I mount it automatically every time I start?
LVL 16

Expert Comment

ID: 11979740
add the command line to the /etc/rc.d/rc.local that may work
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.


Expert Comment

ID: 11983058
You might also try adding the share to the /etc/fstab.  That would be more standard

Accepted Solution

quantumMoose earned 250 total points
ID: 11985829
This site here explains it all really well:
I found that some of the options used in the fstab line
("//machine/share /mnt/sharename smbfs nosuid,nodev,noexec,credentials=/etc/samba/auth.smb,uid=username,gid=username,fmask=664,dmask=755 0 0") such as nosuid,nodev,noexec were all ignored.
If you are using the share for a particular service, its important to change the uid and gid to that of the service (the auth file will keep whatever it had in it though), otherwise all sorts of things happen permission-wise.


Author Comment

ID: 11998381
Thanks for the answer.  How can I mount a subdirectory under the share directory?  
if I try to mount something like this "//machine/share/sub"  I got an ERRnosuchshare Error  
LVL 16

Expert Comment

ID: 11999727

How come you change your question?!?!?

you ask how to mount the Windows share I told you now your on about making it mount
at boot and I feel like I will not get the points for what I have anwsered

Expert Comment

ID: 12004117
Strictly speaking, the smbclient program is trying to connect to listed shares on the server, and a subdirectory of the share is not considered a share. I do a similar thing on a machine in my domain, and the only solution I was able to come up with, if the user is not allowed to see //machine/share was to make a new share which pointed directly too //machine/share/sub to allow the mapping of this. In some cases this is impractical (for instance if you are mapping a users directory for every user in a large network). There are solutions for situations like this, let us know how you go though.

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

813 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now