Results 1 to 3 of 3

Thread: zmprov ca user@domain + samba

  1. #1
    Join Date
    Mar 2012
    Posts
    4
    Rep Power
    3

    Unhappy zmprov ca user@domain + samba

    Hi!

    I need to create more than 1000 accounts using zmprov and am having trouble because I configured the ldap schemas to work with samba, there is a way of registering users using parameters in zmprov (memberuid sambaSID), or some documentation to the procedures? this is my error:

    appa @ zimbra: ~ $ zmprov ca user@domain.com password
    ERROR: service.INVALID_REQUEST (invalid request: createAccount invalid schema change: [LDAP: error code 65 - object class 'posixAccount' requires attribute 'uidNumber'])
    appa @ zimbra: ~ $

    My Version:

    zimbra@appa:~$ zmcontrol -v
    Release 7.1.4_GA_2555.DEBIAN5_64 DEBIAN5_64 FOSS edition.
    zimbra@appa:~$

  2. #2
    Join Date
    Apr 2011
    Posts
    5
    Rep Power
    4

    Default

    The error says that the LDAP object class posixAccount requires the attribute uidNumber, so you should have at least

    appa @ zimbra: ~ $ zmprov ca user@domain.com password uidnumber 5000

    I think other required attributes for class posixAccount are

    commonName
    gidNumber
    homeDirectory
    uid

    Best,
    Willi

  3. #3
    Join Date
    Mar 2012
    Posts
    4
    Rep Power
    3

    Smile [solved]

    Hi, after some readings, i found that solution too, and write a basic shell script to create all users... hope that helps other users.. thank you!

    Code:
    #!/bin/bash
    
    zm=/opt/zimbra/bin/zmprov
    
    clear
    
    echo -n " Initial UID (ex: 10001): "
    read uid
    
    echo -n " Initial GID (ex: 10001 - group: default): "
    read gid
    
    echo -n " sambaSID (ex: S-1-5-21-4245660955-377939294-1516631070): "
    read sid
    
    echo -n " Post sambaSID (ex: 20001): "
    read unid
    
    echo -n " Default pass for all users (6 digits): "
    read senha
    
    echo -n " Domain (ex: domain.com.br): "
    read dominio
    
    echo -n " Userlist file (ex: /tmp/lista.txt): "
    read lista
    
    echo -n " Default Shell (ex: /bin/bash): "
    read shell
    
    echo " "
    echo " ... Creating users"
    sleep 3
    echo " "
    
    for usuario in `cat $lista`; do
    
        $zm ca $usuario@$dominio $senha sn $usuario cn $usuario displayName $usuario uidNumber $uid gidNumber $gid homeDirectory /home/$usuario loginShell $shell sambaSID $sid-$unid
        $zm modifyAccount $usuario zimbraPasswordMustChange TRUE
        uid=$(( $uid + 1 ))
        unid=$(( $unid + 1 ))
    done
    
    echo " "
    echo " ..Done!"

Similar Threads

  1. Mi Samba server canīt contact LDAP Zimbra server
    By jbarandalla in forum Administrators
    Replies: 0
    Last Post: 04-15-2012, 11:55 PM
  2. zmprov in user@domain ERROR
    By mnbvmnbv in forum Administrators
    Replies: 0
    Last Post: 03-30-2011, 03:36 AM
  3. [SOLVED] Samba password sync
    By lpizzina in forum Administrators
    Replies: 6
    Last Post: 07-11-2010, 08:08 PM
  4. Unable to script zmprov changes completely
    By todd_dsm in forum Installation
    Replies: 1
    Last Post: 12-16-2009, 06:39 AM
  5. Replies: 9
    Last Post: 04-14-2007, 08:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •