?
Solved

accessing windows2k shares using linux

Posted on 2003-03-05
11
Medium Priority
?
300 Views
Last Modified: 2010-03-18
Hey,

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
keith
0
Comment
Question by:pincombe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 

Expert Comment

by:t0m4s
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?

0
 

Author Comment

by:pincombe
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
0
 

Accepted Solution

by:
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:

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
0
RHCE - Red Hat OpenStack Prep Course

This course will provide in-depth training so that students who currently hold the EX200 & EX210 certifications can sit for the EX310 exam. Students will learn how to deploy & manage a full Red Hat environment with Ceph block storage, & integrate Ceph into other OpenStack service

 

Author Comment

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

timeout connecting to 64.225.154.175:139
Error connecting to 64.225.154.175 (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 192.168.0.1

what do you suggest?
0
 
LVL 6

Expert Comment

by:mbarbos
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:

192.168.0.1   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 :)
0
 

Expert Comment

by:JohnBolton
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 //192.168.0.1/c$ /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. ;)
0
 

Author Comment

by:pincombe
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 //192.168.0.1/c$ /mnt/Laptop -o username=pincombek,password=qwerty -rw

what do you think i should do?
0
 

Expert Comment

by:JohnBolton
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.
0
 

Author Comment

by:pincombe
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 :(
0
 

Expert Comment

by:JohnBolton
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. :)
0
 

Author Comment

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

Featured Post

TCP/IP Network Protocol Cheat Sheet

TCP/IP is a set of network protocols which is best known for connecting the machines that make up the Internet. The truth is that TCP/IP is one of the oldest network protocols and its survival is mainly based on its simplicity and universality.

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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

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