LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba for the stupid (me) (https://www.linuxquestions.org/questions/linux-networking-3/samba-for-the-stupid-me-395009/)

bigjohn 12-20-2005 04:18 PM

Samba for the stupid (me)
 
Ok, so I want to use Samba so that my partner can print directly to the inkjet printer that is connected to the main linux desktop (Mandriva 2006) from her W98 laptop.

Mandriva desktop has 2 icons that should (theoretically) be able to look at workgroups/shares etc. Ones called devices, the other is called network browsing.

Now if I type in smb://workgroup into konqueror, I can see the laptop and can print any docs or modify any file she wants. If I try either of the icons, the system comes back with an error that it can't find any workgroups on the local network.

Also, the linux desktop is currently invisible from the laptop. I can see the workgroup in the "network neighbourhood", but that only shows the laptop. Hence I can't "add" the printer as networked, and of course it doesn't make any difference to "add" the printer as a local one.

The smb.conf that I'm currently using is one that I had tried ages ago when I had SuSE 9.3 installed and that distro somehow produced it - I think via SWAT.

It looks like this:
Quote:

# Global parameters
[global]
workgroup = mdkgroup
security = share
map to guest = Bad User
username map = /etc/samba/smbusers
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
paranoid server security = no
preferred master = no
max protocol = NT
ldap ssl = No
server signing = Auto
netbios name = thinkpad

[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

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin, root
force group = ntadmin
create mask = 0664
directory mask = 0775
Now I suspect that theres a fair bit of that that isn't necessary, but as it was auto generated in some way - and my samba knowledge could be written on the back of a small postage stamp, I have no way of telling (no technical knowledge/understanding/mindset).

It's taken me nearly a fortnight to get as far as this - strictly on a "hit or miss" basis. So any assistance would be greatfully appreciated.

regards

John

camorri 12-21-2005 09:50 AM

One obvious problem, if you can "see" the laptop using (wind bloze default name) and in your smb.conf file you have a workgroup=mdkgroup (default name created by the wizard) Make them the same on both boxes. Probably it is easier to edit the linux box than play with the other box, but it is your choice.

Make them match and let us know what happens.

bigjohn 12-21-2005 09:55 AM

Quote:

Originally Posted by camorri
One obvious problem, if you can "see" the laptop using (wind blaze default name) and in your smew.conf file you have a smew=smew (default name created by the wizard) Make them the same on both boxes. Probably it is easier to edit the linux box than play with the other box, but it is your choice.

Make them match and let us know what happens.

I don't understand what you mean by "smew"? Could you explain that please ? I also am unfamiliar with "wind blaze default name".

regards

John

camorri 12-21-2005 10:33 AM

Quote:

I don't understand what you mean by "smew"?
Sorry for the confusion, the spell checker on the site messed up my post and I didn't notice it.

I did an edit to correct it. I guess you saw it before I fixed up the error. Here is what I meant to say.

Quote:

One obvious problem, if you can "see" the laptop using (windoze default name) and in your smb.conf file you have a workgroup=mdkgroup (default name created by the wizard) Make them the same on both boxes. Probably it is easier to edit the linux box than play with the other box, but it is your choice.

Make them match and let us know what happens.

bigjohn 12-21-2005 06:59 PM

Quote:

Originally Posted by camorri
Sorry for the confusion, the spell checker on the site messed up my post and I didn't notice it.

I did an edit to correct it. I guess you saw it before I fixed up the error. Here is what I meant to say.

Oh right, sorry to seem "picky", but theres just so many acronyms that I'm unfamiliar with.

Yes, I have both boxes (linux desktop and laptop) pointing at mdkgroup (I'll double check of course, as I think the actual default is mdkworkgroup). Though a stupid typo on my part could well explain why it's not seeing the workgroups on the LAN.

Thankyou for the suggestion - I'll check and post back.

regards

John

bigjohn 12-21-2005 07:41 PM

So now I'm really confused. I haven't changed anything, but looking at what appeared in the "dropdown" under the network browsing icon/option, when I told it do check "samba shares", initially it said the same error i.e. no workgroups found in LAN - but looking at the dropdown, there appeared to be an "smb://mdkgroup - a quick check of which showed "/laptop" excellent, it seems to now see the workgroup - some of the time.

If I check the laptop (elderly W98 don't forget) I still only see mdkgroup if I look in the "entire network". But looking in to that, just shows up the laptop, not the linux desktop. So somethings still not right there - I'm just rebooting the laptop too see if it's possibly connected to cached networking information.

Nope, it's not that. If I try to shut of the Zone Alarm on the laptop, it won't even let me browse the network to see "thinkpad" i.e. itself. I've put the linux box into the firewall on the laptop as "trusted", but that doesn't seem to make any difference - it must, as far as my drink sodden mind be a config setting - I'm having too suspect that it must be something to do with the smb.conf - that should be the only thing that might stop the desktop "getting out" to the laptop.

Ha ha! (hic - sorry family "crimbo drinkies" this evening). Thats as far as my limited understanding goes. The smb.conf is as I posted earlier.

regards

John

p.s. thanks for the reply - I've only been trying to sort this for 2 weeks now. Any ideas/info/suggestions are greatfully received.

camorri 12-22-2005 09:28 AM

To get this working, I believe there is no simple answer. I have spent some time looking at some of the options in your smb.conf file.

There are some things I recommend, and making the workgroup names on both boxes the same will simplify the task.

Security=share option, this one I have never used. I have always used security=user. With that you have to sign on to the linux box, other wise you may well be leaving your self wide open to unwanted attacks.

Have you created a user on your linux machine for the W98 trying to access the linux box?

Here is a link to the best documentation I have found on samba.

http://us1.samba.org/samba/docs/using_samba/toc.html

This is where I go to find answers. I hope this helps.

bigjohn 12-22-2005 05:16 PM

Thanks for the link camorri - it's one I'll _HAVE_ too read (I suppose). Though it sort of highlights my moans, it's what I'd refer to as "over technical" - the stuff thats out there for samba (and a lot of other apps/facilities), theres an absolute deluge of stuff, but it's either over technical or poorly written.

Which is IMO a shame, as I feel that new users, who feel that they'd like to "give linux a go", are often put off, because when they have a look for info it's one of the above. Thats not helpful - of course theres places like here at LQ, peopled with excellent, helpful folk - but thats not the point, the docs shouldn't require a degree in computer science to read and understand - or if they're crap ones, in depth knowledge of mind reading!

Oh well, back to the drawing board (Ha! and the samba docs link you posted.

regards

John

camorri 12-23-2005 08:57 AM

I understand your frustration with Samba. Samba is a complex program to do secure file sharing with windoze machines. It is suitable for the corporate enviornment, and as such has to be able to be very flexable, and very secure. It is all those things. That is why it is very complex to configure.

Here is another link. When you go there, look down the left side. You will see a link to Samba confirurations by example. The first example is as simple as it gets.

http://us5.samba.org/samba/

Swat is supposed to make configuring simlpler, but that is a relative term.

I used Webmin to configure it the first time. If you want, Webmin is available for most distros as an RPM. I installed using URPMI on my Mandriva systems. You access Webmin through your web browser. Webmin then accesses the smb.conf file and gives you nice input panels to set up your options for Samba. It doesn't help much trying to figure out which options to choose however. You will need to do some reading, and decide what is right for you.

I think the first example at the link above should be close to what you need.

bigjohn 12-23-2005 02:55 PM

Quote:

Originally Posted by camorri
I understand your frustration with Samba. Samba is a complex program to do secure file sharing with windoze machines. It is suitable for the corporate enviornment, and as such has to be able to be very flexable, and very secure. It is all those things. That is why it is very complex to configure.

Here is another link. When you go there, look down the left side. You will see a link to Samba confirurations by example. The first example is as simple as it gets.

http://us5.samba.org/samba/

Swat is supposed to make configuring simlpler, but that is a relative term.

I used Webmin to configure it the first time. If you want, Webmin is available for most distros as an RPM. I installed using URPMI on my Mandriva systems. You access Webmin through your web browser. Webmin then accesses the smb.conf file and gives you nice input panels to set up your options for Samba. It doesn't help much trying to figure out which options to choose however. You will need to do some reading, and decide what is right for you.

I think the first example at the link above should be close to what you need.

Ok Cliff, I'll give that a try as well. I have tried both webmin and SWAT. Unfortunately neither of them are particularly intuitive when it comes to selecting the various options - you have to know what the various options are - or so it would appear.

I will also try this second link (above), I started reading my way through that first one - but there seems to be a lot of stuff I probably don't need to know (and don't really want to - it would be nice to be able to get a proper working version with some basics - afterall, all I need to connect for the moment is the laptop to the main linux box so that it will print from the inkjet paralleled to the main linux box).

Really the first link is just too in depth - but I have to persevere if I want to get this going properly - It's a shame that it's such "hard work" - a bit like a cross between War and peace/Das Kapital - with a smattering of badly tranlated instructions for "flat pack" furniture (from the original Korean :D ).

obviously I'll post back with any questions - but not too night, I'm exhausted - nothing more than 4 hours sleep per night for the last 5 or 6 nights (thats how I know that reading up on Samba is such bloody hard work!).

regards

John


All times are GMT -5. The time now is 10:44 AM.