On Tue, 2002-11-12 at 06:18, Nate Carlson wrote:> Hey all,
>
> I need to create a perl script that will add Samba attributes to existing
> LDAP accounts; basically, I just need to replicate what smbpasswd does in
> Perl.
>
> I've found a perl module that will create the password hashes for me,
so
> that part's taken care of. The one thing I'm not sure how to do is
> generate the rid and PrimaryGroupID entries. Does anyone know how these
> are generated? I've thought of just looking at the existing entries and
> adding one to the highest each time; would that be acceptable?
>
> Thanks for any help you guys can provide!
Use 2*uid+1000 for users, 2*gid+1001 for groups. In Samba 3.0 you have
more flexibility, but if you have any choice, stick to the algorithm.
Andrew Bartlett
--
Andrew Bartlett abartlet@pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet@samba.org
Student Network Administrator, Hawker College abartlet@hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url :
http://lists.samba.org/archive/samba/attachments/20021111/2eb0eef7/attachment.bin