# Samba - smbpasswd can't find/create password database?

## geekguy

I don't know if this is a probelm with my samba install or what. But when I try to run smbpasswd to add a user I get the following output:

```

bash-2.05b# smbpasswd -a brad

New SMB password:

Retype new SMB password:

startsmbfilepwent_internal: file /etc/samba/private/smbpasswd did not exist. Couldn't create new one. Error was: No such file or directoryUnable to open passdbdatabase.

startsmbfilepwent_internal: file /etc/samba/private/smbpasswd did not exist. Couldn't create new one. Error was: No such file or directorystartsmbfilepwent_internal: too many race conditions creating file /etc/samba/private/smbpasswd

add_smbfilepwd_entry: unable to open file.

Failed to add entry for user brad.

Failed to modify password entry for user brad

```

/etc/samba/private doesn't exist. Should it?

I thought maybe it was a problem with my samba install, so I'll rebuild with emerge. Emerge -p shows 2 dependencies with N by them...meaning they will be new installs right? Did my first emerge of samba just not install them or what?

```

bash-2.05b# emerge -p samba

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] sys-apps/attr-2.4.19

[ebuild  N    ] sys-apps/acl-2.2.27

[ebuild   R   ] net-fs/samba-3.0.9-r1

```

So I "emerge samba" but I get a compile error on sys-apps/attr-2.4.19:

```

g++: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../crti.o: No such file orirectory

g++: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/crtbeginS.o: No such file or diretory

g++: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/crtendS.o: No such file or directry

g++: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../crtn.o: No such file orirectory

gmake[1]: *** [libattr.la] Error 1

make: *** [default] Error 2

!!! ERROR: sys-apps/attr-2.4.19 failed.

!!! Function src_compile, Line 58, Exitcode 2

!!! (no error message)

```

No clue as to what to do now. Help!

----------

## darkmason

I got this error, fixed by...

```

mkdir /etc/samba/private

touch /etc/samba/private/smbpasswd

```

----------

## geekguy

 *darkmason wrote:*   

> I got this error, fixed by...
> 
> ```
> 
> mkdir /etc/samba/private
> ...

 

I can't believe it was that simple!   :Rolling Eyes:   I thought something was really borked up. So it works perfectly now. Should I be worried about these deps not being installed?

----------

