<?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: user add in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072087#M140952</link>
    <description>Hi Mahesh,&lt;BR /&gt;&lt;BR /&gt;Take a look at the command useradd and userdel.&lt;BR /&gt;&lt;BR /&gt;Hope it helps,&lt;BR /&gt;&lt;BR /&gt;Robert-Jan.</description>
    <pubDate>Tue, 16 Sep 2003 10:30:30 GMT</pubDate>
    <dc:creator>Robert-Jan Goossens</dc:creator>
    <dc:date>2003-09-16T10:30:30Z</dc:date>
    <item>
      <title>user add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072085#M140950</link>
      <description>I want to write a shell script using sed and awk which automatically and adds and modifies, delete user ..any ideas ???</description>
      <pubDate>Tue, 16 Sep 2003 10:23:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072085#M140950</guid>
      <dc:creator>mahesh_24</dc:creator>
      <dc:date>2003-09-16T10:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: user add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072086#M140951</link>
      <description>Probably best to use the "useradd" command.  &lt;BR /&gt;&lt;BR /&gt;It is difficult to post a script here, if you don't want to use "useradd", as so many people would do this in different ways.&lt;BR /&gt;&lt;BR /&gt;I suspect the best thing would be do a short script to keep track of the next free UID and put that as a variable to the "useradd" command.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 10:28:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072086#M140951</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-16T10:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: user add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072087#M140952</link>
      <description>Hi Mahesh,&lt;BR /&gt;&lt;BR /&gt;Take a look at the command useradd and userdel.&lt;BR /&gt;&lt;BR /&gt;Hope it helps,&lt;BR /&gt;&lt;BR /&gt;Robert-Jan.</description>
      <pubDate>Tue, 16 Sep 2003 10:30:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072087#M140952</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2003-09-16T10:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: user add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072088#M140953</link>
      <description>does anbody has any script to see the used id alraedyu assigned and chose the free one .I want to add the uer ids in nis not using the useradd command ..so have to parse through the passwd file .</description>
      <pubDate>Tue, 16 Sep 2003 10:33:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072088#M140953</guid>
      <dc:creator>mahesh_24</dc:creator>
      <dc:date>2003-09-16T10:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: user add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072089#M140954</link>
      <description>The following script I use recently to add many users at a time:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;for i in `cat /tmp/newusers.lst`                                                   &lt;BR /&gt;do                                                                              &lt;BR /&gt;USER=`echo $i | awk -F":" '{print $1}'`                                         &lt;BR /&gt;UID=`echo $i | awk -F":" '{print $2}'`                                          &lt;BR /&gt;GROUP=`echo $i | awk -F":" '{print $3}'`                                        &lt;BR /&gt;DIR=`echo $i | awk -F":" '{print $4}'`                                          &lt;BR /&gt;SHELL=`echo $i | awk -F":" '{print $5}'`                                        &lt;BR /&gt;/usr/sbin/useradd -u $UID -g $GROUP -d $DIR -s $SHELL $USER                     &lt;BR /&gt;if [ $? -eq 0 ]                                                                &lt;BR /&gt; then&lt;BR /&gt;/usr/bin/passwd $USER&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 10:44:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072089#M140954</guid>
      <dc:creator>twang</dc:creator>
      <dc:date>2003-09-16T10:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: user add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072090#M140955</link>
      <description>My requirement is to change the existing NIS file eg. &lt;BR /&gt;user field to = Yusername&lt;BR /&gt;passwd =*.NP*&lt;BR /&gt;comment = user disabled&lt;BR /&gt;shell= /bin/false&lt;BR /&gt;&lt;BR /&gt;i have written a sed script which is changing the first field only ..now i wanna change passwd , comment and shell field.I am pastiniog the script below ..for suggestions /modifications ..&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;#usage  :scriptname passwdfilename&lt;BR /&gt;set -x&lt;BR /&gt;for x&lt;BR /&gt;do&lt;BR /&gt;echo "enter the user name \c"&lt;BR /&gt;read user1&lt;BR /&gt;echo "the user name to be disabled is $user1"&lt;BR /&gt;grep "^${user1}:" $x&lt;BR /&gt;if [ $? -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;sed  '/^'$user1':/ {&lt;BR /&gt;             s/'$user1'/X'$user1'/&lt;BR /&gt;             }' $x&lt;BR /&gt;else&lt;BR /&gt;echo "please enter the correct user name as  $user1 does not exist in the $x"&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;~&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;~</description>
      <pubDate>Tue, 16 Sep 2003 12:48:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072090#M140955</guid>
      <dc:creator>mahesh_24</dc:creator>
      <dc:date>2003-09-16T12:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: user add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072091#M140956</link>
      <description>I'm attaching my version.&lt;BR /&gt;&lt;BR /&gt;You'll see all kinds of cool code, some of it commented.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 16 Sep 2003 12:49:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-add/m-p/3072091#M140956</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-16T12:49:41Z</dc:date>
    </item>
  </channel>
</rss>

