# Samba... help?!?!?

## goldfish777

I'm sooooo lost. I can't figure out how to configure and set up samba!!! I emerged samba, cups, readline, pam, net-fs/samba, and net-print/hplip. I stared at this page: http://www.gentoo.org/doc/en/quick-samba-howto.xml Please help?

----------

## John R. Graham

Gonna hafta describe some problem in detail before anyone can help ya.

- John

----------

## goldfish777

I apoligize, yesterday, when I was posting, my mind was going bye-bye. In short, I had been working on Gentoo for most of the day and I was losing it. I guess I am mainly getting lost with how to set up the conf file. I know certain things that have to be like the workgroup but, other than that I can't make heads or tails of it.

----------

## John R. Graham

Well, let's start with what you want to do.  Are you trying to share storage on a Linux machine or use storage on a Windows machine?

- John

----------

## goldfish777

I have a couple other Windows machine on the network. I also have a network printer and a printer that is running off of one of the other computers. I would like to share the files for this box so the Windows machines have access but have to input a password. I am hardwired to my network.

----------

## Mike Hunt

I used mostly  this HOWTO at first. It did help me to get a basic understanding and a working basic samba with networked printing up and running.

The entire HOWTO is a great reference for more specialized deployments, and there are plenty of example configurations too.

----------

## goldfish777

Looking at the link, it seems to be very helpfull. Thankyou very much. But, the line "comment = Data" what does that do?

----------

## Mike Hunt

 *http://www.samba.org/samba/docs/using_samba/appb.html wrote:*   

> comment = string	
> 
> Allowable values: string
> 
> Default: NULL
> ...

 

As in:

```
[homes]

comment = Home Directories

valid users = %S

read only = No

browseable = No
```

Last edited by Mike Hunt on Fri Mar 26, 2010 8:43 pm; edited 1 time in total

----------

## goldfish777

Ok, how do I install my printer using the CUPS Web interface?

----------

## Mike Hunt

The Gentoo Samba3/CUPS HOWTO you referred to previously is a great place to start.

Get your samba working first, then add the printing support, etc...

In your browser go to http://localhost:631 for the CUPS Web interface.

----------

## goldfish777

I cant connect to that webpage

----------

## John R. Graham

If you've installed cups, then it means you have not yet started cupsd.  Do the following

```
/etc/init.d/cupsd start
```

to get it going now, and

```
rc-update add cupsd default
```

to ensure that it'll be started every time you start your system.  These steps are in the guide, by the way.    :Razz: 

- John

----------

## goldfish777

I have a Windows network. do I need to change /etc/nsswitch.conf in any way to adjust for that?

----------

## Mike Hunt

That is also in the guide:Code Listing 4.4: Editing /etc/nsswitch.conf

```
# nano -w /etc/nsswitch.conf

(Edit the hosts: line)

hosts: files dns wins

```

----------

## goldfish777

I did see that line part of the guide and thought about saying "besides 'wins' in the 'hosts' line" in my last post.

----------

## goldfish777

So then, I should have my network all set up. How do I browse my network and access other computers?

----------

## Mike Hunt

That's in the HOWTO that I suggested:

```
root# smbclient //<server>/<user> -U<user>%secret

OS=[UNIX] Server=[Samba-3.0.20]

smb: \> dir

.                              D        0  Sat Jun 21 10:58:16 2003

..                             D        0  Sat Jun 21 10:54:32 2003

Documents                      D        0  Fri Apr 25 13:23:58 2003

DOCWORK                        D        0  Sat Jun 14 15:40:34 2003

OpenOffice.org                 D        0  Fri Apr 25 13:55:16 2003

.bashrc                        H     1286  Fri Apr 25 13:23:58 2003

.netscape6                    DH        0  Fri Apr 25 13:55:13 2003

.mozilla                      DH        0  Wed Mar  5 11:50:50 2003

.kermrc                        H      164  Fri Apr 25 13:23:58 2003

.acrobat                      DH        0  Fri Apr 25 15:41:02 2003

      55817 blocks of size 524288. 34725 blocks available

smb: \> q

```

