<?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: /etc/passwd file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877562#M744105</link>
    <description>And you changed your names.txt to look like this?&lt;BR /&gt;&lt;BR /&gt;rc00123 Bob James&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
    <pubDate>Thu, 30 Dec 2004 16:14:43 GMT</pubDate>
    <dc:creator>John Poff</dc:creator>
    <dc:date>2004-12-30T16:14:43Z</dc:date>
    <item>
      <title>/etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877551#M744094</link>
      <description>I need a script snippet to populate my passwd file with the users real names.  The names are in the /etc/passwd files from 2 other systems.  The servers run independent of each other and where not set up on NIS.&lt;BR /&gt;&lt;BR /&gt;Any help would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Tom</description>
      <pubDate>Thu, 30 Dec 2004 14:55:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877551#M744094</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2004-12-30T14:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877552#M744095</link>
      <description>webadmin:*:40:1::/usr/obam/server/nologindir:/usr/bin/false&lt;BR /&gt;ids:*:101:101:IDS/9000 Administrator:/home/ids:/sbin/sh&lt;BR /&gt;&lt;BR /&gt;System is trusted, * instead of encrypted password.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 30 Dec 2004 15:06:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877552#M744095</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-12-30T15:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877553#M744096</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Here is one way to do it.  First, create an ASCII file containing the account name and the real user name from the other system.  Call it names.txt, and assume it looks something like this:&lt;BR /&gt;&lt;BR /&gt;jpoff John Poff&lt;BR /&gt;tomv Tom Vormwald&lt;BR /&gt;&lt;BR /&gt;Now, a little script snippet like this would read this file and use the usermod command to update the name field:&lt;BR /&gt;&lt;BR /&gt;while read user LINE; do usermod -c \"$LINE\" $user ; done &lt;NAMES.TXT&gt;&lt;/NAMES.TXT&gt;&lt;BR /&gt;Just one way to do it.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Dec 2004 15:07:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877553#M744096</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2004-12-30T15:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877554#M744097</link>
      <description>Could it be run from the command line like this&lt;BR /&gt;&amp;gt;while read user LINE; do usermod -c \"$LINE\" $user ; done &lt;NAMES.TXT&gt;&lt;/NAMES.TXT&gt;&lt;BR /&gt;Or should I place it in it's own shell and run the script?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Tom</description>
      <pubDate>Thu, 30 Dec 2004 15:40:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877554#M744097</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2004-12-30T15:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877555#M744098</link>
      <description>You can put it in a shell script or run it from the command line.  I'm lazy and it is a short snippet, so I'd probably just run it from the command line.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Dec 2004 15:49:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877555#M744098</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2004-12-30T15:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877556#M744099</link>
      <description>Thanks, I'll give it a go...</description>
      <pubDate>Thu, 30 Dec 2004 15:50:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877556#M744099</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2004-12-30T15:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877557#M744100</link>
      <description>I created the names.txt file with the user real name -c first, then put the login name:&lt;BR /&gt;&lt;BR /&gt;Bob James  rc00123&lt;BR /&gt;&lt;BR /&gt;then ran the command:&lt;BR /&gt;while read user LINE; do usermod -c \"$LINE\" $user ; done &lt;NAMES.TXT&gt;&lt;/NAMES.TXT&gt;&lt;BR /&gt;Error message below:&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&lt;BR /&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;What did I miss?&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>Thu, 30 Dec 2004 16:00:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877557#M744100</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2004-12-30T16:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877558#M744101</link>
      <description>You'll need to put the login name first and then the real name.  The code snippet will read the login name and put it in the $user variable, and everything else on the line will go into the $LINE variable.  That way, if you have a real user name with several words they will all wind up in the $LINE variable.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Dec 2004 16:06:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877558#M744101</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2004-12-30T16:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877559#M744102</link>
      <description>To clarify my last post, your login name needs to come first in the names.txt file.  Your command line in the script snippet is find.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Dec 2004 16:07:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877559#M744102</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2004-12-30T16:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877560#M744103</link>
      <description>I get the same error again that way</description>
      <pubDate>Thu, 30 Dec 2004 16:10:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877560#M744103</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2004-12-30T16:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877561#M744104</link>
      <description>BTW, this is an untrusted system.  Only the back-up servers for 2 production servers.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 30 Dec 2004 16:13:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877561#M744104</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2004-12-30T16:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877562#M744105</link>
      <description>And you changed your names.txt to look like this?&lt;BR /&gt;&lt;BR /&gt;rc00123 Bob James&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Dec 2004 16:14:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877562#M744105</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2004-12-30T16:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877563#M744106</link>
      <description>Yes,&lt;BR /&gt;&lt;BR /&gt;rc00123 Bob James&lt;BR /&gt;rc01223 Jesse Jones&lt;BR /&gt;&lt;BR /&gt;etc...&lt;BR /&gt;&lt;BR /&gt;Same error comes up as before.  Any thoughts?</description>
      <pubDate>Thu, 30 Dec 2004 16:16:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877563#M744106</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2004-12-30T16:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877564#M744107</link>
      <description>Weird.  It works ok under my account, but not as root.  I did find a way to make it work though.  Try this for your code snippet:&lt;BR /&gt;&lt;BR /&gt;while read user LINE; do eval usermod -c \"$LINE\" $user; done &lt;NAMES.TXT&gt;&lt;/NAMES.TXT&gt;&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Dec 2004 16:33:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877564#M744107</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2004-12-30T16:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877565#M744108</link>
      <description>while read user LINE; do eval usermod -c \"$LINE\" $user; done &lt;NAMES.TXT&gt;&lt;/NAMES.TXT&gt;&lt;BR /&gt;&lt;BR /&gt;Worked like a charm, thanks so much.  Saved my New Year.&lt;BR /&gt;&lt;BR /&gt;Thanks Again,&lt;BR /&gt;&lt;BR /&gt;Tom</description>
      <pubDate>Thu, 30 Dec 2004 16:41:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877565#M744108</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2004-12-30T16:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877566#M744109</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you can also try this from command line,&lt;BR /&gt;&lt;BR /&gt;# cat names.txt |while read user line&lt;BR /&gt;&amp;gt;do&lt;BR /&gt;&amp;gt;usermod -c "$line" $user&lt;BR /&gt;&amp;gt;done&lt;BR /&gt;&lt;BR /&gt;You will not be able to run this command "usermod" for any user who is currently logged in. it will give you an error. However for users who are not logged in, it would still work okay.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;regds&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Dec 2004 16:43:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877566#M744109</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2004-12-30T16:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: /etc/passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877567#M744110</link>
      <description>while read user LINE; do eval usermod -c \"$LINE\" $user; done &lt;NAMES.TXT&gt;&lt;/NAMES.TXT&gt;&lt;BR /&gt;&lt;BR /&gt;After importing the names for the 2 other servers into a file (names.txt) and running the above command the /etc/passwd file is now populated with the users real names.&lt;BR /&gt;&lt;BR /&gt;Many thanks.&lt;BR /&gt;&lt;BR /&gt;Tom</description>
      <pubDate>Fri, 31 Dec 2004 12:04:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/etc-passwd-file/m-p/4877567#M744110</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2004-12-31T12:04:30Z</dc:date>
    </item>
  </channel>
</rss>

