# User samba in passdb, but getpwnam() fails!

## mxa055

Hi,

I followed the Gentoo Samba3/CUPS/ClamAV HOWTO and when I tried the last step for the server (that is to start the samba service) I got this error:

[2005/10/23 21:21:45, 1] auth/auth_util.c:make_server_info_sam(840)

  User samba in passdb, but getpwnam() fails!

in /var/log/samba/log.smbd which ofcourse stopped samba from starting.

Any clues?

Regards,

Michael

----------

## Galabriel

if u insert this command in console u get the error? : /etc/init.d/samba start ????

----------

## mxa055

Yes!

```

 * samba -> start: smbd ...                                                                                                                    [ !! ] 

 * samba -> start: nmbd ...                                                                                                                    [ ok ] 

 * Error: stopping services (see system logs)

 * samba -> stop: smbd ...                                                                                                                     [ !! ] 

 * samba -> stop: nmbd ...                                                                                                                     [ !! ]

```

then I check the log and I find the error mentioned in my first post!

----------

## mxa055

found the problem...

I hadn't added samba user to the system!

----------

## KernyKat

Hi, I have the same error and after reading this, I tried the command "useradd samba", which doesn't seem to have changed anything.  :Sad: 

The command came back to a new prompt without any output, and the same error occurs when trying to start the samba service. Does the user "samba" require a home directory? (seems redundant) a password? (if so, the service will need to be told it somehow..) or maybe a group?

----------

## KernyKat

Aha, I found the answer in a different thread... I changed the "guest account" lines in smb.conf to a new user and did "smbpasswd -a" for that account.

I believe this is a overlooked portion in the Gentoo Samba3/CUPS/ClamAV HOWTO, because the sample smb.conf there sets "guest account = samba" but doesn't instruct you to do "smbpasswd -a samba", only "smbpasswd -a root".

----------

