Samab4 - Alpha7

Andrew Bartlett abartlet at samba.org
Mon Mar 9 22:09:50 GMT 2009


On Fri, 2009-03-06 at 23:53 +0200, Sassy Natan wrote:
> Dear List
> 
> Three quick questions:
> 
> 1.Do someone know if it is possible to change user password from the command
> line, or via the LDAP modify tool and not use Microsoft Active Directory
> User and Computer tool?
> I know there is a command line utility for creating new user, but I didn't
> figure it out how can I change user password from the command line.

you can use the Samba3 or Samba4 client tools to do this, such as (from
Samba4) 'net password change' or 'net password set' such as:

'net password change -Uuser' or 'net password set -Uadmin user'

> 2. When creating new user via the command line tool (*./setup/newuser
> username ) *it creates the user in the User default container
> (CN=Users,DC=Home,DC=Local). Is it possible to create a new user and put him
> in a different OU? I know all of this can be done via the Active Directory
> User and Computer tool, but I really want to manage my Samba4 domain from
> the command line. I know I can create the user name using the newuser
> command line, and then move it to anther OU using LDAPmodify, but maybe
> there is better way to do this?
> 
> 3. Is there any way to create a Group via the command line? ot it is only
> limited to the Active Directory Users and Computers?

You can create both users and groups by creating the skeleton ldif over
LDAP or onto LDB (say using ldbadd), but the friendly scripts are pretty
limited at this point.

Creating an entry like

cn=my user,ou=my ou,dc=my,dc=company
objectclass: user 
samAccountName: username

should be enough to get you started.

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.
-------------- 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-technical/attachments/20090310/97d846e0/attachment-0001.bin


More information about the samba-technical mailing list