User Account Management

One of the most important elements in a domain is the user account. Without these accounts, no users could log on to the domain, and without users logging on, no work would get done. Even if your domain is totally automated and needs no user intervention, you still need some accounts. You always need an Administrator account, for example, so you can log on and manage the domain. Likewise, many services need accounts to log on to the machine or domain to perform some tasks.

Testing for User Account Existence

Before creating a new user account, you should ensure that a user account with the same name you intend to create does not already exist. This can be done using UsersExist() function:

 Win32::NetAdmin::UsersExist( ...

Get Win32 Perl Programming: The Standard Extensions, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.