<?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 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617174#M37839</link>
    <description>Hello Sean,&lt;BR /&gt;&lt;BR /&gt;You can try to specify the uid with:&lt;BR /&gt;&lt;BR /&gt;useradd -u 1001 newuser&lt;BR /&gt;&lt;BR /&gt;That will create a new user called "newuser" with uid=1001&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Paga&lt;BR /&gt;</description>
    <pubDate>Mon, 19 Nov 2001 22:24:58 GMT</pubDate>
    <dc:creator>Marco Paganini</dc:creator>
    <dc:date>2001-11-19T22:24:58Z</dc:date>
    <item>
      <title>useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617173#M37838</link>
      <description>I am using the useradd to add users but I keep running into problems. When I try to add user JOE it assigns a UID number of 102 and I need it to assign a UID number of 1001. According to the man pages for 11.0...uid defaults to the next available unique number above the maximum currently assigned number...The max UID number I am using is 1000, but this wants to add the user to 102...I really need it to add above 1000 so it does not interfere with other added clients.</description>
      <pubDate>Mon, 19 Nov 2001 22:16:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617173#M37838</guid>
      <dc:creator>Sean Gay</dc:creator>
      <dc:date>2001-11-19T22:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617174#M37839</link>
      <description>Hello Sean,&lt;BR /&gt;&lt;BR /&gt;You can try to specify the uid with:&lt;BR /&gt;&lt;BR /&gt;useradd -u 1001 newuser&lt;BR /&gt;&lt;BR /&gt;That will create a new user called "newuser" with uid=1001&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Paga&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Nov 2001 22:24:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617174#M37839</guid>
      <dc:creator>Marco Paganini</dc:creator>
      <dc:date>2001-11-19T22:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617175#M37840</link>
      <description>Hi Sean:&lt;BR /&gt;&lt;BR /&gt;# usradd -u uid ...&lt;BR /&gt;&lt;BR /&gt;...specifies the uid of the new user.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 19 Nov 2001 22:25:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617175#M37840</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-11-19T22:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617176#M37841</link>
      <description>Also, make sure that you don't use capital letters such as JOE, this may result in sendmail problems down the line.&lt;BR /&gt;&lt;BR /&gt;Just saw the example and I thought I would throw in my two cents.&lt;BR /&gt;&lt;BR /&gt;C</description>
      <pubDate>Mon, 19 Nov 2001 22:26:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617176#M37841</guid>
      <dc:creator>Craig Rants</dc:creator>
      <dc:date>2001-11-19T22:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617177#M37842</link>
      <description>That would be fine with the exception that I am calling the useradd from samba where the maxuid is not known. I need the uid to be assigned automaticly.</description>
      <pubDate>Mon, 19 Nov 2001 22:28:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617177#M37842</guid>
      <dc:creator>Sean Gay</dc:creator>
      <dc:date>2001-11-19T22:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617178#M37843</link>
      <description>((MAX=`cut -d: -f3 /etc/passwd|sort -rn|head -1`+1))&lt;BR /&gt;useradd -u $MAX . . .</description>
      <pubDate>Mon, 19 Nov 2001 22:33:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617178#M37843</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2001-11-19T22:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617179#M37844</link>
      <description>Hello.&lt;BR /&gt;&lt;BR /&gt;In this case, rename useradd to useradd.original (or even better, take it out of samba's PATH) and add a script called "useradd" like that:&lt;BR /&gt;&lt;BR /&gt;#/bin/sh&lt;BR /&gt;lastuid=`cat /etc/passwd | awk 'BEGIN {FS=":"} ($3 &amp;lt; 65000) { print $3 }'| sort -n| tail -1`&lt;BR /&gt;useradd.original -u $lastuid $*&lt;BR /&gt;&lt;BR /&gt;That should do the trick for you.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Paga&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Nov 2001 22:37:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617179#M37844</guid>
      <dc:creator>Marco Paganini</dc:creator>
      <dc:date>2001-11-19T22:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617180#M37845</link>
      <description>Hi Sean,&lt;BR /&gt;&lt;BR /&gt;It will be difficult to assign user id's 1000+ by default. There is no file in which the default is stored. you have to specify the userid manually if you want to set them to 1000+.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Nov 2001 22:41:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617180#M37845</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2001-11-19T22:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617181#M37846</link>
      <description>Sean,&lt;BR /&gt;useradd will assign the next free user id above 100. So if you have removed a user with uid 102 useradd will default to use that uid.&lt;BR /&gt;If after this you add a user and all uids are in use up to 200 useradd will default to 201.&lt;BR /&gt;&lt;BR /&gt;If you really need to use 1001 you can use &lt;BR /&gt;useradd -u 1001 newuser.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;R.</description>
      <pubDate>Mon, 19 Nov 2001 22:46:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617181#M37846</guid>
      <dc:creator>Rob Galloway_1</dc:creator>
      <dc:date>2001-11-19T22:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617182#M37847</link>
      <description>Marco,&lt;BR /&gt;&lt;BR /&gt;I like your idea of the script but could not get it to run when called from samba. Didn't look like it was running. I have all permissions set correctly but will have to look at it more tomorrow.</description>
      <pubDate>Tue, 20 Nov 2001 01:54:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617182#M37847</guid>
      <dc:creator>Sean Gay</dc:creator>
      <dc:date>2001-11-20T01:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617183#M37848</link>
      <description>Hello Sean,&lt;BR /&gt;&lt;BR /&gt;Things to verify:&lt;BR /&gt;&lt;BR /&gt;1) make sure the script is in the PATH! (you can put it in the same place as useradd for testing purposes. If it can run from there you can later move it to a place where only samba will find it.&lt;BR /&gt;&lt;BR /&gt;2) Make sure it's chmod 755&lt;BR /&gt;&lt;BR /&gt;3) Make sure useradd.original can be found by the script&lt;BR /&gt;&lt;BR /&gt;Let me know what happens (the  script runs but doesn't work, etc). Also, you can add&lt;BR /&gt;&lt;BR /&gt;echo [$*] &amp;gt;&amp;gt;/tmp/temp.log&lt;BR /&gt;&lt;BR /&gt;as the second line in the script (right after /bin/sh) This will create an output in /tmp/temp.log with the arguments passed to 'useradd'.&lt;BR /&gt;&lt;BR /&gt;Hope it helps.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Paga&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Nov 2001 02:05:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617183#M37848</guid>
      <dc:creator>Marco Paganini</dc:creator>
      <dc:date>2001-11-20T02:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: useradd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617184#M37849</link>
      <description>Thanks to all...I got it working. Momentary lapse of thinking for a minute...wasn't working at first until I stopped and restarted samba. Here is what I did...I created the following in a files called useradd.script...&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;lastuid=`cat /etc/passwd | awk 'BEGIN {FS=":"} ($3 &amp;lt; 65000) { print $3 }'| sort -n| tail -1`&lt;BR /&gt;((lastuid = lastuid +1))&lt;BR /&gt;useradd -u $lastuid $*&lt;BR /&gt;&lt;BR /&gt;Call script as so ... useradd.script username&lt;BR /&gt;&lt;BR /&gt;It searches the passwd file, returns the highest uid value and then adds user to /etc/passwd file.&lt;BR /&gt;&lt;BR /&gt;thanks to Alan and Marco for their assistance</description>
      <pubDate>Tue, 20 Nov 2001 16:27:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/useradd/m-p/2617184#M37849</guid>
      <dc:creator>Sean Gay</dc:creator>
      <dc:date>2001-11-20T16:27:01Z</dc:date>
    </item>
  </channel>
</rss>

