Problem Creating Samba user

Hi,

I hope this is the right place for this question.

After a lot of searching I’ve been unable to find a solution that works, and I’m getting somewhat frustrated. Here’s my problem:

I’m trying to create a new user in samba this is what happens:

sudo smbpasswd -a cctv
New SMB password:
Retype new SMB password:
Failed to modify password entry for user cctv

I’ve tried:

  • going root using su instead of running from sudo
  • sudo touch /etc/samba/smbpasswd
  • restoring /etc/samba/smb.conf to it’s default state
  • specifying the path to the smb.conf file using the flag -c
  • swearing at the terminal

the output when running smbpasswd with debug level set to 10 is:

sudo smbpasswd -D 10 -c '/etc/samba/smb.conf' -a cctv
Netbios name list:-
my_netbios_names[0]="CCTV-HP-SERVER"
Attempting to register passdb backend ldapsam
Successfully added passdb backend 'ldapsam'
Attempting to register passdb backend ldapsam_compat
Successfully added passdb backend 'ldapsam_compat'
Attempting to register passdb backend NDS_ldapsam
Successfully added passdb backend 'NDS_ldapsam'
Attempting to register passdb backend NDS_ldapsam_compat
Successfully added passdb backend 'NDS_ldapsam_compat'
Attempting to register passdb backend smbpasswd
Successfully added passdb backend 'smbpasswd'
Attempting to register passdb backend tdbsam
Successfully added passdb backend 'tdbsam'
Attempting to find an passdb backend to match smbpasswd (smbpasswd)
Found pdb backend smbpasswd
pdb backend smbpasswd has a valid init
New SMB password:
Retype new SMB password:
getsampwnam (smbpasswd): search by name: cctv
startsmbfilepwent_internal: opening file /etc/samba/smbpasswd
getsmbfilepwent: skipping comment or blank line
getsmbfilepwent: skipping comment or blank line
getsmbfilepwent: skipping comment or blank line
getsmbfilepwent: skipping comment or blank line
getsmbfilepwent: skipping comment or blank line
getsmbfilepwent: skipping comment or blank line
getsmbfilepwent: end of file reached.
endsmbfilepwent_internal: closed password file.
Failed to modify password entry for user cctv

As my username says, I really don’t know what I’m doing, and I’m sure I’ve done a couple things wrong, so if anyone can clue me in that’d be really great. I’m open to the idea of clearing out all the config files and starting fresh if anyone has a resource to walk me through that. Thanks in advance,

–Willis

That can happen if cctv is not in the Linux user database.

Thanks! That solved it… facepalm