Samba as PDC using Ubuntu or Debian

Discussion in 'HOWTO-Related Questions' started by macaruchi, Jul 24, 2006.

  1. macaruchi

    macaruchi New Member

    Hi! I am using the article:
    SAMBA (Domain Controller) Server For Small Workgroups With Ubuntu 5.10 "Breezy Badger"
    and I did everything as cut adn paste but when I try the create the Tom' s account example I get this:

    tdb_update_sam: Failing to store a SAM_ACCOUNT for [tom] without a primary group RID
    Failed to add entry for user tom.
    Failed to modify password entry for user tom

    I read that this problem was caused for the name in smb.conf and hostname was different but If I did all steps like "cut and paste" I modiifed the hostname.

    I ran the commando pdbedit -Lv and the domain that appear here is internet the old name of my server but tom user it is not here.The new name is SERVER1 like article.

    What must change to can create my account and run my Samba PDC?

    TIA

    Edwin Quijada
     
  2. till

    till Super Moderator

    Please post the output of:

    grep tom /etc/passwd
     
  3. macaruchi

    macaruchi New Member

    This is

    server1:~# grep tom /etc/passwd
    tom:x:1002:100::/home/tom:
     
  4. till

    till Super Moderator

    Please post the result of:

    pdbedit -Lv

    and your smb.conf file.
     
  5. macaruchi

    macaruchi New Member

    samba .conf

    The pdbedit -Lv is in the attachment.
    Here smb.conf



    ===================
    smb.conf
    ===================

    [global]
    workgroup = USECADOMINIO
    netbios name = SERVER1
    server string = %h server (Samba, %v)

    passdb backend = tdbsam
    security = user
    username map = /etc/samba/smbusers
    name resolve order = wins bcast hosts
    domain logons = yes
    preferred master = yes
    wins support = yes

    # Set CUPS for printing
    printcap name = CUPS
    printing = CUPS

    # Default logon
    logon drive = H:
    logon script = scripts/logon.bat
    logon path = \\server1\profile\%U


    # Useradd scripts
    add user script = /usr/sbin/useradd -m %u
    delete user script = /usr/sbin/userdel -r %u
    add group script = /usr/sbin/groupadd %g
    delete group script = /usr/sbin/groupdel %g
    add user to group script = /usr/sbin/usermod -G %g %u
    add machine script = /usr/sbin/useradd -s /bin/false/ -d /var/lib/nobody %u
    idmap uid = 15000-20000
    idmap gid = 15000-20000


    # sync smb passwords woth linux passwords
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
    passwd chat debug = yes
    unix password sync = yes

    # set the loglevel
    log level = 3


    [homes]
    comment = Home
    valid users = %S
    read only = no
    browsable = no


    [printers]
    comment = All Printers
    path = /var/spool/samba
    printable = yes
    guest ok = yes
    browsable = no


    [netlogon]
    comment = Network Logon Service
    path = /home/samba/netlogon
    admin users = Administrator
    valid users = %U
    read only = no


    [profile]
    comment = User profiles
    path = /home/samba/profiles
    valid users = %U administrator
    create mode = 0600
    directory mode = 0700
    writable = yes
    browsable = no

    [Publico]
    Comment=Publico para todos los usuarios
    path=/home/samba/publico
    valid users = @users
    force group = users
    create mask = 660
    directory mask = 0771
    writeable = yes
    browseable = yes

    I change the netbios name in smb.conf for INTERNET as say in a message but doesnt happen.

    TIA
     

    Attached Files:

  6. Jupiter2

    Jupiter2 New Member

    Etch too

    Thanks for this thread, I was a bit hopeful and followed the Samba howto on a Debian Etch based distro, and ran into the same problem that Macaruchi hit
    "tdb_update_sam: Failing to store a SAM_ACCOUNT for [tom] without a primary group RID
    Failed to add entry for user tom.
    Failed to modify password entry for user tom"

    I assumed the problem arose because I was installing on etch, and was about to reinstall to a Sarge based installation. I am not sure if this helps.
    cheers
    JL
     

Share This Page