View previous topic :: View next topic |
Author |
Message |
DntKnwHw n00b
Joined: 14 Aug 2003 Posts: 74 Location: Philippines
|
Posted: Thu Aug 21, 2003 5:18 pm Post subject: samba newbie installation guide need one!!! |
|
|
i have
2 computer XP and Gentoo 1.4 ---> kde
crossover cable, got both drivers working, e100(linux compiled it inside the kernel) and cnetpro200 xp
samba installed (but not yet configure)
problem,
i can't network them, i just want them to be connected, a typical connection, just for sharing files and printers, and of course network gaming (ex. quake 3)
i don't know what files to configure, what settings for, linux and windows
so anyone can give me a "samba for dummies" step by step process. pls. really need help, |
|
Back to top |
|
|
GeneralKane Tux's lil' helper
Joined: 19 Aug 2003 Posts: 77
|
|
Back to top |
|
|
MOS-FET Apprentice
Joined: 20 May 2003 Posts: 291 Location: Cologne, Germany
|
Posted: Thu Aug 21, 2003 6:24 pm Post subject: |
|
|
ok, first check if you can ping both computers. on the linux machine, you can assign a static ip in /etc/conf.d/net. on the winxp machine, it's somewhere in network settings. when you can ping both comps, you're half way trough. next you need to emerge samba, if not done already. all samba related stuff is done in /etc/samba/smb.conf. mine looks like this:
Code: |
[global]
log file = /var/log/samba.log
netbios name = GENTOO
guest account = elektrohirn
writeable = yes
server string = Gentoo Linux 1.4
socket options = TCP_NODELAY
path = /home/Multimedia
client code page = 850
character set = ISO8859-15
write list = elektrohirn,@elektrohirn
workgroup = NETZ
os level = 20
valid users = elektrohirn,@elektrohirn
encrypt passwords = yes
guest only = yes
public = yes
security = share
wins support = true
[Multimedia]
|
after saving this file, start samba with /etc/init.d/samba start. on the winxp machine, you should now see a computer named "GENTOO" in your network neigborhood with a share called "multimedia" pointing to /home/Multimedia. just replace all dir's for your needs. the winxp machine has now read/write access to the shared directory. instead of "elektrohirn", put your username. client code page/character set may not be needed by you, it's for me so that samba correctly displays german characters.
i guess you know how to share a directory on winxp. if you've done that, you should be able to access this shared dir in konqueror by entering "smb://yourwindowsIP/yourwindowsshare". you may be asked for username+password and you can browse the windows shared dir. in order to mount a shared dir like a CD etc. you need smbfs filesystem support compiled into the kernel.
hope this helps. if you've got questions ... ask me
tom |
|
Back to top |
|
|
vbenares Apprentice
Joined: 13 Aug 2003 Posts: 205
|
Posted: Thu Aug 21, 2003 10:10 pm Post subject: |
|
|
I can do half of this - I can see my linux box from my windows box. I cannot see my windows box from the linux one. This seems like the key:
Quote: | "smb://yourwindowsIP/yourwindowsshare" |
BUT, both machines get an IP from DHCP, so their IPs change. The windows machine is skeeter and the "folder" on the windows machine that I want to share belongs to user varanasi and is called My Documents.
I would be grateful for any help. |
|
Back to top |
|
|
MOS-FET Apprentice
Joined: 20 May 2003 Posts: 291 Location: Cologne, Germany
|
Posted: Thu Aug 21, 2003 11:29 pm Post subject: |
|
|
ok, since you've wins support enabled in samba, you should be able to use the winxp computer's name to connect. go to your win machine and look for the name of the SHARE, not the name of the directory you're sharing. for example, you could share "My Documents" and simply call the share "mydocs". then this should work:
Code: | smb://skeeter/mydocs |
when you know how to compile the kernel (it's not too hard) you could add smbfs support and you'd be able to mount this share. for example, you could mount the share //skeeter/mydocs into the directory "/home/varanasi/My Windows Documents" like this:
Code: | mount -t smbfs //skeeter/mydocs "/home/varanasi/My Windows Documents" -o username=varanasi,password=<yourpwd> |
if it doesn't work with "skeeter" try switching to static IPs. for small networks with 2-5 PCs i personally think it's easier without DHCP.
if you need further help, don't mind asking :-)
tom[/code] |
|
Back to top |
|
|
vbenares Apprentice
Joined: 13 Aug 2003 Posts: 205
|
Posted: Fri Aug 22, 2003 12:23 am Post subject: |
|
|
tom:
Thanks for the response. Unfortunately it didn't work. It seems that linux box just cannot see skeeter. I created c;\sambatest to eliminate problems with spaces etc. and shared it to Everyone. Still no luck.
elektrohirn wrote: | ok, since you've wins support enabled in samba, |
Could you elaborate a bit on this. I know that I have
in /etc/samba/smb.conf. Is there anything else I should check?
elektrohirn wrote: | when you know how to compile the kernel (it's not too hard) you could add smbfs support and you'd be able to mount this share. for example, you could mount the share //skeeter/mydocs into the directory "/home/varanasi/My Windows Documents". |
I am an ace kernel recompiler! I recompiled the kernel at least three and maybe four times in two days! It's about the only thing about linux that I am sure I can do! Not that I have any real concept of what exactly I am doing. Think trained monkey, and you'll get the idea.
This would be great - really great in fact - but I assume I need to get linux box to recognize skeeter first.
elektrohirn wrote: | if it doesn't work with "skeeter" try switching to static IPs. for small networks with 2-5 PCs i personally think it's easier without DHCP. |
Unfortunately, it's not an option. |
|
Back to top |
|
|
DntKnwHw n00b
Joined: 14 Aug 2003 Posts: 74 Location: Philippines
|
Posted: Fri Aug 22, 2003 1:23 am Post subject: |
|
|
hey thanks, i'll try, i hope it will work, |
|
Back to top |
|
|
MOS-FET Apprentice
Joined: 20 May 2003 Posts: 291 Location: Cologne, Germany
|
Posted: Fri Aug 22, 2003 1:27 am Post subject: |
|
|
hmmm, do you have the correct workgroup name for both computers. in /etc/samba/smb.conf there's a line "workgroup =". put your workgroup name here, e.g. "network". on the win machine, set up the same workgroup name in network preferences. you said it worked the other way right, accessing the linux share from your win machine? so your networks config (IP, netmask ...) seems to be OK.
if you have wins enabled, you should be able to use a computer's name instead of it's IP address. try the following: get your win machine's IP and then try to access the share by entering "smb://IPaddress/share" in the konqueror address bar.
give me some more info. what exactly happens if you enter the "smb://..." in konqueror? did you really use the name of the SHARE, not the name of the directory?
quick kernel guide: the kernel basically consists of many "modules", each module has a certain functionality. for example, there's a module than can make a specific network card work, there's a module that can acces FAT partitions, or there's a module that can give you firewire capabilities. with "make menuconfig" you can choose which modules to compile and which not. you should always compile only the modules you really need. you can compile a module as - well - as a module [M] or directly into the kernel [*]. the first is good if you don't need a module very often. you can then load it only when you need it and unload it when it's not needed anymore. if you compile it into the kernel, this module will always be loaded at boot time, it's "inside" or - better - it's a part of the kernel. |
|
Back to top |
|
|
vbenares Apprentice
Joined: 13 Aug 2003 Posts: 205
|
Posted: Fri Aug 22, 2003 3:00 pm Post subject: |
|
|
tom:
Thanks for your help.
elektrohirn wrote: | hmmm, do you have the correct workgroup name for both computers. in /etc/samba/smb.conf there's a line "workgroup =". put your workgroup name here, e.g. "network". on the win machine, set up the same workgroup name in network preferences. you said it worked the other way right, accessing the linux share from your win machine? so your networks config (IP, netmask ...) seems to be OK. |
Yes. This seems okay, and linux and windows boxes both appear in the same workgroup from the windows computer.
elektrohirn wrote: | f you have wins enabled, you should be able to use a computer's name instead of it's IP address. try the following: get your win machine's IP and then try to access the share by entering "smb://IPaddress/share" in the konqueror address bar. |
give me some more info. what exactly happens if you enter the "smb://..." in konqueror? did you really use the name of the SHARE, not the name of the directory?[/quote]
I am using Nautilus in the gnome desktop. Perhaps, Nautilus doesn't do what Konqueror does. I assumed they were analogous.
I used the sharename not the directory name.
I tried putting both skeeter and the current IP, 192.168.120.21, into Nautilus and got this in a dialog box:
Quote: | "gdm://192.168.120.21/sambatest" is not a valid location. Please check the spelling and try again. |
I tried putting both skeeter and the current windows box IP, 192.168.120.21, into gFTP and got this rather interesting response:
Quote: | Looking up skeeter
Cannot look up hostname skeeter: Name or service not known
[snip]
Looking up 192.168.120.21
Trying skeeter:21
Cannot connect to skeeter: Connection refused |
It seems to be able to resolve the IP address to the name but not the reverse.[/quote] |
|
Back to top |
|
|
MOS-FET Apprentice
Joined: 20 May 2003 Posts: 291 Location: Cologne, Germany
|
Posted: Fri Aug 22, 2003 4:50 pm Post subject: |
|
|
it looks like the network itself is working, but nautilus can't browse smb shares. well, you'll want to mount them anyway, so you'll have to add smbfs support to the kernel. do this:
Code: |
cd /usr/src/linux
make menuconfig
|
then, go downwards to "file systems" then "network filesystems" and then select "samba/smb/smbfs support" or something like this to be compiled into the kernel (not as module). save the kernel config, and then:
Code: |
make dep && make clean bzImage modules modules_install
cp /boot/bzImage /boot/bzImage.old
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage
|
then, reboot with the new kernel. you now should be able to mount the smb share like this:
Code: |
mount -t smbfs //compname/share /home/directory -o username=<yourusername>,password=<yourpassword>
|
i hope this works for you! |
|
Back to top |
|
|
vbenares Apprentice
Joined: 13 Aug 2003 Posts: 205
|
Posted: Fri Aug 22, 2003 5:32 pm Post subject: |
|
|
tom:
Thanks for your patience. I will give this a try this afternoon. |
|
Back to top |
|
|
vbenares Apprentice
Joined: 13 Aug 2003 Posts: 205
|
Posted: Mon Aug 25, 2003 5:19 pm Post subject: |
|
|
Okay. Maybe I cannot compile a kernel.
I can now get the linux box to figure out what IP address DHCP has given to the windows box and find the box by name. I THINK the change that made the difference was changing /etc/nsswitch.conf
from
to Code: | hosts: files wins dns |
And I can get linux box to tell me what shares are on the windows box (skeeter):
Quote: | root@mantis mark # smbclient -L //skeeter
added interface ip=192.168.120.23 bcast=192.168.120.127 nmask=255.255.255.128
Got a positive name query response from 192.168.120.21 ( 192.168.120.21 )
Password:
Domain=[SPIRIT] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
Sharename Type Comment
--------- ---- -------
My Documents Disk
IPC$ IPC Remote IPC
print$ Disk Printer Drivers
ADMIN$ Disk Remote Admin
C$ Disk Default share
sambatest Disk
Server Comment
--------- -------
Workgroup Master
--------- -------
|
Which is great! But I cannot mount the frigging share!
Quote: | root@mantis mark # smbmount //skeeter/sambatest /home/mark
Password:
ERROR: smbfs filesystem not supported by the kernel
Please refer to the smbmnt( manual page
smbmnt failed: 255
|
I have recompiled the kernel - twice - after setting the SMB File System option using menuconfig. I looked in /usr/src/linux/.config to make sure the option was set. It says, in relevant part:
Code: | CONFIG_SUNRPC=m
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_SMB_FS=y
# CONFIG_SMB_NLS_DEFAULT is not set
|
So, I am back to being stuck. (I wish I hadn't said anything about being able to compile a kernel! I think I jinxed myself.) |
|
Back to top |
|
|
vbenares Apprentice
Joined: 13 Aug 2003 Posts: 205
|
Posted: Fri Aug 29, 2003 7:33 pm Post subject: |
|
|
Aieee! I forgot to mount /boot before copying the new kernel to boot. Boy, I feel even dumber than usual.
Everything works fine now. Thanks. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|