Whole Network Applications Applicatios FreeBSD Hacks Networking Programming Securing

 

Creating Multiple User Accounts in Batch

Filed in archive by Michael Hammer on August 27, 2006

Usually you use useradd command to create a new user or update default new user information from command linelinks. However, let us say you want to create a large number of users or if you want to import usernames from a text file. You can use newusers command, which update and create new users in batch.

This is useful at universities or large corporate Linux networks. Adding users in batch saves the time.

This command reads a file of user name and clear-text password pairs and uses this information to update a group of existing users or to create new users. Each line is in the same format as the standard password file.

This command is intended to be used in a large system environment where many accounts are updated at a single time (batch mode). Since username and passwords are stored in clear text format make sure only root can read/write the file. Use chmod command:
# touch /root/batch-user-add.txt
# chmod 0600 /root/batch-user-add.txt

Create a user list as follows. Open file:
# vi /root/batch-user-add.txt

Append username and password:
user1:password:1001:513:Student Account:/home/user1:/bin/bash
user2:password:1002:513:Sales user:/home/user2:/bin/bash
user100:password:1100:513:Sales user:/home/user100:/bin/bash
tom:password:1110:501:Guest Account:/home/guest:/bin/menu
jerry:password:1120:501:Guest Account:/home/guest:/bin/menu

Now create users in batch:
# newusers /root/batch-user-add.txt






Permalink: Creating Multiple User Accounts in Batch
Tags: linux  ilnux  llinux  inux  kinux  batch  atch  abtch  bbatch  file  command  create  reate  rceate  ccreate  blog 

Trackback: http://www.creative-weblogging.com/cgi-bin/mt-tb.pl/34519



Related Entries:

10 Helpful Linux Commands - 27 August 2006

Creating A Linux Recovery Disk - 27 August 2006

Windows VS. Linux Security Report - 28 August 2006

Batch Operations and More - 27 August 2007

Advertisement


Advertisement


RSSrss   | See all blog subscribe options
Googlegoogle   |   What is RSS?
Yahoo!yahoo
AddthisAddThis Feed Button
BloglinesBloglines
Newsletter

Use the search to look for other interesting posts

 
  • Advertise with us

  • Learn more about our advertising options or email advertising - at - creative-weblogging.com or give Luis a call at +1 (650) 331 8047.


  • Other blogs in the same channel in the Creative Weblogging Network







 
Tagcloud: Applications Applicatios Devices Education Entertainment Finding The Right Linux For You FreeBSD Hacks Humor Linux For Windows Users Misc Multimedia Networking OS Programming Securing Servers Solaris Tips & Tricks Utilities