# samba-linux/windows Don't know where to start...

## Rukie

I'd like to get myself setup to be able to access the printer on my windows machine int he other room.... but being new to linux I have NO idea where to start. I did a quick google and it seems I need Samba to recognize some of the windows protocols. Anyways, I ran an esearchand found both samba and samba-tng. Is it preferred to take the tng (The next generation of samba)? Any advice or a link to a detailed howto would be lovely.

thanks in advance.

----------

## MatrixM

I've never setup samba for use with printers, but I've got samba running in my home network for file sharing and it works nicely (with the exception of the 2GB limitation for single file writes accross the samba link). I used the documentation found at The Linux Documentation Project (or http://tldp.org if you will). The samba HOW-TO can be found directly at:

http://www.tldp.org/HOWTO/SMB-HOWTO.html

I don't remember if it had information on setting up printers directly or not.

As for wether to use samba or samba-tng, I'm using just the regular samba itself, and have had no problems. I'd recommend reading some information at samba.org and samba-tng.org (and possibly the forums at those two sites) for some possible comparisons.

edit: Another place you might check for help with setting up the samba intially is: http://gentoo-wiki.com/HOWTO_Setup_Samba

----------

## Rukie

Erm, which variabl edo I adjust to join workgroup "MSHOME"?

----------

## aceFruchtsaft

You should definitely use the HOWTO at samba.org since the one at tldp.org is outdated.

http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/

Also, if you do not want to edit smb.conf yourself, you should set up SWAT which provides context-specific help for all configuration options.

----------

## Rukie

swat? I'm very new to linux networking so please don't assume I know something lol...

Edit: Ah, the computer I'm posting from is the computer with samba on it... I opened up firefox and went to myself, localhost on port 901.. and said nothign was there heh.. 

Also, when setting up the smb.conf.. how do I set the netbiosname? 

Do I have to set a subnet mask? If so how... heh

extreme details are helpful.. heh.. thanks  :Smile: 

Edit: Edit: Swats turned on now (enabled) but still no start, does linux have to reboot to initialize it?

Ok, I just figured out that my other machine was running on a different IP than I thought!

So.. I just ran smbclient -L 10.10.10.5, asked for a password, and wala.. it showed me everything. Now, how do I make it work for smbclient -L "Computer 600" ? How can I specify a password?

----------

## Rukie

How do I mount the folders that are on the other computer?

----------

## mahdi1234

use something like this ...

smbmount //win_machine/share /mnt/smb/ -o username=administrator,rw,uid=500

you don't have to specify username if that worked for you ... rw mean read/write acess and uid is uid of your normal user, so you don't have to be root to be able to write ...

you find your uid in /etc/passwd

----------

## aceFruchtsaft

So if SWAT is still not running:

1) emerge xinetd, you will need that one.

2) edit /etc/xinetd/swat and edit the following line

```

disable         = yes

```

to read

```

disable         = no

```

in order to active SWAT.

3) Start xinetd with

```

/etc/init.d/xinetd start

```

You can access SWAT at http://localhost:901 after that an configure all options.

----------

## Rukie

Hmm.. all I had to do was restart xinetd... but now it wants a password and I have no idea which one lol..

----------

## aceFruchtsaft

 *Rukie wrote:*   

> Hmm.. all I had to do was restart xinetd... but now it wants a password and I have no idea which one lol..

 

usually root + root password, unless you messed with smbpasswd.

----------

## Rukie

I had, following the instructions I added passwd in there.. removed and now it works thanks  :Smile: 

----------

## Rukie

I'm more lost now than I was before...

All I want to do is mount another computer's harddrive/folders lol

smbclient -L 10.10.10.5 showsme everything shared... I just want to mount one of those folders/harddrives...

----------

## mahdi1234

to mount windows share uder linux do ...

smbmount //win_machine/share /mnt/smb/ -o username=administrator,rw,uid=500

username is windows username ... rw mean read/write acess and uid is uid of your normal user, so you don't have to be root to be able to write ...

you find your uid in /etc/passwd.

You need of course have that share available for username you specify. Also mnt/smb must exist.

----------

## Rukie

I get an error saying...

 *Quote:*   

> ERROR: smbfs filesystem not supported by the kernel
> 
> Please refer to the smbmnt( manual page
> 
> smbmnt failed: 255

 

But I HAVE smbfs enabled in my kernel, and I ran make, make install, make modules_install an everything....

Any ideas?

----------

## aceFruchtsaft

Directly in the kernel or as a module? In case it's the latter, did you load the module?

----------

## Rukie

I'm pretty sure directly into the kernel... whats the name of it if its a module? heh

----------

## mahdi1234

run rc-status, you should see then something like

 samba                                                                        [ started ]

or maybe [off],  if not then you probably compiled that as module.

to start it run

/etc/init.d/samba start.

----------

## aceFruchtsaft

mahdi, you don't need to run samba itself in order to mount smb shares.

@ Rukie:

Post the output of

```

grep "SMB\|CIFS" /usr/src/linux/.config

```

so we can see that it's really in there.

----------

## Rukie

 *Quote:*   

> CONFIG_SMB_FS=y
> 
> # CONFIG_SMB_NLS_DEFAULT is not set
> 
> CONFIG_CIFS=m
> ...

 

Do I need NLS on?

----------

## Rukie

bump...

----------

## Rukie

Can anyone please help me?

----------

## Rukie

Erm.. smbmount is for a filesystem/drive... is it for a printer too? How do I mount a windows printer?

----------

## sloof3

Look into cups.

emerge cups

/etc/init.d/cupsd start

Point a web browser to: 127.0.0.1:631

Manage Printer | Add Printer

Go from there.

-sloof3

----------

## Rukie

can't get it to print anything.. :-\

set one up with samba (other windows printer)

//COMPUTER600/HPK60 as my device uri..

its a HP K60 Officejet printer.. I have the HP patch on my kernel.. dunno what to do..

on the other system its a usb printer (if that helps)

----------

## ONEEYEMAN

Hi, Rukie,

I am guessing you are using Gentoo, since you are posting in here   :Smile: 

There is a great Samba HOWTO at this link.

Thank you.

----------

## Shienarier

 *aceFruchtsaft wrote:*   

> 
> 
> usually root + root password, unless you messed with smbpasswd.

 

I can't log in with the root, root password combination.

I havent done anything more then emerging samba.

Is there any way to reset or set the password?

----------

## ONEEYEMAN

Hi, Shienarier,

Do you have Samba installed? Are you trying to mount the XP share as SMB client or CIF client? Or youae trying to connect o Linux from Windows?

Thank you.

----------

