<?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: Copy/clone user in linux in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247073#M52369</link>
    <description>To create 100 users with usernames user1, user2.....user99,user100 (the password is the user's name) - useful for testing:&lt;BR /&gt;&lt;BR /&gt;for i in `seq 1 100`&lt;BR /&gt;do useradd user$i -g &lt;GROUPNAME&gt;&lt;BR /&gt;echo user$i | passwd --stdin user$i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;/GROUPNAME&gt;</description>
    <pubDate>Sun, 11 Jul 2010 09:50:25 GMT</pubDate>
    <dc:creator>Alexander Chuzhoy</dc:creator>
    <dc:date>2010-07-11T09:50:25Z</dc:date>
    <item>
      <title>Copy/clone user in linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247068#M52364</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;I have a small query on user management.&lt;BR /&gt;&lt;BR /&gt;I want to create a list of users, the shell, group of these users must the same replica of an existing user.&lt;BR /&gt;&lt;BR /&gt;But only the condition is, the UID must be unique, the duplication of the UID is not required here, I just want to create many users with the same group and shells&lt;BR /&gt;&lt;BR /&gt;* Points will be shared without fail :)</description>
      <pubDate>Thu, 08 Jul 2010 21:42:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247068#M52364</guid>
      <dc:creator>bullz</dc:creator>
      <dc:date>2010-07-08T21:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Copy/clone user in linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247069#M52365</link>
      <description>Get the attributes from the existing user&lt;BR /&gt;suppose all users you want created are members of the groupa (primary group )and groupb groups, the shell is /bin/someshell and you want their password to be "somepass" &lt;BR /&gt;&lt;BR /&gt;I'd create a txt file containing the usernames:&lt;BR /&gt;#cat userlist&lt;BR /&gt;usera&lt;BR /&gt;userb&lt;BR /&gt;userc&lt;BR /&gt;&lt;BR /&gt;Then the following piece of script should do the trick&lt;BR /&gt;&lt;BR /&gt;for user in `cat userlist`&lt;BR /&gt;do useradd $user -g groupa -G groupb -s /bin/someshell &lt;BR /&gt;echo somepass | passwd --stdin $user &lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Hope it was helpful!&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Jul 2010 03:28:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247069#M52365</guid>
      <dc:creator>Gerardo Arceri</dc:creator>
      <dc:date>2010-07-09T03:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Copy/clone user in linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247070#M52366</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;On HP-UX there is a profile called /etc/skel which controls default user creation.&lt;BR /&gt;&lt;BR /&gt;The useradd commadn in Linux, has extra parameters that will allow you to use group or user templates.&lt;BR /&gt;&lt;BR /&gt;Its all in the man page for useradd.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 09 Jul 2010 03:38:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247070#M52366</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2010-07-09T03:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Copy/clone user in linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247071#M52367</link>
      <description>You can use a script like this:&lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;&lt;BR /&gt;if [ $# -lt 2 ]&lt;BR /&gt;then&lt;BR /&gt;  echo "Usage: $0 &lt;PROTOUSER&gt; &lt;NEWUSER&gt;"&lt;BR /&gt;  exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;PROTOUSER=$1&lt;BR /&gt;NEWUSER=$2&lt;BR /&gt;&lt;BR /&gt;PROTOSHELL=$(grep "$PROTOUSER:x" /etc/passwd | cut -f 7 -d ":")&lt;BR /&gt;PROTOGID=$(grep "$PROTOUSER:x" /etc/passwd | cut -f 3 -d ":")&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;echo "Adding new user $NEWUSER based on $PROTOUSER"&lt;BR /&gt;useradd -s $PROTOSHELL -g $PROTOGID $NEWUSER&lt;BR /&gt;&lt;/NEWUSER&gt;&lt;/PROTOUSER&gt;</description>
      <pubDate>Fri, 09 Jul 2010 18:58:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247071#M52367</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2010-07-09T18:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Copy/clone user in linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247072#M52368</link>
      <description>We run the free web-based system admin tool "Webmin" on all of our Linux servers.  It has built in functionality for doing this (user &amp;amp; group batch export/import) and much more.  Visit &lt;A href="http://www.webmin.com" target="_blank"&gt;www.webmin.com&lt;/A&gt;</description>
      <pubDate>Fri, 09 Jul 2010 23:18:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247072#M52368</guid>
      <dc:creator>Jared Middleton</dc:creator>
      <dc:date>2010-07-09T23:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Copy/clone user in linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247073#M52369</link>
      <description>To create 100 users with usernames user1, user2.....user99,user100 (the password is the user's name) - useful for testing:&lt;BR /&gt;&lt;BR /&gt;for i in `seq 1 100`&lt;BR /&gt;do useradd user$i -g &lt;GROUPNAME&gt;&lt;BR /&gt;echo user$i | passwd --stdin user$i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;/GROUPNAME&gt;</description>
      <pubDate>Sun, 11 Jul 2010 09:50:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247073#M52369</guid>
      <dc:creator>Alexander Chuzhoy</dc:creator>
      <dc:date>2010-07-11T09:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Copy/clone user in linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247074#M52370</link>
      <description>Thanks all,&lt;BR /&gt;&lt;BR /&gt;I will look for option "Webmin".</description>
      <pubDate>Wed, 14 Jul 2010 06:51:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-clone-user-in-linux/m-p/5247074#M52370</guid>
      <dc:creator>bullz</dc:creator>
      <dc:date>2010-07-14T06:51:33Z</dc:date>
    </item>
  </channel>
</rss>

