bloody SAMBA!

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

bloody SAMBA!

Postby bigjohn » Wed Jul 27, 2005 11:40 pm

What is it with this "samba thing"?

Apparently, it's supposed to work pretty much "out of the box" with SuSE 9.3 - liars! :twisted:

As far as I can tell, I've got it installed. I only want to network my main pc (linux only) with my partners laptop so she has access to the printer(s) and file share.

I did find a "tutorial/howto" type thing http://www.tweakhound.com/linux/samba/page_1.htm and even though it's about SuSE 9.3 and WinXP, I figured that I should be able to make it work - without the firewall (I don't like messing with linux firewalls I've found them to be a mega complicated PITA - I'll stick with me hardware firewall).

But no, nothing. Not a jelly bean.

That instruction/tutorial thing mentioned above, well it said about installing an app called SMB4k, which I did and now I've got this nice little icon on my task bar that opens a nice little 3 pain window. The left hand pane has "JOHNSGROUP" listed, the top right has nothing and the bottom right has 3 tabs (network, share and search).

Theres nothing showing on the network tab, nothing in the share tab and I haven't the faintest idea of what I would need to search for anyway.

I have no idea how to start samba, I can't find out how to check whether I've got everything configured properly and I don't know what to do to find out how to "run" it either.

Should I be seeing some signs of "samba life" somewhere? If so, what should or am likely, to see?????

Any assistance is much appreciated (but preferably in "monkey see, monkey do" type language - I don't understand the techspeak).

regards

John

p.s. what the hell do they mean by a "share", I only know shares in stock market terms???
"What the large print giveth, the small print taketh away". Tom Waits
User avatar
bigjohn
LXF regular
 
Posts: 393
Joined: Tue Apr 12, 2005 10:19 pm
Location: UK - South Coast

RE: bloody SAMBA!

Postby Erin » Thu Jul 28, 2005 6:30 pm

First things first, as with everything, Samba normally requires a little work. Both PCs must be either in the same workgroup or domain. They should have different host names for the individual computers. I'll assume both have different IP addresses too or that you use DHCP as you have a hardware router.

A share is a Microsoft term for a folder that has been allowed to be accessed by others across a network. You can check if Samba is running by opening a console and typing "ps aux | grep -i smb" sans quotes.

There is a Samba howto on their website. I recommend you read and follow it. I doubt anyone here will give you a blow by blow method of networking fundementals, how to configure Linux and get Samba configured from scratch when the work is already out there on the 'Net. However, one tip is XP maybe (unless you've stopped it) a software firewall which can block all sorts of stuff. If you want more help, you'll need to be specific, i.e. each machine's network configuration for a start.

Erin

Erin
Just beneath my skin I'm screaming. Faithless::Insomnia.
Dual PIII 550 with Ubuntu [semi-bleeding].
User avatar
Erin
LXF regular
 
Posts: 141
Joined: Thu Apr 07, 2005 7:35 pm
Location: The Olde Smoke south of the River

RE: bloody SAMBA!

Postby Ram » Thu Jul 28, 2005 6:41 pm

Turn off all SOFTWARE Firewalls.

Can you see the Linux Box from XP

A Share, XP using the Linux Printer is Share or an any other resourses.

Ram

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1679
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby bigjohn » Fri Jul 29, 2005 2:19 pm

Ha! stupid of me, I forgot too say, that that's probably one of the reasons that I didn't get anywhere with the "tweakhound" tutorial, my partners laptop is using W98SE. Not XP.

As far as I can see it doesn't matter if I'm following O'Reallys Samba guide, or something that is really intended for a lower level of knowledge, the stuff that's out there, doesn't seem to allow for those of us who just don't have the prior knowledge or even know enough to ask appropriate questions which have a chance of eliciting a correct (or even close) answer.

I can find nothing that explains the basics of how it's supposed to work, so that if I get to stage X, and it's "not playing", whether I need to look at stage W again, or to continue on to stage Y as that then explains how to correct (or what to correct) in X.

Hence my question. Because as far as I can see, I have IP's in the same range, it appears that I've got both machines in the same work group, I can see my /home directory etc from the windows machine, but the linux machine can't see the windows machine and I can't print anything from the windows machine either even though both my printers seem to be listed if I look on the windows machine!

Which equals total confusion!

So any further assistance is greatly appreciated.

regards

John
"What the large print giveth, the small print taketh away". Tom Waits
User avatar
bigjohn
LXF regular
 
Posts: 393
Joined: Tue Apr 12, 2005 10:19 pm
Location: UK - South Coast

Postby AudioMove » Fri Jul 29, 2005 5:47 pm

