<?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/2471169#M775744</link>
    <description>Try this. Requested changes are made. &lt;BR /&gt;&lt;BR /&gt;Enjoy !&lt;BR /&gt;...Madhu</description>
    <pubDate>Tue, 12 Dec 2000 19:25:04 GMT</pubDate>
    <dc:creator>Madhu Sudhan_1</dc:creator>
    <dc:date>2000-12-12T19:25:04Z</dc:date>
    <item>
      <title>useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471161#M775736</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I would like to know if someone out there has improved the useradd script to do the following:&lt;BR /&gt;&lt;BR /&gt;1) Look at the last entry in /etc/passwd and increment the UID by 1.&lt;BR /&gt;2) create the account (obviously)&lt;BR /&gt;3) assign it's initial password&lt;BR /&gt;4) Create their home directory.&lt;BR /&gt;5) Assign their group (default)&lt;BR /&gt;6) Did I miss something?&lt;BR /&gt;&lt;BR /&gt;Suggestions/help appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Nickd&lt;BR /&gt;&lt;BR /&gt;You gotta love these forums!!</description>
      <pubDate>Wed, 06 Dec 2000 18:13:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471161#M775736</guid>
      <dc:creator>Nick D'Angelo</dc:creator>
      <dc:date>2000-12-06T18:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471162#M775737</link>
      <description>Hi Nick&lt;BR /&gt;&lt;BR /&gt;Any outomatic script to add users has security implications especially asigning a password, it is by far safer to add your users yourself.&lt;BR /&gt;&lt;BR /&gt;Using SAM will make the task slightly easier for you.&lt;BR /&gt;&lt;BR /&gt;I am sure that many sysadmins will agree with me that doing it youself makes you aware of who is on your system and what that user is allowed to do.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Paula &lt;BR /&gt;</description>
      <pubDate>Wed, 06 Dec 2000 18:30:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471162#M775737</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2000-12-06T18:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471163#M775738</link>
      <description>Paula,&lt;BR /&gt;&lt;BR /&gt;Thanks, I am fully aware of the security implications.  I personally don't like to use Sam and would prefer to do it through vi.  I was just looking for some automation, ok leaving out the password setting.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Nickd</description>
      <pubDate>Wed, 06 Dec 2000 18:32:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471163#M775738</guid>
      <dc:creator>Nick D'Angelo</dc:creator>
      <dc:date>2000-12-06T18:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471164#M775739</link>
      <description>The script attached. This way everything else is default except userid. I doubt of assiging initial password thru useradd. If your system is trusted, the initial password  is randomly generated and echoed onto stdout. &lt;BR /&gt;&lt;BR /&gt;Regarding the password is concerned, you can edit (ofcourse thru script) and put an encrypted version of the password which you already know. But this is not recomended.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;PS: The script doesn't include this part of useradd&lt;BR /&gt;&lt;BR /&gt;Thanks, &lt;BR /&gt;Madhu&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Dec 2000 18:36:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471164#M775739</guid>
      <dc:creator>Madhu Sudhan_1</dc:creator>
      <dc:date>2000-12-06T18:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471165#M775740</link>
      <description>Hi Nick&lt;BR /&gt;&lt;BR /&gt;This small script can be modified to make life easier - on option 1 I presumed that you would wish to look at the group file first to get the new users group.&lt;BR /&gt;&lt;BR /&gt;-------------cut here----------------&lt;BR /&gt;continue="yes"                                                                &lt;BR /&gt;while [ "$continue" = "yes" ]                                                 &lt;BR /&gt;do                                                                            &lt;BR /&gt;clear                                                                         &lt;BR /&gt;                                                                              &lt;BR /&gt;echo "--------------------------------- "                                     &lt;BR /&gt;echo "            MENU             "                                     &lt;BR /&gt;echo " ----------------------- "                                     &lt;BR /&gt;echo "|                               |"                                     &lt;BR /&gt;echo "|       1  :  Which group      |"                                     &lt;BR /&gt;echo "|       2  :  2nd bit      |"                                     &lt;BR /&gt;echo "|       3  :  3rd bit     |"                                     &lt;BR /&gt;echo "|       4  :  4TH bit     |"                                     &lt;BR /&gt;echo "|       x  :   EXIT      |"&lt;BR /&gt;echo " ---------------------- "                                     &lt;BR /&gt;echo "|                              |"                                     &lt;BR /&gt;echo " ---------------------- "                                     &lt;BR /&gt;read ans                                                                      &lt;BR /&gt;case $ans in                                                                    &lt;BR /&gt;        1) cat /etc/group|more                                             &lt;BR /&gt;           ;;                                                                   &lt;BR /&gt;        2) 2nd bit                                                  &lt;BR /&gt;           ;;                                                                   &lt;BR /&gt;        3) 3 rd bit                                                &lt;BR /&gt;           ;;                                                                   &lt;BR /&gt;        4) passwd                                                &lt;BR /&gt;                                                                              &lt;BR /&gt;        x) continue="no"                                                        &lt;BR /&gt;           ;;                                                                   &lt;BR /&gt;        X) continue="no"                                                        &lt;BR /&gt;           ;;                                                                   &lt;BR /&gt;esac                                                                            &lt;BR /&gt;done                                                                            &lt;BR /&gt;                &lt;BR /&gt;---------------cut here-------------&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Wed, 06 Dec 2000 18:56:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471165#M775740</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2000-12-06T18:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471166#M775741</link>
      <description>Madhu,&lt;BR /&gt;&lt;BR /&gt;Your script works fairly well, but it would be perfect if it would prompt me for the new userid first rather than include it in the script.&lt;BR /&gt;&lt;BR /&gt;Nickd</description>
      <pubDate>Tue, 12 Dec 2000 13:11:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471166#M775741</guid>
      <dc:creator>Nick D'Angelo</dc:creator>
      <dc:date>2000-12-12T13:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471167#M775742</link>
      <description>Nick,&lt;BR /&gt;I have a small script to add many users ata time. This wrked fine during a major cut-over. &lt;BR /&gt;Hope this proves useful ....&lt;BR /&gt;&lt;BR /&gt;Suhas.&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Dec 2000 15:07:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471167#M775742</guid>
      <dc:creator>Suhas_2</dc:creator>
      <dc:date>2000-12-12T15:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471168#M775743</link>
      <description>Just pass the userid and the group into the following script (Where /etc/skel/group is any default stuff you want in the home directory specified by the -d option to adduser - &lt;BR /&gt;&lt;BR /&gt;USER=$1                         &lt;BR /&gt;GROUP=$2                        &lt;BR /&gt;useradd -g $GROUP -d /users/$USER -s /usr/bin/ksh -m -k /etc/skel/$GROUP $USER echo "\n\n$USER created and added to $GROUP\n&lt;BR /&gt;AUTHNUM=`/usr/lbin/modprpw -x $USER|awk -F= '{print $2}'`                       &lt;BR /&gt;echo "\nAuthorization number for $USER is $AUTHNUM"                             &lt;BR /&gt;echo "Press return"             &lt;BR /&gt;read ans                        &lt;BR /&gt;return</description>
      <pubDate>Tue, 12 Dec 2000 18:18:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471168#M775743</guid>
      <dc:creator>Merlin the happy pig</dc:creator>
      <dc:date>2000-12-12T18:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: useradd script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471169#M775744</link>
      <description>Try this. Requested changes are made. &lt;BR /&gt;&lt;BR /&gt;Enjoy !&lt;BR /&gt;...Madhu</description>
      <pubDate>Tue, 12 Dec 2000 19:25:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd-script/m-p/2471169#M775744</guid>
      <dc:creator>Madhu Sudhan_1</dc:creator>
      <dc:date>2000-12-12T19:25:04Z</dc:date>
    </item>
  </channel>
</rss>

