Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 279
  • Last Modified:

Mounting Win2K share folder in Linux

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?
0
sctccomm
Asked:
sctccomm
  • 3
  • 2
  • 2
  • +1
2 Solutions
 
xDamoxCommented:
The best thing use is Samba so do:

smbclient //hostname/sharename -U username

and you will connect to the share

hope this helps
0
 
sctccommAuthor Commented:
It works
Can I mount it automatically every time I start?
0
 
xDamoxCommented:
add the command line to the /etc/rc.d/rc.local that may work
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jonnietexasCommented:
You might also try adding the share to the /etc/fstab.  That would be more standard
0
 
quantumMooseCommented:
This site here explains it all really well:
http://www.fedoraforum.org/forum/archive/index.php/t-2556.html
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.


Cheers
0
 
sctccommAuthor Commented:
quantumMoose,
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  
0
 
xDamoxCommented:
sctccomm,

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
0
 
quantumMooseCommented:
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.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now