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


accessing windows2k shares using linux

Posted on 2003-03-05
Medium Priority
Last Modified: 2010-03-18

i am having a bit of a nightmare using samba. i have have a simple network set up with a single win2k computer and a linux computer running mandrake 9.1. So far i have been able to access all my linux shares using the win2k computer but i am having trouble beening able to access my win2k shares from within linux. i know my win2k machine is set up correctly because i had this working before i reinstalled linux but i managed it last time by fluke i think and can't do it again. could anyone please help me :)

thx in advance
Question by:pincombe

Expert Comment

ID: 8073906
I will recommand you to use FileTransferingProtocol insteed. You can limit what folders a user can access which should be equale to using shares.

So choose either to run the ftp server on linux ( remember to disable anonymous and guest accounts) or on windows. I recommand bulletproof ftp server for windows for the novice user and serv-u for the more expert user.

Or try  SSH Secure file transfer which I also highly recommand if you already have ssh enabled(if you dont, you should).
less protocols running, less holes to secure.

hope this helps?


Author Comment

ID: 8074109
i would perfer not to have an ftp server running tho because well its another program and also the windows pc has an internet connection and i don't want any outside connection trying to access the ftp server.

i would much prefer to have smb working i think all i need to do is know how to mount a network drive so i can access it in linux

Accepted Solution

JohnBolton earned 200 total points
ID: 8074130
You can mount a Windows 2000 share on your Linux box with the following command:

mount.smbfs //windowsbox/windowsshare /linuxbox/mountpoint -o username=Administrator,password=MyPassword

For example, let's say I want to mount my hidden c$ share on my Windows 2000 computer named Win2K into a folder named /root/Windows/CDrive. I would use the following command:

mount.smbfs //Win2K/c$ /root/Windows/CDrive -o username Administrator,password=MyAdminPass

You can specify many different options for mounting your C drive such as the access level, etc. Here is a list of some of the possible options:

      username=<arg>                  SMB username
      password=<arg>                  SMB password
      netbiosname=<arg>               source NetBIOS name
      fmask=<arg>                     file umask
      dmask=<arg>                     directory umask
      debug=<arg>                     debug level
      workgroup=<arg>                 workgroup            
      ro                              mount read-only
      rw                              mount read-write
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 8074630
i think there is something wrong this is what happens

timeout connecting to
Error connecting to (Operation already in progress)
8637: Connection to pincombe failed
SMB connection failed

stright away i can see that the ip address is wrong the ip should be

what do you suggest?

Expert Comment

ID: 8075411
Create a lmhosts file that would specify the IP of your windows host and then try again.

I'm not sure where the lmhost file should be on Mandrake, but it should look like:   win2k

That is supposing that your w2k netbios name is win2k. Also try to use a normal share, not the C$ share.

You can try to use smbclient instead of mount for debugging purposes, it's easier. Something like:

smbcliet //Win2K/c$ -U Administrator -d 4

-d 4 means the debugging level, 4 is usually quite useful (but you can increase it :)

Expert Comment

ID: 8077202
It doesn't matter whether you map to the hidden c$ share or one you create yourself.

You don't have to bother with the hosts file either.

From my earlier example:

mount.smbfs //$ /root/Windows/CDrive -o username Administrator,password=MyAdminPass

Let me know if you have any further problems. I have been doing this for a long time.

BTW, you can put this command in your startup file (i.e. /etc/rc.d/rc.local) and you will never have to do it again. ;)

Author Comment

ID: 8081450
muchos thx for the help :) i don't mean to be rude tho but i can't write/delete any of my network shares. i have tried -rw but i dunno if i am putting it in the wrong place this is what it looks like.

mount.smbfs //$ /mnt/Laptop -o username=pincombek,password=qwerty -rw

what do you think i should do?

Expert Comment

ID: 8081588
You're not being rude. :) You also need to set up the permissions on the mount folder. I should have included this in my first response, sorry.

For FULL access, (before the mount operation) just type:

chmod 777 /root/Windows/CDrive

If you want to limit the access to only you, use 700. If you want to allow access for you and anybody in the same group as you, use 770.

Author Comment

ID: 8082377
i have just tried changing the folder to 777 before mounting it and it stays at 777 until i mount it and then it goes back to 755. i tried to delete a file as root and it worked fine but for some reason it keep changing the folder to 755 every time :(

Expert Comment

ID: 8084198
I guess I haven't done this in awhile. My mount points are also 755. I am able to both create and delete on the mounted volume.

If everything is working for you, I wouldn't worry about it. :)

Author Comment

ID: 8084267
thx for all the help mate :) couldn't have gotten anywhere without you

Featured Post

Technology Partners: 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!

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

577 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