• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

how to connect a linux box to a win2000 box

pleas help me on how to connect a linux box to a win2000 box
  • 2
1 Solution
JesNoFearEnterprise Systems Administration Team MemberCommented:
This is very simple to do. You can user SAMBA. Samba is a program that makes your Linux box look like a windows computer on the network. And vise versa. Now for your question, you want to just connect to windows from linux. This is done via Command line. I have found this current string "smbclient //servername/share -U useraccount" in my case I use smbclient //jes-server/c$ -U administrator and it prompts for password. a list of all commands that can be used by smbclient can be found by typing in the fallowing command "smbclient --help". Once logged in, you should see smb> for a list of commands that can be used type in help or ? and hit enter, now if you download or "Get" any files, they will be placed in the Dir that you typed in the command in from. So lets say I started out in the /root dir. and type smbclient ... and typed in get autoexec.bat, once you exit out of smbclient (by hitting q and enter or typing in quit) type in ls to see your file. ls is the same as DIR in windows.

Now if you want to do it the other direction where you want win2k to access linux, samba must be configured and running. Here is a sample from MY /etc/samba/smb.conf
workgroup = MYGROUP
server string = My Linux Box
printcap name = /etc/printcap
load printers = yes
printing = lprng
guest account = nobody ;This is the default and dose not mean that no guest are allowed.
log file = /var/log/samba/%m.log
max log size = 0
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd ;or where ever your samba config file is located
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *new*password* %n\n *retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
pam password change = yes
obey pan restrictions = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = 192.168.X.X ;whatever the ip of this computer is. if dynamic do not add this line. this line is only needed if you have more than one NIC or Modem that you do not want to have access through.
os level = 33
dns proxy = yes
comment = all printers
path = /var/spool/lpd/lp
browseable = no
public = yes ;this is optional
guest ok = yes ;this is also optional
writable = no
printable = yes
;it is not good to have spaces due to older os's might get confused
comment = Comment of the share
path = /path/of/share
valid users = list of valid users ;this is optional and only used if you want to restrict users from accessing it.
public = no ;enter yes if you do not want restrictions
writable = yes ;no if you want read only
create mode = 0664
directory mode = 0775

I hope this answers your question. Also if you do not have samba installed, you can visit http://www.samba.org/ for installs and other directions and questions.
-CrashOverride-Author Commented:
sorry u missed understood me it is supose to be
how to connect a linux box to the net fro lan and how to set up the lan
JesNoFearEnterprise Systems Administration Team MemberCommented:
That answer is also simple, I am sorry I didn't answer your question right the first time. I just need alittle more information,
1. Whitch computers will be connected directly to the net. (throught Dial-up modem, DSL, Cable) if both will have thair own ip's (which some ISP's allow) just say both. or if you are going to use a router, let me know that.

now if you have soumthing like comcast where they only allow 1 ip address, there are two solutions to this problem, one is to setup ICS (Internet Connection Sharing) on your 2k box, or buy a cable/dsl router. Thought setting up ICS is cheeper, your 2k box must be on at all times in order for the other computer to be online.

If you were to go with the ICS Solution you would need.
2 Network card in your 2k box (or if you have a USB Internet connection or dial-up modem Only 1 is needed)
1 Network card in your linux box.
1 hub (just incase you don't have one already)
Though the hub is substutiable with a cross over cable, if you are only planning on having one pc connected to the other pc, then this would be the more cost effishent way to go.

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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