Quote:
Originally posted by Opto-Andy
Great Post, I'll be looking for answers from a guru.. (as I share your questions). I have seen reference to a "lisa" daemon that needs to work with samba... Do you know if that is out of date? I did see some security issues related to that as well. If it is not out of date, perhaps if you continue your efforts and also look into "lisad" you will solve your problem and can post back here!
=Thanks,
Andy
|
Ok, Andy, here is how I finally got the thing to work.
Took me several weeks and the advice of several people on JustLinux forums:
1.First set up the NICs and give each computer an IP address.
We will give the Linux machine an IP address of 192.168.0.1 and the XP machine an IP address of 192.168.0.2
For XP,
1.Go to START/CONNECT TO /SHOW ALL CONNECTIONS and right click the LAN and choose properties.
2.Highlight the TCP/IP and choose properties.
3.Use the following IP address: 192.168.0.2
4.Subnet mask: 255.255.255.0
5.Use the machine as the DNS server. i.e put in the ip of 192.168.0.1
6Make sure Client for Microsoft Networks ,File and Printer Sharing for Microsoft Network and QoS packet scheduler is installed.
6.Now go to Folder options (control panel) and untick simple file sharing
7.Choose a folder you want to share ,right click it and choose properties/sharing
Choose ‘share this folder’ and then click the ‘permissions’ button and tick all the ‘allow’ boxes for the user ‘everyone’.
8.Now go to Network Connections in the control panel and choose ‘set up a home or small office network’ Go through the wizard and choose a name for the network.By default it will be called WORKGROUP.For this example,we will call it ‘network’
9.Finally we need to give the XP computer a name that we can refer to it as.Right click MY COMPUTER and choose the computer name tab and click change to give a name you prefer
That’s pretty much it for XP.
For LINUX
1.Load the ‘network configuration tool’ (this is what it is called in RH9.) .You should see your NIC (ethernet) card there identified as an Ethernet
2. Highlight it and choose edit
3.On the general tab,chooseActivate device when computer starts
4.Choose:statically set IP addresses and set the IP address as 192.168.0.1
And set the subnet mask as 255.255.255.0
5.On the route tab choose Add and put in the IP of the XP machine (192.168.0.2) and the netmask.
6.You might be asked for a hostname.This is ‘localhost’
That’s the NIC set up for linux.
Now for Samba itself:
1.We first have to set up the samba server.
2.Make sure Samba is installed on RH9.If not install it from the CDs (use add/remove programs)
3.To get Samba to work ,all the configuration is done via the smb.conf file which is in /etc/samba
4.A basic one is one I made:
[global]
workgroup = network
username map = /etc/samba/smbusers
guest ok = yes
netbios name = samba
encrypt passwords = yes
comment = Linux PC
[ludwig data]
comment = ives home folder
path = /home/ludwig/data
writeable = yes
browseable = yes
read only = no
Some explanations:
Under global (i.e. the whole of Samba)
Workgroup is the name of the Network all the computers use the same workgroup name
Username map is the place where samba users are stored
Netbios name is the name of the server
Encrypt passwords is important for XP
Under ludwig data, we give the path to the folder that will be shared with XP.Remember to make this directory available to all by: # chmod 777 /home/ludwig/data
Writable, means that XP can write to this folder, browseable means you can browse it and read only = no means just that.
5.Now you must create a samba user:
# smbpasswd -a ludwig
New SMB password:
Retype new SMB password:
Added user ludwig
Now restart samba by:
# /sbin/service smb restart
It’s a good idea to make your samba user and pw the same as your linux login and the same as your windows login unless security is ultra important for you.
6.You can test the syntax of your smb.conf file by # testparm.
Any errors will be reported.
Alternatively, you can use the ‘samba server configuration tool’ that comes with RH9.It’s like the SWAT tool that comes with samba and gives you a nice GUI to make the smb.conf.Note, you should check the smb.conf file afterwards and add the netbios name = samba line.I had problems since the samba server configuration tool didn't add this line and it caused problems.
7.To test that samba is set up ok, do as root:
#/usr/bin/smbclient -L samba -U ludwig
Where samba is the netbios name and ives is the user you created.Your samba password will be asked for.You should get something like:
Sharename Type Comment
--------- ---- -------
savefile Disk
IPC$ IPC IPC Service (Dell Dimension 8200)
ADMIN$ IPC IPC Service (Dell Dimension 8200)
Server Comment
--------- -------
DELLDIM Dell Dimension 8200
PE500SC
Workgroup Master
--------- -------
THE_COWANS PE500SC
If you get something like the above, you are in business.and samba is working ok
Now, from XP you should be able to open network neighborhood and go to ‘view workgroup computers’. You should see your Linux and XP computer there.Double click the Linux one and it will ask you for your samba username and pw.Then ou will get to the share you designated in the smb.conf (/home/ives/data). You should be able to read and write to it.
From Linux, in order to access your shared files on XP you need to do the following:
We need to use the smbmount command to mount the share.
1.Create a mount directory.For example /mnt/xp
2.Suppose the file you have shared on XP is called movies and under the sharing tab ,you have given this folder the share name D_Movies
Then one would do:
# smbmount //xp/D_Movies /mnt/xp
Where ‘xp’ is the name you gave your windows machine
D-Movies is the name you gave to the shared file and
/mnt/xp is the mount directory (the place where the files will show up)
To unmount the mount, just do:
#smbumount /mnt/xp
Making the Mount Permanent
smbmount does not make the mount permanent. If the Linux workstation is rebooted, you will have to mount the share again. To make the mount occur each time you start the Linux workstation, you can put an entry in your /etc/fstab file of the form:
//servername(i.e. the name of the XP computer)/sharename (i.e. name of shared file in XP) /mountdirectory smbfs username=windowsuserename,password=windowspassword 0 0
For example:
//xp/My_XP_Docs /mnt/xp smbfs username=defaults,password=defaults 0 0
the username and password are only needed if the Windows share is set up to require them. If a username and password are not required, you may just replace them with the word defaults.