On Monday 10 January 2005 22:03, NYARLATHOTEP El Caos Reptante wrote:

Hi,

> I have a question about create new users.
>
> When I created the ldif file using migrate_passwd.pl i got something like
> this:
>
> dn: uid=user_id,ou=People,dc=misitio,dc=cl
> uid: user_id
> cn: user_id
> objectClass: account
> objectClass: posixAccount
> objectClass: top
> objectClass: shadowAccount
> userPassword: {crypt}fun_characters
> shadowLastChange: 12389
> shadowMax: 99999
> shadowWarning: 7
> loginShell: /sbin/nologin
> uidNumber: 4890
> gidNumber: 500
> homeDirectory: /home/mailhosting/user_id
>
> ok, every thing it's ok... but, how can I do a script that create a
> new user? I'm talking about the next fields:
>
> objectClass: shadowAccount
> userPassword: {crypt}fun_characters
> shadowLastChange: 12389
>
> shadowMax: 99999
> shadowWarning: 7
>
> this fields are in /etc/shadow, but if i'm working with cgi, i don't
> wanna run a cgi script like the super-user!!!!!!!

You can create user with a perl script from a command line, why use cgi?

> or, I only need to create the next fields:
>
> dn: uid=user_id,ou=People,dc=misitio,dc=cl
> uid: user_id
> cn: user_id
> objectClass: account
> objectClass: posixAccount
> objectClass: top
> loginShell: /sbin/nologin
> uidNumber: 4890
> gidNumber: 500
> homeDirectory: /home/mailhosting/user_id
>
> and just create the new user for openLDAP?

Yes. Just create a user in OpenLDAP, then remove the user 
from /etc/passwd, /etc/group and /etc/shadow. It's good to have system 
critical users in local files and the real users in an LDAP directory.

> I need to auth the user to use web mail, and a web system (and use the
> same ldap service to use with a 3rd  external service....)

Probably you will need to setup your server to use OpenLDAP directory for an 
account information besides local /etc/passwd /etc/group /etc/hosts 
and /etc/shadow. This is done via NSS/PAM LDAP modules. Check your web system 
and 3rd party service for an authentication method.

-- 
[EMAIL PROTECTED]

Reply via email to