[Samba] add user to smbpasswd

kaupo at byroodisain.ee kaupo at byroodisain.ee
Fri Sep 2 05:54:13 GMT 2005


code:
##################
pisike:/usr/local/samba# mksmbpasswd /etc/passwd /usr/local/samba/smbpasswd
#
# SMB password file.
#
root:0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U  
         ]:LCT-00000000:root
kaupo:1001:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U 
          ]:LCT-00000000:kaupo,,,
nelli:1006:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U 
          ]:LCT-00000000:Nelli,,,
::XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U       
    ]:LCT-00000000:
pisike:/usr/local/samba# /etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
pisike:/usr/local/samba# smbpasswd -x kaupo
Deleted user kaupo.
pisike:/usr/local/samba# smbpasswd -a kaupo
New SMB password:
Retype new SMB password:
Added user kaupo.
pisike:/usr/local/samba# pico smbpasswd
pisike:/usr/local/samba# ls -l
total 20
drwxrwxrwx  2 root staff 4096 2005-08-31 14:07 netlogon
-rw-r--r--  1 root staff    1 2005-09-01 10:33 smbpasswd
-rw-r--r--  1 root staff 5014 2005-09-01 10:32 smbpasswd.backup
-rw-------  1 root staff    6 2005-08-31 16:03 smbpasswd.save
pisike:/usr/local/samba#
#################

Action like this (also tried "cat /etc/passwd | mksmbpasswd > 
/usr/local/samba/smbpasswd") should add users from Debian password file 
passwd to smbpasswd. It adds users, buet in password place, there are onli X 
letters. Encrypted passwords shouldn`t look like this, i think...

Just in case, i tried to delete one user, then add it again. NOTHING CHANGES 
in smbpasswd file. Some help?

here is part of my smb.conf file (the part, that matters :))

########
 [global]
        workgroup = BDS2
        server string = Samba @ Debian Linux
        update encrypted = Yes
        smb passwd file = /usr/local/samba/smbpasswd
        passdb backend = tdbsam
        passwd program = /usr/bin/passwd %u
        unix password sync = Yes
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 
SO_SNDBUF=81$
        logon script = /usr/local/samba/netlogon/syslogin.bat
        domain logons = Yes
        os level = 65
        domain master = Yes
        wins support = Yes
        ldap ssl = no
        hosts allow = ALL
#######################


Kaupo Karuse
kaupo at byroodisain.ee
+3725580414
www.kalender.ee
 



More information about the samba mailing list