<?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: usermod -a equivalent under HP-UX 11.11 ? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/usermod-a-equivalent-under-hp-ux-11-11/m-p/5039590#M432610</link>
    <description>Thank you all for your comments&lt;BR /&gt;&lt;BR /&gt;Court : Correct but that is precisely what I do not want to do as it requires me to have prior knowledge of all groups the user is in.&lt;BR /&gt;&lt;BR /&gt;Jeff : Looks promising, I've been putting off learning the stream editor for a while but this looks like a good reason to get to it.&lt;BR /&gt;&lt;BR /&gt;Rasheed : Very true...But the systems are not as consistent as they need to be ( working on it !) so that is not possible right now.&lt;BR /&gt;&lt;BR /&gt;So I'll experiment with sed.&lt;BR /&gt;&lt;BR /&gt;Thanks all!</description>
    <pubDate>Thu, 12 Apr 2007 07:51:10 GMT</pubDate>
    <dc:creator>Francis Noël</dc:creator>
    <dc:date>2007-04-12T07:51:10Z</dc:date>
    <item>
      <title>usermod -a equivalent under HP-UX 11.11 ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/usermod-a-equivalent-under-hp-ux-11-11/m-p/5039586#M432606</link>
      <description>Greetings&lt;BR /&gt;&lt;BR /&gt;I have a few servers under 11.11 without NIS so we have to maintain /etc/group consistent by hand.&lt;BR /&gt;&lt;BR /&gt;One thing I miss versus Linux is usermod -a -G &lt;NEWGROUP&gt; &lt;LOGIN&gt;.&lt;BR /&gt;&lt;BR /&gt;That command would append the login to a new secondary group without removing it from any other group it might be in.&lt;BR /&gt;&lt;BR /&gt;HP-UX does not do -a, so usermod -G &lt;NEWGROUP&gt; &lt;LOGIN&gt; would have the account wiped from every secondary group and added to &lt;NEWGROUP&gt;.&lt;BR /&gt;&lt;BR /&gt;How can I, under 11.11, add a user to a group without removing him from everything else.  I know I can edit /etc/group by hand but doing it over and over for each server is a pain....I'd rather ssh a usermod command if thats possible.&lt;BR /&gt;&lt;BR /&gt;Thank you for your time.&lt;/NEWGROUP&gt;&lt;/LOGIN&gt;&lt;/NEWGROUP&gt;&lt;/LOGIN&gt;&lt;/NEWGROUP&gt;</description>
      <pubDate>Wed, 11 Apr 2007 15:06:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/usermod-a-equivalent-under-hp-ux-11-11/m-p/5039586#M432606</guid>
      <dc:creator>Francis Noël</dc:creator>
      <dc:date>2007-04-11T15:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: usermod -a equivalent under HP-UX 11.11 ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/usermod-a-equivalent-under-hp-ux-11-11/m-p/5039587#M432607</link>
      <description>i believe that you will have to put the new group plus any of the groups the users is already in at the command line:&lt;BR /&gt;&lt;BR /&gt;# usermod -G newgroup,group1,group2,group3 &lt;LOGIN&gt;&lt;/LOGIN&gt;</description>
      <pubDate>Wed, 11 Apr 2007 15:14:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/usermod-a-equivalent-under-hp-ux-11-11/m-p/5039587#M432607</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2007-04-11T15:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: usermod -a equivalent under HP-UX 11.11 ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/usermod-a-equivalent-under-hp-ux-11-11/m-p/5039588#M432608</link>
      <description>The -a option would be nice, but you can  fudge it on HP-UX like this:&lt;BR /&gt;&lt;BR /&gt;usermod -G $(groups -g login | sed 's/ /,/'),newgroup login</description>
      <pubDate>Wed, 11 Apr 2007 15:19:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/usermod-a-equivalent-under-hp-ux-11-11/m-p/5039588#M432608</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2007-04-11T15:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: usermod -a equivalent under HP-UX 11.11 ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/usermod-a-equivalent-under-hp-ux-11-11/m-p/5039589#M432609</link>
      <description>Greetings&lt;BR /&gt;&lt;BR /&gt;If you have ssh access why don't you scp /etc/group to all other servers from a main server to make it consistent.&lt;BR /&gt;&lt;BR /&gt;You can just use a single (for-do-done)script and a file with the hostnames to do this. Or you can use rsync or rdist.&lt;BR /&gt;&lt;BR /&gt;cat &amp;gt; myhostnames&lt;BR /&gt;host1&lt;BR /&gt;host2&lt;BR /&gt;host3&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;for i in `cat myhostnames`&lt;BR /&gt;do&lt;BR /&gt;echo $i&lt;BR /&gt;scp /etc/group $i:/etc/group&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;You can even do it on a cron.&lt;BR /&gt;Of course,  make backup copies of /etc/group before you fire the script.&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Wed, 11 Apr 2007 15:56:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/usermod-a-equivalent-under-hp-ux-11-11/m-p/5039589#M432609</guid>
      <dc:creator>Rasheed Tamton</dc:creator>
      <dc:date>2007-04-11T15:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: usermod -a equivalent under HP-UX 11.11 ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/usermod-a-equivalent-under-hp-ux-11-11/m-p/5039590#M432610</link>
      <description>Thank you all for your comments&lt;BR /&gt;&lt;BR /&gt;Court : Correct but that is precisely what I do not want to do as it requires me to have prior knowledge of all groups the user is in.&lt;BR /&gt;&lt;BR /&gt;Jeff : Looks promising, I've been putting off learning the stream editor for a while but this looks like a good reason to get to it.&lt;BR /&gt;&lt;BR /&gt;Rasheed : Very true...But the systems are not as consistent as they need to be ( working on it !) so that is not possible right now.&lt;BR /&gt;&lt;BR /&gt;So I'll experiment with sed.&lt;BR /&gt;&lt;BR /&gt;Thanks all!</description>
      <pubDate>Thu, 12 Apr 2007 07:51:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/usermod-a-equivalent-under-hp-ux-11-11/m-p/5039590#M432610</guid>
      <dc:creator>Francis Noël</dc:creator>
      <dc:date>2007-04-12T07:51:10Z</dc:date>
    </item>
  </channel>
</rss>