rather than read the whole tutorial im just gonna throw questions at ya as ive set up samba recently with very few problems.

1. Have you added your username and password to samba "smbpassword" command?
2. Post your /etc/samba/smb.conf file
3. i also found problems with the firewall on my FC box so open up the ports or temporarily disable the firewall for testing perposes.
AudioMove
 
Posts: 12
Joined: Fri Apr 15, 2005 9:23 am
Location: Ireland

Postby bigjohn » Sat Jul 30, 2005 1:56 am

AudioMove wrote:rather than read the whole tutorial im just gonna throw questions at ya as ive set up samba recently with very few problems.

1. Have you added your username and password to samba "smbpassword" command?
2. Post your /etc/samba/smb.conf file
3. i also found problems with the firewall on my FC box so open up the ports or temporarily disable the firewall for testing perposes.


1. Erm, not sure - though I don't think so. Does your question mean that I have to have different usernames and passwords???

2.
# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2005/07/26 19:37:26

# Global parameters
[global]
workgroup = JOHNSGROUP
map to guest = Bad User
username map = /etc/samba/smbusers
printcap cache time = 750
printcap name = cups
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
logon path = \\%L\profiles\.msprofile
logon drive = P:
logon home = \\%L\%U\.9xprofile
domain master = no
printer admin = @ntadmin, root, administrator
cups options = raw
include = /etc/samba/dhcp.conf
restrict anonymous = no
preferred master = no
max protocol = NT
ldap ssl = No
server signing = Auto
security = share

[homes]
comment = Home Directories
valid users = %S
inherit acls = Yes
browseable = No

[profiles]
comment = Network Profiles Service
path = %H
read only = No
create mask = 0600
directory mask = 0700
store dos attributes = Yes

[users]
comment = All users
path = /home/
inherit acls = Yes
guest ok = Yes
case sensitive = No
veto files = /aquota.user/groups/shares/
msdfs proxy = no

[groups]
comment = All groups
path = /home/groups/
inherit acls = Yes

[printers]
comment = All Printers
path = /var/tmp/
create mask = 0600
printable = Yes
printer name = deskjet840c

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers/
write list = @ntadmin, root
force group = ntadmin
create mask = 0664
directory mask = 0775

[Unnamed]
printable = yes
printer name = laser


As you can see from the date and time, I've been meddling (changing anything that looks even vaguely familiar too see if it will "start").

3. The whole set up is behind a hardware firewall, so for the moment I haven't bothered with the software one.

So with this passwords and usernames thing, as I'm just trying to get my partners laptop to print from the system and file share, does she also need to be a "username and password", and would I have to be on her laptop(W98SE) the same ???

Plus, I notice some of the stuff I've been reading online, seems to say stuff about mounting samba, is that like mounting a cdrw or something like that i.e. does it need to appear in /mnt or /dev or something?????