Please follow the Guides and HOWTOs carefully.  :Smile: 

----------

## dE_logics

Man...SAMBA is IMPOSSIBLE to set up man!...I quit!...I gave it up! The Windows network is itself buggy (you gotta re---boot every time, and at time re--install if you do the smallest change), then there comes problems with the configuration...that too by hand and with the tons of options that SAMBA offers!

Instead I install Unix servers for Windows on the windows compromised machines and do file sharing though NFS.

Clean, simple, secure.

----------

## goldfish777

Ok, I am having troubles.  My workgroup is called AV1611. I have a Verizon FIOS router. I am connected via CAT5 cables directly. I cant seem to get Samba set right.

I put in the command to browse the network and got this error output:

```
Connection to AV1611 failed (Error NT_STATUS_BAD_NETWORK_NAME)
```

what do you need to know about my network? I cant sem to get it set right. Maybe you guys can help.

----------

## goldfish777

I gained some new information about my network. In the smb.conf file, the line "server string" do I put my DNS server name in there? Mind you, this machine is not the server for the network. The router it the server. Am I supposed to put that name instead of "Smb Server %v"

----------

## goldfish777

i have advanced greatly in setting up of Samba so I may not need much more help. You can nix those last two posts because I have gotten past that.

----------

## Mike Hunt

Good. That's what I was talking about. And the big plus is that you have learned much more.  :Smile: 

----------

## goldfish777

Ok, I have gotten to the point where I can be seen by the other computers in the network. The problem I am having is that I can't figure out how to actually browse the network. Also I dont have a WINS server. The server for the network its the router, a DNS server. How do I set samba for that?

----------

## goldfish777

I may have the DNS thingy set right. I can ping the machines in my network and they can ping me. I cant figure out how to access the other computers in the network. PLEASE HELP! Im lost.

----------

## John R. Graham

Dude, when things don't work, you've got to give details.For mounting Windows or Samba shares under Linux, from the Gentoo Samba3/CUPS HOWTO, have you tried the instructions under Code Listing 5.6: Mounting a Windows/Samba share?

For mounting a Samba share from Windows, have you tried opening Explorer and clicking on Tools/Map Network Drive (and following normal Windows procedure from there)?If not, then please try those things (a gentle suggestion to RTFM might be in order).  If so, then tell us what happened!

- John

----------

## goldfish777

Ok I can access the linux box from my windows machine but the issue I am having is the command "smbclient //<server>/<service> -U<username>%<password>" I cant figure out what to put into "<server>" lthe name of the windows box that I want to access is called "sig" that would in "<service>" right? The server for our network is the FIOS router but cant find a name for that router. All I have is its ip but it fails to connect to that ip. the linux box can see the other machines cause I can ping them using their network names (ie "ping sig" and it pings it and each time receives packets. The name for my work group is called AV1611. 

Also I tried load the cifs module but it didn't work. I did go into the kernel config(make menuconfig) and set it as a module but when I did the load command it couldn't find it and failed.

I apologize I have been struggling for days reading though manuals and messing with smb.conf I am learning tons about the network and all of it is giving me a headache. Its fun though just kinda hard at this point. I feel like my mind is going. A couple of post have been me just posting out of desperation after working on it all day long. I am going to slow down and keep a cool head, hopefully. lol

Hopefully, I gave enough details.

----------

## John R. Graham

 *goldfish777 wrote:*   

> ... but the issue I am having is the command "smbclient //<server>/<service> -U<username>%<password>" I cant figure out what to put into "<server>"

 A server is a machine that provides a service.  Most networks have more than one.  Sharing a (portion of a) drive is a service, thus sig is a server and is the server that you want.  The "share name" is the service.

However, I'm confused.  Can  you tell me what your goal is?  What are you trying to do with that command?  Also, when you report a failure, please post the exact command you issued followed by the exact error messages you got.

Sorry to shout, but it's important. Really.

- John

----------

## goldfish777

Shouting is fine. I wont be able to post for the next couple of days. I will be back on the forum probably Saturday or Sunday. I will post the error output then.

----------

