# I'm new to samba, help

## kormoc

DeletedLast edited by kormoc on Mon Dec 24, 2018 9:08 am; edited 2 times in total

----------

## jtmace

are you running the smbd and nmbd daemons?? 

i believe you start nmbd first then smbd..   basically all you have to do is setup /etc/samba/smb.conf.  run smbpasswd and add the user you want to be able to login. 

run nmbd and smbd 

then login to winblows box as the user you added with smbpasswd, and connect to a share...  BAM

P.S  make sure your not running a firewall ...    i had that prob once and i almost pulled out 2 handfuls or hair trying to figure it out

----------

## kormoc

DeletedLast edited by kormoc on Mon Dec 24, 2018 9:11 am; edited 1 time in total

----------

## metalhedd

I've tried to get that same thing working too (the 'no logon required' thing) never seems to work, I just gave up and created accounts for everyone.

Samba is a nasty nasty animal.  but It does some pretty nifty stuff.

----------

## Dolio

Hey. I've been fooling around with samba for several hours now trying to come up with how to let anyone log in, and I think I found it. Here goes:

First, I have encrypt passwords on, not sure if that matters or not. Okay first, go into your smb.conf file and in teh globals section, add

username map = /etc/samba/smbusers

Which is where it's installed by default (for Gentoo, at least). Now, go into /etc/samba/smbusers, and have it look something like this (my linux username is dolio):

! root = administrator admin

! dolio = dolio

nobody = guest pcguest smbguest *

The ! makes the username map stop looking if it matches on that line, and the * matches all names (so if you log in as dolio, you want it to break after seeing you're mapped to dolio, rather than going on and thinking you're another anon user).

Now, I thought that was all that had to be done before, but that's not quite it. Now you need to set up the samba encrypted password accounts as follows (as root)

(for the root account)

smbpasswd -a

(enter your passwords)

smbpasswd -a "dolio"

(dolio's password)

smbpasswd -a "nobody"

(the anon password. I just hit enter twice)

I just tried logging on from a networked Windows box, and just pressing enter when it prompts for a password works!  Note, if you use a different name on a windows computer (Like, my name is Dan on the other computer), you can map it to your acount like this:

! dolio = dolio Dan

in smbusers.

Hope that works for you. It seems it's worked for me.

----------

## Dolio

Hrm. Well, I did a little more fiddling, and it seems that what I did just makes a samba account called nobody that maps to everyone that's not specified earlier.

So, if you let them, they can log into //computer/homes and they'll be sitting in the root directory (at least, that's what happens to me, not good), so on your [homes] entry, you probably want to put

valid users = dolio root

to actually limit its use to people who have home directories (or you could make a nobody user on your account and give them an actual home directory, but it would be shared with all anon users).

I'll post more about this if I find out important stuff.

----------

## metalhedd

thanks for the info, I'm gonna give it another crack with all theinfo you posted as soon as I get home from work  :Smile: 

----------

## kormoc

DeletedLast edited by kormoc on Mon Dec 24, 2018 9:15 am; edited 1 time in total

----------

## metalhedd

if I had to guess I'd say that nmbd is starting before the rest of your networking is up and running... just a guess of course. all the bootstrap/init/rcwhatever stuff is pretty much greek to me right now.

----------

## gabbababbahey

I had the same problem as kormoc, where nmbd would report 

```
[2002/07/05 09:08:23, 0] nmbd/nmbd.c:main(794) 

  Netbios nameserver version 2.2.5 started. 

  Copyright Andrew Tridgell and the Samba Team 1994-2002 

[2002/07/05 09:08:24, 0] nmbd/nmbd.c:main(826) 

  standard input is not a socket, assuming -D option 

[2002/07/05 09:08:24, 0] nmbd/nmbd_subnetdb.c:create_subnets(239) 

  create_subnets: No local interfaces ! 

[2002/07/05 09:08:24, 0] nmbd/nmbd.c:main(872) 

  ERROR: Failed when creating subnet lists. Exiting. 
```

Turns out, metalhedd's guess was right on the mark for me. Remembering that I had RC_PARALLEL_STARTUP="yes" set in /etc/conf.d/rc , I added "after *" to /etc/init.d/samba. This'll force samba to load after all other services, works like a charm.

```
depend() {

        need net

        use cupsd

        after *

}
```

Last edited by gabbababbahey on Wed Nov 12, 2003 5:19 pm; edited 1 time in total

----------

## metalhedd

Wow, over a year ago. that's an old thread to be dragging up.  :Smile: 

----------

## gabbababbahey

The search function is useful   :Very Happy:  , just thought i'd add some more info for future users.

----------

## warer

You solved my problem thanks  :Smile: 

----------

## fng

search function is idd usefull for beginners like me  :Smile: 

----------

