[Fedora-directory-users] admin command lines for Fedora DS

Namachivayam npurusothaman at perisoftware.com
Tue Dec 18 21:49:08 UTC 2007


Hi Dan,
          For adding users (with Posix Attributes), changing the 
userpassword, we are using these scripts :
_For creating users with Posix Attribute :_
create a file for example with the content :

dn: uid=user1, ou=People, dc=example,dc=com
changetype: add
givenName: Sample User
sn: Sample
loginShell: /bin/bash
gidNumber: 500
uidNumber: 10059
mail: user1 at example.com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: posixAccount
uid: user1
cn: Sample User
homeDirectory: /home/user1
userPassword: {CLEAR}pass123


Then issue the command '/opt/fedora-ds/shared/bin/ldapmodify -a -p 389 
-h hostname -D "cn=Directory Manager" -w - -f add.ldif.

[-a refers the action add, -p refers port number (defaults to 389), 
After -w you can give the password there itself or if you don't want to 
give there give '-' there (the password will be asked), and -f refers 
the file which will be followed by the value (add.ldif)].

_Password Modifying script (modi.ldif) :_

dn: uid=genuser3,ou=People, dc=example,dc=com
changetype: modify
replace: userPassword
userPassword: NewRealPassword


./ldapmodify -a -p 389 -D "cn=Directory Manager" -w - -f modi.ldif


dandantheitman wrote:
> Hey Guys,
>
> I Sys. Admin a small office of about 50 users and we have 6 linux
> boxes and 2 openBSD boxes.  I am currently using NIS for management.
> Am in the process of looking at moving from NIS to LDAP and after some
> 'googling' it seems that Fedora DS would cover all of my requirements.
>
> I have installed the fedora DS and have manually (via the ds gui)
> added a few users.  I would prefer however to get away from the GUI
> and perform everything from the command line.  Thus far I have not
> found any command line admin stuff.
>
> Can you guys give me a hand with this stuff - or give me a pointer or
> 2.  I am looking how  to do the following:
> * create groups
> * add users
> * add users with posix attributes,
> * disable accounts.
> * change passwords
>
> you know the basic sort of stuff.  I have taken a look on amazon and
> oreilly but cannot see any Fedora DS specific books.
>
> Thanks in advance for your help.
>
> Dan
>
>   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: npurusothaman.vcf
Type: text/x-vcard
Size: 174 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-users/attachments/20071218/c5a07ddb/attachment.vcf>


More information about the Fedora-directory-users mailing list