I should of course, apologise if my questions seem dumb/lame/idiotic but I really know naff all about servers and the associated technologies - most of the info I've found is somewhat unhelpful as it goes off on tangents that seem to require prior knowledge that I just don't have (and can't find to even try to understand).

regards

John
"What the large print giveth, the small print taketh away". Tom Waits
User avatar
bigjohn
LXF regular
 
Posts: 393
Joined: Tue Apr 12, 2005 10:19 pm
Location: UK - South Coast

Postby Lancer » Sat Jul 30, 2005 5:32 am

I've set up samba on our school network so the school computers runnning fedora Linux can access the printer from a Windows 98 box. Basically, once the machines could ping each other, I created a new user called "printer" in the Linux box, and also made a user login called "printer" in the windows98 box. The windows box required me to enable sharing (of course) and set these appropriately for the printer etc. I did a small amount of tweaking based on http://www.novell.com/coolsolutions/feature/1625.html Then, once not SAMBA itself but SAMBA-CLIENT was installed into each of the linux boxes (and service restarted) all that was required to make them successfully connect to the printer was to "add printer" wizard and select "network printer" of "SMB Windows shared" type. A box showing the network came up and presto - after selecting the correct workstation box, it expanded to show the printer and I only then had to give the type from drop down lists (HP 5550).

Here's the link again: http://www.novell.com/coolsolutions/feature/1625.html

Good luck.
Lancer
LXF regular
 
Posts: 232
Joined: Thu Apr 07, 2005 11:59 am

USER IDs and Passwords.

Postby Ram » Sat Jul 30, 2005 10:20 am

Your using SWAT which was a question I tried to ask yesterday but just as I hit the submit button my conection timed out but to an outage in Middlesbrough.

I take that when you log into your Linux Box you use a UID something like bigjohn and supply a password. Well Samba works the same way so from the SWAT Password Screen create a new user ( use the details that your partner logs into W98 with same user name and password )

From the SWAT Status screen re-start smb/nmb etc.

From the W98 Box add a new printer, supply the drivers for W98 and test printing.

Ram
User avatar
Ram
LXF regular
 
Posts: 1679
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby bigjohn » Sat Jul 30, 2005 2:08 pm

God! I'm loosing the will to live with this!

I'm currently trying to go back to square 1 i.e. I uninstalled both the samba and the SMB4k gui app (it seemed to be creating more confusion)

So I've re-installed the samba (Ha! a n00b solution for a n00b mentality). Luckily, doing that was straight forward.

I've also searched for basic samba setup (again, and again, and again!).

All the docs that seem to have installed (plus most of the ones that I can find online, are shite! they start with saying stuff like "a very basic smb.conf would be [homes]", but as soon as it becomes more than that they disappear off into the realms of prior knowledge that I don't seem to be able to find/attain! - bugger!

I was hoping that I might find a "checklist" so that I can try to find answers about the individual stages, but zilch.

Right now, a re-install of windows looks very attractive!

Ta for the suggestions one and all.

regards

John
"What the large print giveth, the small print taketh away". Tom Waits
User avatar
bigjohn
LXF regular
 
Posts: 393
Joined: Tue Apr 12, 2005 10:19 pm
Location: UK - South Coast

Postby Nigel » Sat Jul 30, 2005 2:42 pm

OK, bigjohn, It's a while since I set SAMBA up from scratch, so I can't do this from memory.
BUT. I've just put SuSE 9.2 on my laptop and will need to configure SAMBA on it sometime this weekend. I don't think the process will be materially different between 9.2 and 9.3 (from memory it wasn't much different between 8.2 and 9.2).

I am aiming to set it up so that I can :
a) share out my home directory so I can access it from my ancient Win95 laptop over the network.
b) share out a common directory that can be accessed by all the windows machines on the network (so my wife can transfer scanned images onto the laptop - our scanner is on her XP machine).
c) access the shared documents directories on the Win XP machines from Konquerer (file manager) on the laptop (I haven't done this bit before).

Is this more or less what you want to do ?
If so, I'll document the steps I take and post them here - let's see if we can make it work for you as well.

I'll be starting this either tonight or tomorrow - once I've finished painting the bathroom :cry:
Hope this helps,

Nigel.
User avatar
Nigel
LXF regular
 
Posts: 1141
Joined: Fri Apr 08, 2005 8:03 pm
Location: Gloucestershire, UK

Postby bigjohn » Sat Jul 30, 2005 11:50 pm

Nigel wrote:OK, bigjohn, It's a while since I set SAMBA up from scratch, so I can't do this from memory.
BUT. I've just put SuSE 9.2 on my laptop and will need to configure SAMBA on it sometime this weekend. I don't think the process will be materially different between 9.2 and 9.3 (from memory it wasn't much different between 8.2 and 9.2).

I am aiming to set it up so that I can :
a) share out my home directory so I can access it from my ancient Win95 laptop over the network.
b) share out a common directory that can be accessed by all the windows machines on the network (so my wife can transfer scanned images onto the laptop - our scanner is on her XP machine).
c) access the shared documents directories on the Win XP machines from Konquerer (file manager) on the laptop (I haven't done this bit before).

Is this more or less what you want to do ?
If so, I'll document the steps I take and post them here - let's see if we can make it work for you as well.

I'll be starting this either tonight or tomorrow - once I've finished painting the bathroom :cry:


It's pretty close Nigel. My variation is like this:

Linux Desktop (SuSE 9.3) with an inkjet printer that goes into an ethernet hub, a W98SE laptop into the same hub and my network printer which is also into the same hub.

I can print to both printers from the SuSE machine.

I think that the networking setup on the laptop can see the SuSE machine (network neighbourhood lists laptop and johnspc).

What I can't do, is print from the laptop via either the inkjet connected to the SuSE box or the network printer (an HP laserjet 5N) and I can't file share.

I've obviously been meddling and at the moment, my smb.conf looks like this
# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2005/07/30 15:51:51

# Global parameters
[global]
workgroup = JOHNSGROUP
security = USER
map to guest = Bad User
username map = /etc/samba/smbusers
printcap cache time = 750
printcap name = cups
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
logon path = \\%L\profiles\.msprofile
logon drive = P:
logon home = \\%L\%U\.9xprofile
domain master = No
printer admin = @ntadmin, root, administrator
cups options = raw
include = /etc/samba/dhcp.conf

[homes]
comment = Home Directories
valid users = %S
read only = No
inherit acls = Yes
browseable = No

[profiles]
comment = Network Profiles Service
path = %H
read only = No
create mask = 0600
directory mask = 0700
store dos attributes = Yes

[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/

[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes

[printers]
comment = All Printers
path = /var/tmp
create mask = 0600
printable = Yes
browseable = Yes

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin, root
force group = ntadmin
create mask = 0664
directory mask = 0775


I currently suffer from overload of permutations of smb.conf and lack of understanding of virtually all documentation (which is either condescendingly basic or goes off on tangents explaining all kinds of variations, most of which probably don't apply to me - i.e. I'm not managing any 2000 seat distributed networks that need to access an LDAP address book and MySQL server :shock: )

If I could find a checklist, with some basic illumination, I could probably work out what I need to do, but it appears that that idea has a lot in common with the holy grail!

So any assistance is very much appreciated (more so after 5 days of trying to get this sorted, between putting up coving and picture rail, and fitting the skirting in our bedroom - next will be filling/finishing of those three, so "erindoors" can start papering).

regards

John
"What the large print giveth, the small print taketh away". Tom Waits
User avatar
bigjohn
LXF regular
 
Posts: 393
Joined: Tue Apr 12, 2005 10:19 pm
Location: UK - South Coast

Postby Nigel » Sun Jul 31, 2005 1:38 am

Hi John,

DISCLAIMER : I am not a Samba expert. I know just about enough to get it working for my own limited purposes. But I do have it running on a couple of SuSE machines (8.2 & 9.2), including sharing printers, so hopefully I can be of some help.

Well, I've run into problems with Samba on my laptop, I got the basic server setup OK but my Windows machines can't get to it because they can't resolve it's IP address (the laptop uses DHCP, which means the IP address is assigned by my router - my desktop boxes all use static IP addresses, which from the sounds of it is what you have set up). This is a problem with the way I have my network set up, and not really a Samba problem at all.

So, as you seem to have a basic Samba installation already (you can see your Linux machine from your Windows machine) I'll see if I can help out using my desktop Linux box, also using SuSE 9.2, as a point of reference. This does already have a working Samba setup on it.

From previous posts, I get the impression that you have SWAT (Samba Web Administration Tool) set up. If not, do so now - it makes life sooo much easier. If you have it set up still, you can skip the next two paragraphs.

SWAT should have been installed as part of the Samba package, but you need to run YAST to enable it. Go to the Network Services section, click on "Network Services (inetd)" - the icon with the traffic lights. inetd (or xinetd, which is an improved version of inetd) controls some of the services that can run on a UNIX machine - things like ftp and telnet servers.
By default, SuSE has inetd turned off, so the first thing you need to do is to click the Enable button. Then scroll down the list of possible services until you come to one called swat. Click on it and then click the Toggle Status button so that the word "On" appears next to it. Click Finish.

Now let's see if we can access SWAT. Open your favourite web browser and enter the URL
http://localhost:901
You should be rewarded with a login prompt - enter the username root and the password you set for the Samba root account when you installed Samba - if you didn't do this, I find the normal root password usually works.
You should now be at the SWAT Home page. If you installed the Samba documentation you can access it from here. You might find it useful to bookmark this page.

Now you need to set up access to Samba. You are using USER based sharing (which is the recommended method), so when your windows box tries to access the Samba server it has to supply a username and password.
Samba maintains it's own password file (so you don't necessarily have to have the same password to log into your Linux machine as you do to your Windows machine), but it does insist on you having a user set up on your Linux machine with the same name as the one you use on the Windows box.

First question - on your Windows machine, what is your default login method ? The one you need is "Client for Microsoft Networks" - this is one of the things you can set if you right-click on Network Neighborhood and select Properties.

Secondly, do you have a username and password set up for Microsoft Networking on the Windows box ? This is what you enter when you start the machine up when "Client for Microsoft Networks" is your default login method. The password should NOT be blank !

Thirdly, is your username on the Linux box the same as the username on the Windows box ?
If not, either change the username on the Windows box, or add another user to Linux with the same username as you use on Windows (not necessarily the same password, but you can if you like).

Now, in SWAT, click on the PASSWORD button. The Password Manager has two sections - "Server Password Management" and "Client/Server Password Management". We are only interested in the first one.
In the "Server Password Management" section, change the username to whatever username you use on your Windows box. In the New Password box, type in your Windows password. Repeat in the Re-type New Password box. Then click the "Add New User" button.
If you get a message appear below this button "Failed to initialise SAM_ACCOUNT for user xxx", you don't have a user of that name on your Linux box. Go add one and then try again.
If it says "Added user xxx", then click the "Enable User" button. If you don't do this you still won't be able to access the Linux machine from your Windows machine. You should get the message "Enabled user xxx"

Now go reboot the Windows box. When you have logged in again, go to Network Neighborhood. You should see your Linux machine as part of the JOHNSGROUP workgroup. If it doesn't appear immediately, wait a few minutes and try again - Win98 can take quite a while to figure out what other machines it is supposed to know about !
Once you can see your Linux machine, double-click on it. You should then see the shares that are set up in smb.conf, in particular one that has your username as a name. Double-click on that and you should be browsing your home directory...

Let me know if you can get this far. If not, we'll try to sort out why not before we go any further.

BTW - did you get an explaination of what a "share" is ?
A "share" is an item that is made available over the network for other machines to access. On Windows machines it is often the C: drive, although XP bitches at you if you try to share out an entire disk. Often it will be something like "Shared Documents". Using Samba, a share is a directory name on the machine that is running Samba. When another machine connects to that share it can see the contents of that directory and all subdirectories, but it cannot see anything else.
Oh, and just to confuse matters, a share can also be a printer.
Hope this helps,

Nigel.
User avatar
Nigel
LXF regular
 
Posts: 1141
Joined: Fri Apr 08, 2005 8:03 pm
Location: Gloucestershire, UK

Postby bigjohn » Sun Jul 31, 2005 5:46 pm

Nigel,

Thats bloody brilliant. I even did a test too see if I could send something to one of the printers (well the laser actually) to see if it would get anything.

Bingo, it did. Which has solved at least one pressing problem, as Clare has to have some of her paperwork printed off for school tomorrow (shes an Infant School teacher).

So what do I need to do next i.e. I'm thinking that I should be able to browse the desktop of the windows pc from the linux pc, plus where do I stand with disconnecting the laptop from the system etc.

Your help thus far, has been beyond price, but if you're down around the Sussex Coast anytime, then mail/PM me, so I can see if I can get the time to stick some beer down your neck!

regards

John.

p.s. I know that "her" laptop is elderly (pentium II thinkpad) but it surprised me how long it took to make the new login account !
"What the large print giveth, the small print taketh away". Tom Waits
User avatar
bigjohn
LXF regular
 
Posts: 393
Joined: Tue Apr 12, 2005 10:19 pm
Location: UK - South Coast

Postby Nigel » Sun Jul 31, 2005 6:48 pm

Hi John,

glad it worked for you.

In theory it is possible to set things up so that you can browse the shares on your Windows machine from your Linux box, but I've not had any success doing that in the past - to be honest, I haven't actually tried very hard as it isn't all that important for me. But I'll have another go at it later tonight and let you know what happens.

If your laser printer is connected directly to your hub, you should be able to print to it directly from the Windows machine without using the print queue on the Linux machine - that's how I have my LaserJet set up. But that's something to sort out another day :)

You don't have to worry about disconnecting the laptop from the system - just shut it down & pull the network cable. It should still work fine when you take it elsewhere (although obviously you won't be able to browse your Samba shares unless you are connected to the network...).

