<?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: question on $usermod -G option in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/question-on-usermod-g-option/m-p/3323781#M187851</link>
    <description>Try the command without spaces after commas, eg: -&lt;BR /&gt;&lt;BR /&gt;usermod -G group1,group2,group3 user1&lt;BR /&gt;&lt;BR /&gt;instead of&lt;BR /&gt;&lt;BR /&gt;usermod -G group1, group2, group3 user1&lt;BR /&gt;&lt;BR /&gt;The manpage is slightly misleading, but with spaces the parameters will not be interpreted correctly.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sy</description>
    <pubDate>Tue, 06 Jul 2004 05:15:59 GMT</pubDate>
    <dc:creator>Simon Hargrave</dc:creator>
    <dc:date>2004-07-06T05:15:59Z</dc:date>
    <item>
      <title>question on $usermod -G option</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-on-usermod-g-option/m-p/3323780#M187850</link>
      <description>Hi,&lt;BR /&gt;I am creating a shell script to assign secondary groups to a user. &lt;BR /&gt;&lt;BR /&gt;I would like to know the exact usage of "usermod -G". &lt;BR /&gt;&lt;BR /&gt;I have tried these syntax but all failed:&lt;BR /&gt;&lt;BR /&gt;(1) # usermod -G usrgrp2, usrgrp3 user1&lt;BR /&gt;ERROR MESSAGE:&lt;BR /&gt;User name must be specified&lt;BR /&gt;Usage: usermod [-u &lt;UID&gt; [-o]] [-g &lt;GROUP&gt; [-G &lt;GROUP&gt;[,&lt;GROUP...&gt; [-d &lt;DIR&gt; [-m]] [-s &lt;SHELL&gt;] [-c ] [-f &amp;amp;lt;inactive&amp;amp;gt;] [-e &amp;amp;lt;expire&amp;amp;gt;] [-l &amp;amp;lt;new logname&amp;amp;gt;] &amp;amp;lt;login&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt;(2) # usermod -g usrgrp1 -G usrgrp2, usrgrp3 user1&amp;amp;lt;BR /&amp;amp;gt;ERROR MESSAGE:&amp;amp;lt;BR /&amp;amp;gt;User name must be specified&amp;amp;lt;BR /&amp;amp;gt;Usage: usermod [-u &amp;amp;lt;uid&amp;amp;gt; [-o]] [-g &amp;amp;lt;group&amp;amp;gt; [-G &amp;amp;lt;group&amp;amp;gt;[,&amp;amp;lt;group...&amp;amp;gt; [-d &amp;amp;lt;dir&amp;amp;gt; [-m]] [-s &amp;amp;lt;shell&amp;amp;gt;] [-c &amp;amp;lt;comment&amp;amp;gt;] [-f &amp;amp;lt;inactive&amp;amp;gt;] [-e &amp;amp;lt;expire&amp;amp;gt;] [-l &amp;amp;lt;new logname&amp;amp;gt;] &amp;amp;lt;login&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt;(3) # usermod -G "usrgrp2, usrgrp3" user1&amp;amp;lt;BR /&amp;amp;gt;ERROR MESSAGE:&amp;amp;lt;BR /&amp;amp;gt;Group  usrgrp3 does not exist&amp;amp;lt;BR /&amp;amp;gt;Group list specified with -G is invalid&amp;amp;lt;BR /&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt;(4) # usermod -G "usrgrp2 usrgrp3" user1&amp;amp;lt;BR /&amp;amp;gt;ERROR MESSAGE:&amp;amp;lt;BR /&amp;amp;gt;Group usrgrp2 usrgrp3 does not exist&amp;amp;lt;BR /&amp;amp;gt;Group list specified with -G is invalid&amp;amp;lt;BR /&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt;(5) # usermod -G usrgrp2 -G usrgrp3 user1&amp;amp;lt;BR /&amp;amp;gt;ERROR MESSAGE:&amp;amp;lt;BR /&amp;amp;gt;Duplicate Option G&amp;amp;lt;BR /&amp;amp;gt;Usage: usermod [-u &amp;amp;lt;uid&amp;amp;gt; [-o]] [-g &amp;amp;lt;group&amp;amp;gt; [-G &amp;amp;lt;group&amp;amp;gt;[,&amp;amp;lt;group...&amp;amp;gt; [-d &amp;amp;lt;dir&amp;amp;gt; [-m]] [-s &amp;amp;lt;shell&amp;amp;gt;] [-c &amp;amp;lt;comment&amp;amp;gt;] [-f &amp;amp;lt;inactive&amp;amp;gt;] [-e &amp;amp;lt;expire&amp;amp;gt;] [-l &amp;amp;lt;new logname&amp;amp;gt;] &amp;amp;lt;login&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt;I have also tried to issue consecutive "usermod -G" but only the last group would be added as the secondary group. &amp;amp;lt;BR /&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt;Any suggestion ?&amp;amp;lt;BR /&amp;amp;gt;Thanks a lot!&amp;amp;lt;BR /&amp;amp;gt;&amp;amp;lt;BR /&amp;amp;gt;&lt;/SHELL&gt;&lt;/DIR&gt;&lt;/GROUP...&gt;&lt;/GROUP&gt;&lt;/GROUP&gt;&lt;/UID&gt;</description>
      <pubDate>Tue, 06 Jul 2004 05:09:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-on-usermod-g-option/m-p/3323780#M187850</guid>
      <dc:creator>Shan_2</dc:creator>
      <dc:date>2004-07-06T05:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: question on $usermod -G option</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-on-usermod-g-option/m-p/3323781#M187851</link>
      <description>Try the command without spaces after commas, eg: -&lt;BR /&gt;&lt;BR /&gt;usermod -G group1,group2,group3 user1&lt;BR /&gt;&lt;BR /&gt;instead of&lt;BR /&gt;&lt;BR /&gt;usermod -G group1, group2, group3 user1&lt;BR /&gt;&lt;BR /&gt;The manpage is slightly misleading, but with spaces the parameters will not be interpreted correctly.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sy</description>
      <pubDate>Tue, 06 Jul 2004 05:15:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-on-usermod-g-option/m-p/3323781#M187851</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2004-07-06T05:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: question on $usermod -G option</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-on-usermod-g-option/m-p/3323782#M187852</link>
      <description>Thank you Simon, it Works!&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Jul 2004 05:18:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-on-usermod-g-option/m-p/3323782#M187852</guid>
      <dc:creator>Shan_2</dc:creator>
      <dc:date>2004-07-06T05:18:31Z</dc:date>
    </item>
  </channel>
</rss>

