<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: adding 500 users in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678023#M20723</link>
    <description>As a root user you can use useradd utility to add users with shell scripting loop. &lt;BR /&gt;&lt;BR /&gt;index=1&lt;BR /&gt;while [[ ${index} -lt 501 ]]&lt;BR /&gt;do&lt;BR /&gt;   /usr/sbin/useradd &lt;SYNTAX related="" with="" your="" requirement=""&gt;&lt;BR /&gt;  let index=index+1&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Post your requirement of user details as,&lt;BR /&gt;&lt;BR /&gt;user Id from to.&lt;BR /&gt;group name / group ID&lt;BR /&gt;home directory&lt;BR /&gt;etc.&lt;BR /&gt;details to give exact script.&lt;BR /&gt;&lt;BR /&gt;hth.&lt;/SYNTAX&gt;</description>
    <pubDate>Thu, 24 Nov 2005 02:13:45 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-11-24T02:13:45Z</dc:date>
    <item>
      <title>adding 500 users</title>
      <link>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678020#M20720</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I have a requirement in adding 500  users in a linux systems ...Is there any easy way that I can do it instead of doing manullay&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Binu</description>
      <pubDate>Thu, 24 Nov 2005 00:12:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678020#M20720</guid>
      <dc:creator>Binu_5</dc:creator>
      <dc:date>2005-11-24T00:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: adding 500 users</title>
      <link>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678021#M20721</link>
      <description>&lt;BR /&gt;if the user names are some sort of continuous like (user1, user2 etc) then you should be able to do it with simple scripting.&lt;BR /&gt;&lt;BR /&gt;otherwise also, if you have list of usernames in a text file then you could use following script:&lt;BR /&gt;&lt;BR /&gt;## script assumes you have one username in a line, the file name is assumed to be user-list&lt;BR /&gt;## It adds the users using useradd command, creates the home directory (as per username)&lt;BR /&gt;## sets the group id as 100 (users group), sets the login shell as /bin/bash&lt;BR /&gt;## after creation sets the password as same as username.&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;&lt;BR /&gt;while read userid&lt;BR /&gt;do&lt;BR /&gt;  echo "Creating useraccount $userid"&lt;BR /&gt;&lt;BR /&gt;  useradd -m -g 100 -s /bin/bash $userid&lt;BR /&gt;  if [ $? == 0 ]; then&lt;BR /&gt;    echo "created successfully"&lt;BR /&gt;  else&lt;BR /&gt;    echo "failed to create user account $userid"&lt;BR /&gt;    exit&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;  echo $userid | passwd --stdin $userid&lt;BR /&gt;&lt;BR /&gt;done &amp;lt; user-list&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Gopi</description>
      <pubDate>Thu, 24 Nov 2005 01:11:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678021#M20721</guid>
      <dc:creator>Gopi Sekar</dc:creator>
      <dc:date>2005-11-24T01:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: adding 500 users</title>
      <link>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678022#M20722</link>
      <description>Hi&lt;BR /&gt;do this in script:&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;i=1000&lt;BR /&gt;while test $i -lt 1500&lt;BR /&gt;do&lt;BR /&gt;/usr/sbin/useradd -u $i -g group -d /home/user$i -s /bin/bash -m user$i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 24 Nov 2005 01:23:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678022#M20722</guid>
      <dc:creator>LiPEnS</dc:creator>
      <dc:date>2005-11-24T01:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: adding 500 users</title>
      <link>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678023#M20723</link>
      <description>As a root user you can use useradd utility to add users with shell scripting loop. &lt;BR /&gt;&lt;BR /&gt;index=1&lt;BR /&gt;while [[ ${index} -lt 501 ]]&lt;BR /&gt;do&lt;BR /&gt;   /usr/sbin/useradd &lt;SYNTAX related="" with="" your="" requirement=""&gt;&lt;BR /&gt;  let index=index+1&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Post your requirement of user details as,&lt;BR /&gt;&lt;BR /&gt;user Id from to.&lt;BR /&gt;group name / group ID&lt;BR /&gt;home directory&lt;BR /&gt;etc.&lt;BR /&gt;details to give exact script.&lt;BR /&gt;&lt;BR /&gt;hth.&lt;/SYNTAX&gt;</description>
      <pubDate>Thu, 24 Nov 2005 02:13:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678023#M20723</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-11-24T02:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: adding 500 users</title>
      <link>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678024#M20724</link>
      <description>Hi Gopi &lt;BR /&gt;&lt;BR /&gt;I want  the user to be like user1  to user500  no need of taking from user-list &lt;BR /&gt;where  shall i mention that&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Binu</description>
      <pubDate>Thu, 24 Nov 2005 03:18:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678024#M20724</guid>
      <dc:creator>Binu_5</dc:creator>
      <dc:date>2005-11-24T03:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: adding 500 users</title>
      <link>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678025#M20725</link>
      <description>Then change the script as follows (only changes in the while loop and setting up userid variable). &lt;BR /&gt;&lt;BR /&gt;change the username however you want(next to do statement)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;&lt;BR /&gt;let i=1&lt;BR /&gt;while [ $i -le 500 ]&lt;BR /&gt;do&lt;BR /&gt;  userid="user"$i&lt;BR /&gt;  let i=$i+1&lt;BR /&gt;&lt;BR /&gt;  echo "Creating useraccount $userid"&lt;BR /&gt;&lt;BR /&gt;  useradd -m -g 100 -s /bin/bash $userid&lt;BR /&gt;  if [ $? == 0 ]; then&lt;BR /&gt;    echo "created successfully"&lt;BR /&gt;  else&lt;BR /&gt;    echo "failed to create user account $userid"&lt;BR /&gt;    exit&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;  echo $userid | passwd --stdin $userid&lt;BR /&gt;&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Gopi</description>
      <pubDate>Thu, 24 Nov 2005 03:31:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/adding-500-users/m-p/3678025#M20725</guid>
      <dc:creator>Gopi Sekar</dc:creator>
      <dc:date>2005-11-24T03:31:19Z</dc:date>
    </item>
  </channel>
</rss>

