accessing windows2k shares using linux


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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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?

pincombeAuthor Commented:
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
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

pincombeAuthor Commented:
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?
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 :)
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. ;)
pincombeAuthor Commented:
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?
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.
pincombeAuthor Commented:
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 :(
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. :)
pincombeAuthor Commented:
thx for all the help mate :) couldn't have gotten anywhere without you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.