<?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: useradd script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860102#M396299</link>
    <description>Yes, I want a group for each user. We are trying to get LDAP authentication working with our Novell environment and this is how my network administrator is setting up the users in Novell, so I need to do the same in HP-UX.</description>
    <pubDate>Wed, 08 Sep 2004 13:25:17 GMT</pubDate>
    <dc:creator>Angela Swyers_1</dc:creator>
    <dc:date>2004-09-08T13:25:17Z</dc:date>
    <item>
      <title>useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860097#M396294</link>
      <description>Does anyone have an example of a useradd script that creates the new user/group with the next and same id#?</description>
      <pubDate>Wed, 08 Sep 2004 12:47:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860097#M396294</guid>
      <dc:creator>Angela Swyers_1</dc:creator>
      <dc:date>2004-09-08T12:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860098#M396295</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If you don't specify the -u UID option in the useradd command, it will automatically assign the next UID after the currently assignet highest UID. &lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Sep 2004 13:08:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860098#M396295</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2004-09-08T13:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860099#M396296</link>
      <description>Same goes for the groupadd command.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Sep 2004 13:09:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860099#M396296</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2004-09-08T13:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860100#M396297</link>
      <description>I want to keep my uids and gids the same. How would I do this?</description>
      <pubDate>Wed, 08 Sep 2004 13:11:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860100#M396297</guid>
      <dc:creator>Angela Swyers_1</dc:creator>
      <dc:date>2004-09-08T13:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860101#M396298</link>
      <description>You want to keep your UID and GID the same ?- Why would you do that ?&lt;BR /&gt;&lt;BR /&gt;Are you looking to create a seperate group entry for each user ? - doesnt sound like a good idea.&lt;BR /&gt;&lt;BR /&gt;As noted above by Sanjay, if you dont mention the UID, useradd will automatically take the next available UID.&lt;BR /&gt;&lt;BR /&gt;You can try something like this&lt;BR /&gt;&lt;BR /&gt;useradd .....&lt;BR /&gt;grep "^username" /etc/passwd | awk -F: '{print $4}' | read ID&lt;BR /&gt;groupadd -g $ID &lt;GROUPNAME&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/GROUPNAME&gt;</description>
      <pubDate>Wed, 08 Sep 2004 13:21:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860101#M396298</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-09-08T13:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860102#M396299</link>
      <description>Yes, I want a group for each user. We are trying to get LDAP authentication working with our Novell environment and this is how my network administrator is setting up the users in Novell, so I need to do the same in HP-UX.</description>
      <pubDate>Wed, 08 Sep 2004 13:25:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860102#M396299</guid>
      <dc:creator>Angela Swyers_1</dc:creator>
      <dc:date>2004-09-08T13:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860103#M396300</link>
      <description>OK.. You can try something like this&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;echo "Enter Username: \c" &lt;BR /&gt;read USERNAME&lt;BR /&gt;&lt;BR /&gt;useradd -d /home/$USERNAME -m $USERNAME&lt;BR /&gt;&lt;BR /&gt;grep "^${USERNAME}" /etc/passwd | awk -F: '{print $4}' | read ID&lt;BR /&gt;&lt;BR /&gt;echo "Enter Groupname: \c"&lt;BR /&gt;read GNAME&lt;BR /&gt;groupadd -g $ID $GNAME&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Sep 2004 13:32:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860103#M396300</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-09-08T13:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860104#M396301</link>
      <description>Thank you! That's exactly what I needed. I just needed to add a usermod at the end to change teh uid to match the new group that was created, and I needed to change the $4 to $3 so it created teh group with the same id as the user.</description>
      <pubDate>Wed, 08 Sep 2004 13:44:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860104#M396301</guid>
      <dc:creator>Angela Swyers_1</dc:creator>
      <dc:date>2004-09-08T13:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860105#M396302</link>
      <description>Thanks for your help.</description>
      <pubDate>Wed, 08 Sep 2004 13:47:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/4860105#M396302</guid>
      <dc:creator>Angela Swyers_1</dc:creator>
      <dc:date>2004-09-08T13:47:29Z</dc:date>
    </item>
  </channel>
</rss>