More later (with any luck)...


Nigel.
User avatar
Nigel
LXF regular
 
Posts: 1141
Joined: Fri Apr 08, 2005 8:03 pm
Location: Gloucestershire, UK

Postby Nigel » Sun Jul 31, 2005 11:42 pm

Hmmm, that was frustrating...

I installed LinNeighborhood using YAST, but still had no joy in browsing the network. So I turned off the SuSE firewall, messed about a bit more, and suddenly I could see the network. Not only that, but I could go to Konquerer, open the Network tab, select Local Network then Windows Network and see everything.

OK, I think, maybe LinNeighborhood is a red herring, and all I need do is turn off the firewall (until I figure what port I need to open). So I uninstalled LinNeighborhood & rebooted. With the firewall on I couldn't see the Windows Network. WIth it turned off, I still can't browse my workgroup. BUT, by entering one of the Windows machine names as the workgroup name (in YAST -> Network Services -> Samba Client), I get to see my workgroup, but all I can see are the Samba shares from my Linux machine. :evil: Which is not the same machine as the name I put in the Workgroup setting

So there's still something I don't understand here.

I'll give it some thought and have another go later in the week.
User avatar
Nigel
LXF regular
 
Posts: 1141
Joined: Fri Apr 08, 2005 8:03 pm
Location: Gloucestershire, UK

Next

Return to Help!

Who is online

Users browsing this forum: No registered users and 0 guests