Helmut Hullen
2011-Mar-29 16:53 UTC
[Samba] converting smbpasswd to passdb.tdb - machine accounts
Hallo, I'm trying to convert smbpasswd to passdb.tdb. cd /etc/samba/private # (where smbpasswd lies) pdbedit -i smbpasswd -e tdbsam:/etc/samba/private/passdb.tdb converts all human users, but it converts (or transfers) no machine account. In "smbpasswd" are many entries beginning with (p.e.) mac001$ for these accounts, pdbedit -L -v | grep -i mac shows no such entry. What goes wrong? Samba 3.5.7 Viele Gruesse! Helmut
TAKAHASHI Motonobu
2011-Apr-04 16:55 UTC
[Samba] converting smbpasswd to passdb.tdb - machine accounts
From: "Helmut Hullen" <Hullen at t-online.de> Date: 29 Mar 2011 18:53:00 +0200> I'm trying to convert smbpasswd to passdb.tdb. > > cd /etc/samba/private > # (where smbpasswd lies) > pdbedit -i smbpasswd -e tdbsam:/etc/samba/private/passdb.tdb > > converts all human users, but it converts (or transfers) no machine > account. > > In "smbpasswd" are many entries beginning with (p.e.) > > mac001$ > > for these accounts, > > pdbedit -L -v | grep -i mac > > shows no such entry. > > What goes wrong? > Samba 3.5.7As far as I examined at Samba 3.5.6 and Samba 3.5.8 self-compiled on lenny, your problem is not occurred. (Sorry, I do not have a box running Samba 3.5.7) My test: (Both for Samba 3.5.6 and 3.5.8, the result is same.) (1) remove passdb.tdb and smbpasswd (2) create a smb.conf # echo [global] > /some/where/smb.conf # echo passdb backend = smbpasswd >> /some/where/smb.conf (3) create users # useradd test01 # pdbedit -a test01 # useradd mac001$ # pdbedit -a -m mac001 (4) Convert # pdbedit -i smbpasswd -e tdbsam tdbsam_open: Converting version 0.0 database to version 4.0. tdbsam_convert_backup: updated /usr/local/samba/private/passdb.tdb file. Importing account for test01...ok Importing account for mac001$...ok (5) Examine # rm /some/where/smbpasswd # pdbedit -b tdbsam test01:1010:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:31D6CFE0D16AE931B73C59D7E0C089C0:[U # ]:LCT-4D99F62F: mac001$:1012:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:2EAC6F477D185AAA5F71B09EBEFDFDBB:[W ]:LCT-4D99F627: --- TAKAHASHI Motonobu <monyo at samba.gr.jp>