<?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: How to write a &amp;quot;useradd&amp;quot; bash program for me? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-write-a-quot-useradd-quot-bash-program-for-me/m-p/4168825#M63746</link>
    <description>within redhat you can use a utility called&lt;BR /&gt;&lt;BR /&gt;newusers &lt;BR /&gt;&lt;BR /&gt;Go to the following link to see how it works&lt;BR /&gt;&lt;BR /&gt; &lt;A href="http://kbase.redhat.com/faq/FAQ_43_4400.shtm" target="_blank"&gt;http://kbase.redhat.com/faq/FAQ_43_4400.shtm&lt;/A&gt;</description>
    <pubDate>Fri, 28 Mar 2008 09:26:22 GMT</pubDate>
    <dc:creator>Jon Gomersall</dc:creator>
    <dc:date>2008-03-28T09:26:22Z</dc:date>
    <item>
      <title>How to write a "useradd" bash program for me?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-write-a-quot-useradd-quot-bash-program-for-me/m-p/4168822#M63743</link>
      <description>don't use the standard command useradd.&lt;BR /&gt;thanks so much.</description>
      <pubDate>Thu, 27 Mar 2008 06:58:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-write-a-quot-useradd-quot-bash-program-for-me/m-p/4168822#M63743</guid>
      <dc:creator>roofalison</dc:creator>
      <dc:date>2008-03-27T06:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a "useradd" bash program for me?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-write-a-quot-useradd-quot-bash-program-for-me/m-p/4168823#M63744</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;why don't you want to use the standard program?? If you need to add useraccounts, but won't using "useradd", write a simple script. With a combination of "echo", "sed" and "awk" you can add or change lines to /etc/passwd and /etc/group. With "mkdir" you can create home directories, with "cp" you can copy files vom /etc/skel to the new created home directory. Don't forget to change the ownership and permission while using "chown" and "chmod".&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Patrick</description>
      <pubDate>Thu, 27 Mar 2008 08:04:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-write-a-quot-useradd-quot-bash-program-for-me/m-p/4168823#M63744</guid>
      <dc:creator>Patrick Terlisten</dc:creator>
      <dc:date>2008-03-27T08:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a "useradd" bash program for me?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-write-a-quot-useradd-quot-bash-program-for-me/m-p/4168824#M63745</link>
      <description>This sounds suspiciously like a homework question one of my fellow instructors likes to assign to his scripting class.&lt;BR /&gt;&lt;BR /&gt;Anyhow, the trick here to start is to build a script that will accept various arguments.  Then take each argument and put them into an echo line something like this:&lt;BR /&gt;&lt;BR /&gt;echo $1:x:$2:$3:$4:$5:$6 &amp;gt;&amp;gt; /etc/passwd&lt;BR /&gt;&lt;BR /&gt;where 1 is the username, 2 is the UID, 3 is the GID, 4 is the LYCOS field, 5 is the root path, and 6 is the startup shell.&lt;BR /&gt;&lt;BR /&gt;You would then enter something  like this at your command line:&lt;BR /&gt;&lt;BR /&gt;$ ./myscript username 222 333 stuff /home/username /sbin/sh&lt;BR /&gt;&lt;BR /&gt;And, if everything works right (this example probably has a few tweaks in it that need fixing), the last line of the password file should look like this:&lt;BR /&gt;&lt;BR /&gt;username:x:222:333:stuff:/:/sbin/sh</description>
      <pubDate>Thu, 27 Mar 2008 19:04:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-write-a-quot-useradd-quot-bash-program-for-me/m-p/4168824#M63745</guid>
      <dc:creator>Alan_152</dc:creator>
      <dc:date>2008-03-27T19:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a "useradd" bash program for me?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-write-a-quot-useradd-quot-bash-program-for-me/m-p/4168825#M63746</link>
      <description>within redhat you can use a utility called&lt;BR /&gt;&lt;BR /&gt;newusers &lt;BR /&gt;&lt;BR /&gt;Go to the following link to see how it works&lt;BR /&gt;&lt;BR /&gt; &lt;A href="http://kbase.redhat.com/faq/FAQ_43_4400.shtm" target="_blank"&gt;http://kbase.redhat.com/faq/FAQ_43_4400.shtm&lt;/A&gt;</description>
      <pubDate>Fri, 28 Mar 2008 09:26:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-write-a-quot-useradd-quot-bash-program-for-me/m-p/4168825#M63746</guid>
      <dc:creator>Jon Gomersall</dc:creator>
      <dc:date>2008-03-28T09:26:22Z</dc:date>
    </item>
  </channel>
</rss>

