On Wed, Aug 20, 2008 at 12:07:02PM -0700, Jyotishmaan Ray wrote:
> 

Depending on the Linux system's policies, executing a command like this:

  useradd -m -d /mnt/btech -c $encrypted_password -s $shell $user 

will:

- create the UID in the password database
- create a group ID in /etc/groups
- add that password to the password database
- create the user's home directory
- cause said directory to be owned by that new UID and GID
- populate that directory with any template for .bashrc, etc. as
  are configured in /etc/skel

Read the manpage for the command your OS is using.  These commands
come with other arguments to manage auxiliary groups, nonstandard
home directory locations, etc.

Check for errors on each invokation; any of the above actions may
have failed for any reason.

If you want to make use of the specific UIDs and GIDs in the LDAP
data, you'll have to mess with adding groups, etc. more manually.
See groupadd(8).

If you want to preserve the password aging data, that gets more
tricky, but is still doable; see chage(1).

This is not an LDAP question.

This is not a perl question.

There are many forums that document this, and there are many
Googleable (is that a verb?) instances of 

  perl "add user"

out there, many using LDAP as a source of users.

There are consultants out there who'll do this work for pay, if you
feel you're in over your head.

Good luck!

-- 
Brian Reichert                          <[EMAIL PROTECTED]>
55 Crystal Ave. #286                    Daytime number: (603) 434-6842
Derry NH 03038-1725 USA                 BSD admin/developer at large    

Reply via email to