# need help setting up samba (was: Print and file sharing)

## tom56

I have set up a wireless home network today (in that everything is using the same broadband connection).  How can other computers on the network (which all run Windows, btw) look at files on my computer.  I think I need file sharing and I did some searches, but it was all waaaaay too confusing.  I also want other computers on the network to be able to print using the printer attatched to my computer.  How do I achieve these two things?

Tom.

EDIT: forgot to mention that this computer is attatched to the router by a wire, but the other computers are using wireless

----------

## mekong

What you need is "emerge samba" http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/

----------

## befortin

Read this.

----------

## tom56

Gah! So many acronyms!!

Anyway, I worked my way through the guide, not really knowing what I was doing until I get here and suddenly everything stops: *Quote:*   

> It would probably be prudent to check our logs at this time also. We will also want to take a peak at our Samba shares using smbclient.
> 
> Code Listing 4.19: Checking the shares with smbclient
> 
> # smbclient -L localhost
> ...

 

And this happens:

```
root@localhost tom # smbclient -L localhost

Password:

session setup failed: NT_STATUS_LOGON_FAILURE

```

What did I do wrong?

----------

## Ateo

 *tom56 wrote:*   

> Gah! So many acronyms!!
> 
> Anyway, I worked my way through the guide, not really knowing what I was doing until I get here and suddenly everything stops: *Quote:*   It would probably be prudent to check our logs at this time also. We will also want to take a peak at our Samba shares using smbclient.
> 
> Code Listing 4.19: Checking the shares with smbclient
> ...

 

If you haven't set up /etc/samba/smb.conf, trying to connect to yourself won't work since you most likely haven't defined any shares... So, first thing is first.... did you configure /etc/samba/smb.conf?

Following this detailed guide might help you: http://gentoo-wiki.com/HOWTO_Samsung_ML-1710_with_Samba/CUPSLast edited by Ateo on Fri Apr 08, 2005 10:30 pm; edited 1 time in total

----------

## tom56

Yes, I went through the guide (not the one you mentioned, the one above) step by step.  I'm not sure how well I did it though, as it uses loads of jargon without ever bothering to explain what it means.

----------

## Ateo

 *tom56 wrote:*   

> Yes, I went through the guide (not the one you mentioned, the one above) step by step.  I'm not sure how well I did it though, as it uses loads of jargon without ever bothering to explain what it means.

 

Well, I wrote that wiki so it's pretty detailed... Everything, except where babies come from, is explained...

----------

## tom56

I will try to start from scratch using that guide if I can't get what I have already to work.

Is there any way of doing this with Gnome? I swear I remember seeing a setting with something along the lines of "share this printer" but I can't remember how I did it!

----------

## Ateo

 *tom56 wrote:*   

> I will try to start from scratch using that guide if I can't get what I have already to work.
> 
> Is there any way of doing this with Gnome? I swear I remember seeing a setting with something along the lines of "share this printer" but I can't remember how I did it!

 

Your guess is as good as mine. I'm a KDE user. I'm pretty sure there is a front end to samba for Gnome but I'm not sure how well it works. You best just get used to configuring files if you want to succeed with linux. Config files are the heart of a linux system.  :Smile: 

----------

## befortin

You can always use SWAT (a website) to configure Samba, though configuring smb.conf is easy.

----------

## tom56

To be honest, it's not config files that put me off.  I am a fairly competent user (most of the time).  However networking really confuses me, there's so much jargon and so many acronyms.  All I want to do is click a big button on my desktop labelled "Make everything work how you want" and leave it.

----------

## Ateo

 *tom56 wrote:*   

> To be honest, it's not config files that put me off.  I am a fairly competent user (most of the time).  However networking really confuses me, there's so much jargon and so many acronyms.  All I want to do is click a big button on my desktop labelled "Make everything work how you want" and leave it.

 

LOL. I can relate. I definately prefer just clicking and hope for the best. Unfortunately, that isn't the case with linux.. or so I've learned.. you gots to dirty your hands... In anycase, shoot me a PM if you have any questions covering that wiki guide...

 *befortin wrote:*   

> You can always use SWAT (a website) to configure Samba, though configuring smb.conf is easy.

 

Webmin is also another alternative. Webmin might be better suited as Webmin gives you complete (well, module dependant) configuration control of your system..

----------

## tom56

I didn't think to try using webmin.  I'll do that.  Expect an update soon!

----------

## tom56

Right.  I'm going to give up on SAMBA for a bit, and just try and make sure networking is set up on my Windows laptop correctly.  I thought it was set up properly, but I go to Networking under Computer in Gnome, and Windows Network is listed but when I open it there's nothing there.  I set a folder as shared on the Windows laptop, so why isn't it showing up?

----------

## tom56

OK, I'm nearly there.  Don't laugh, but I found out why it wasn't working.  My firewall was blocking the connection  :Embarassed: 

Anyway, I can now view things on the Windows laptop from the Gentoo machine, and the Gentoo machine is listed in my Network Places thingy on the Windows laptop.  However (cue more embarrasment), it asks for a password when I try and open it and I have no idea what it is  :Embarassed: 

----------

## befortin

Create a user and use smbpasswd to set its password.

----------

## chemmett

If you haven't set a password, it's probably blank. Samba asks regardless unless you tell it otherwise.

----------

## tom56

Everything is working now except the printer.  I have an HP PSC 750 that works fine in Linux using cups.  I now want to be able to use it over then network from the Windows laptop.  I have tried everything but it still won't work.  Here is my smb.conf:

```

[global]

workgroup = MSHOME

netbios name = HPPAV

server string = Gentoo running on HPPAV

encrypt passwords = yes

invalid users = root bin daemon adm sync shutdown halt mail news uucp operator gopher

printcap name = cups

load printers = cups

printing = cups

[printers]

comment = All Printers

path = /var/spool/samba

browseable = no

public = yes

guest ok = yes

writable = no

printable = yes

printer admin = root

print command = lpr -P %p -o raw %s -R

[print$]

comment = hp_psc_750

path = /etc/samba/drivers

browseable = yes

guest ok = no

read only = yes

write list = root

[samba-public]

path = /home/samba/public

browseable = yes

read only = no
```

Any ideas?

I tried installing it normally on the laptop (i.e. using the disc that came with it and plugging in by the USB port) the port to print to in the settings from the default to \\HPPAV\hp_psc_750 but trying to print a test page still pops up a window saying it can't see the printer.

----------

## tom56

Hurrah!  I got it to work!  I needed to change

```
print command = lpr -P %p -o raw %s -R
```

to

```
print command = lpr -P %p %s
```

Thank you for all the help everyone!!!

Tom.

----------

