<?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: need useradd scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997211#M423701</link>
    <description>Hi Mel, I ran your script and it works, but what is the password for the new user accounts? Thanks.&lt;BR /&gt;&lt;BR /&gt;Hi Marek, I don't think useradd command has -p option. Can you please check? Thanks.&lt;BR /&gt;&lt;BR /&gt;Have a good one.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jan&lt;BR /&gt;</description>
    <pubDate>Tue, 15 Aug 2006 11:22:24 GMT</pubDate>
    <dc:creator>Jan Shu</dc:creator>
    <dc:date>2006-08-15T11:22:24Z</dc:date>
    <item>
      <title>need useradd scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997206#M423696</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I need a script to create 3 hundreds of new user accounts and their home directories at /oralog/&lt;USERNAME1&gt; and 3 subfolders (permissions is 775) under each home directory. Can you please help? Thank you.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Jan Shu&lt;/USERNAME1&gt;</description>
      <pubDate>Mon, 14 Aug 2006 17:28:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997206#M423696</guid>
      <dc:creator>Jan Shu</dc:creator>
      <dc:date>2006-08-14T17:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: need useradd scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997207#M423697</link>
      <description>assume usernames are contained in a file /tmp/userlist&lt;BR /&gt;&lt;BR /&gt;for u in `cat /tmp/userlist`&lt;BR /&gt;do&lt;BR /&gt;useradd -d /oralog/$u -m $u&lt;BR /&gt;mkdir /oralog/$u/directory1&lt;BR /&gt;mkdir /oralog/$u/directory2&lt;BR /&gt;mkdir /oralog/$u/directory3&lt;BR /&gt;chown $u /oralog/$u&lt;BR /&gt;chmod 755 /oralog/$u&lt;BR /&gt;chmod 775 /oralog/$u/*&lt;BR /&gt;echo $u " created successfully."&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;hope this helps</description>
      <pubDate>Mon, 14 Aug 2006 17:35:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997207#M423697</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2006-08-14T17:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: need useradd scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997208#M423698</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=51050" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=51050&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Two more threads in that thread.&lt;BR /&gt;&lt;BR /&gt;The largest concentration of scripts sysadmins can't live without in ITRC.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 14 Aug 2006 17:38:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997208#M423698</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-08-14T17:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: need useradd scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997209#M423699</link>
      <description>Hi Steven, &lt;BR /&gt;&lt;BR /&gt;Thanks for the reply. This link &lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=51050" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=51050&lt;/A&gt; web page is more than 1 mile long. Can you please kindly point out the sessions where I can find useradd scripts? I searched the keyword "useradd" but find no match. &lt;BR /&gt;&lt;BR /&gt;Thanks again. &lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Jan Shu</description>
      <pubDate>Mon, 14 Aug 2006 17:46:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997209#M423699</guid>
      <dc:creator>Jan Shu</dc:creator>
      <dc:date>2006-08-14T17:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: need useradd scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997210#M423700</link>
      <description>Hello, &lt;BR /&gt;&lt;BR /&gt;Make a new text file (here ./text_file_with_users.txt) with list of user like this:&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;username1 password1 mygroup1&lt;BR /&gt;beny We5gG5^qw@ users&lt;BR /&gt;username2 password2 mygroup2&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;and run this script:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;NEW_USERS="./text_file_with_users.txt"&lt;BR /&gt;HOME_BASE="/oralog/"&lt;BR /&gt;&lt;BR /&gt;cat ${NEW_USERS} | \&lt;BR /&gt;while read USER PASSWORD GROUP&lt;BR /&gt;do&lt;BR /&gt;  useradd -g ${GROUP} -p ${PASSWORD} -m -d ${HOME_BASE}${USER} ${USER}&lt;BR /&gt;done</description>
      <pubDate>Tue, 15 Aug 2006 06:35:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997210#M423700</guid>
      <dc:creator>Marek Mahut</dc:creator>
      <dc:date>2006-08-15T06:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: need useradd scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997211#M423701</link>
      <description>Hi Mel, I ran your script and it works, but what is the password for the new user accounts? Thanks.&lt;BR /&gt;&lt;BR /&gt;Hi Marek, I don't think useradd command has -p option. Can you please check? Thanks.&lt;BR /&gt;&lt;BR /&gt;Have a good one.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jan&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Aug 2006 11:22:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997211#M423701</guid>
      <dc:creator>Jan Shu</dc:creator>
      <dc:date>2006-08-15T11:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: need useradd scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997212#M423702</link>
      <description>Jan,&lt;BR /&gt;&lt;BR /&gt;When the user gets created, there is no password assigned to the user. And user can not login before a password is assigned.&lt;BR /&gt;&lt;BR /&gt;Depending on your trusted or non-trusted security status, there are few options that you can set the initial passwords to a certain string. The common and unsupported way of mass changing the password, which you can use regardless if you are in a trusted or non-trusted computing mode.&lt;BR /&gt;&lt;BR /&gt;all you have to do is to manually change the password for any one user. Grab the encrypted password string from this users record:&lt;BR /&gt;&lt;BR /&gt;a) if non-trusted&lt;BR /&gt;enc_pwd=`grep $username /etc/passwd|cut -d: -f2`&lt;BR /&gt;&lt;BR /&gt;b) if trusted&lt;BR /&gt;enc_pwd=`grep u_pwd /tcb/files/auth/$(echo $username|cut -c1)/$username|cut -d= -f2 |cut -d: -f1`&lt;BR /&gt;&lt;BR /&gt;then run this little script again&lt;BR /&gt;&lt;BR /&gt;for user in `cat /tmp/myuserfile`&lt;BR /&gt;do&lt;BR /&gt;/usr/sam/lbin/usermod.sam -p $enc_pwd $user&lt;BR /&gt;/bin/passwd -f $user #force user to change on first login&lt;BR /&gt;echo "password of user $user has been changed"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Aug 2006 12:51:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997212#M423702</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2006-08-15T12:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: need useradd scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997213#M423703</link>
      <description>THANK YOU ALL FOR HELPING ME ON USERADD SCRIPT.</description>
      <pubDate>Tue, 15 Aug 2006 12:54:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997213#M423703</guid>
      <dc:creator>Jan Shu</dc:creator>
      <dc:date>2006-08-15T12:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: need useradd scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997214#M423704</link>
      <description>Case is close. Thanks.</description>
      <pubDate>Tue, 15 Aug 2006 12:55:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-useradd-scripts/m-p/4997214#M423704</guid>
      <dc:creator>Jan Shu</dc:creator>
      <dc:date>2006-08-15T12:55:31Z</dc:date>
    </item>
  </channel>
</rss>

