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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.


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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

791 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