[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldapmodify



Hi,

On Thursday 12 August 2004 22:49, Misty Stanley-Jones wrote:
> I've got a whitepages listing, and I'm trying to migrate posixAccounts into
> it.  I've gleaned the necessary data from the /etc/passwd and /etc/shadow
> files,  and I'm trying to use the ldapmodify command to put it in.  First
> of all, here is a sample of part of the LDIF:
>
> dn: cn=Joe Schmo,ou=people,dc=mydomain,dc=com
> changetype: modify
> add: objectclass
> objectClass: posixAccount
> -
> replace:uid
> uid: joe
> uidNumber: 1001
> userPassword: {crypt}7FZxyiS7L2E9I
> loginShell: /dev/null
> gidNumber: 2000
> homeDirectory: /home/angel
> gecos: Angel Clark

You need to add the hyphen l and the action line (add:, replace: or delete:)  
before each different attribute:

dn: cn=Joe Schmo,ou=people,dc=mydomain,dc=com
changetype: modify
add: objectclass
objectClass: posixAccount
-
replace:uid
uid: joe
-
replace: uidNumber
uidNumber: 1001
-
replace: userPassword
userPassword: {crypt}7FZxyiS7L2E9I
-
replace: loginShell
loginShell: /dev/null
-
replace: gidNumber
gidNumber: 2000
-
replace: homeDirectory
homeDirectory: /home/angel
-
replace: gecos
gecos: Angel Clark


CU
Peter
-- 
Peter Marschall
eMail: peter@adpm.de