Solved

Mounting Win2K share folder in Linux

Posted on 2004-09-03
8
271 Views
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?
0
Comment
Question by:sctccomm
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 16

Assisted Solution

by:xDamox
xDamox earned 250 total points
Comment Utility
The best thing use is Samba so do:

smbclient //hostname/sharename -U username

and you will connect to the share

hope this helps
0
 

Author Comment

by:sctccomm
Comment Utility
It works
Can I mount it automatically every time I start?
0
 
LVL 16

Expert Comment

by:xDamox
Comment Utility
add the command line to the /etc/rc.d/rc.local that may work
0
 
LVL 4

Expert Comment

by:jonnietexas
Comment Utility
You might also try adding the share to the /etc/fstab.  That would be more standard
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Accepted Solution

by:
quantumMoose earned 250 total points
Comment Utility
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
 

Author Comment

by:sctccomm
Comment Utility
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
 
LVL 16

Expert Comment

by:xDamox
Comment Utility
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
 

Expert Comment

by:quantumMoose
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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 video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

12 Experts available now in Live!

Get 1:1 Help Now