[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: adding multiple users, name format?



#! /bin/bash
username=$1 # $i = first argument of script
getent passwd|awk -F ':' '{print $1}'|grep $username && (echo this username exists) || (echo this username is available)

just extend script to your needs.

I theres no out-of-the-box script in debian.. You have to write it yourself or hire someone to doit.


On 6/17/05, michael@etalon.net <michael@etalon.net> wrote:
Hi,

I'm in the process of adding thousands of users to our system.
Our users have a short life span on the system and we get many new
users every year.
We have a small script that will add many users to our system.
We can get a list of users and their passwords in this format:

FirstName LastName Password

From this file, we can script it down to another file for batch adding.
Example user: John Smith pass123
jsmith pass123

From the format above, we can easily run a script and add our users.
Our biggest problem occurs when we have duplicate names.

Does anyone know of a utility or script method that would auto check
for duplicates and adjust accordingly?
In the past, we've used uniq to grab the dup's, but then we adjusted
the name manually. Can be very time consuming if you have many
duplicates.

Any advice appreciated!
Thanks
Mike

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org




--
http://www.axeltabs.com/
http://roundhound.com/
http://linuxarcher.net/bb/
http://divx-subtitles.org/
http://guitar-tabs-lyrics.com/
--

Reply to: