<?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: passwd file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709085#M60012</link>
    <description>The script would look like this ..(call it testscript)&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;IFS=:&lt;BR /&gt;exec 0while read -r Name PW UID GID Gecos Home Shell&lt;BR /&gt;do&lt;BR /&gt;print "$Name $UID $GID $Gecos"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This is how you can run it ..&lt;BR /&gt;&lt;BR /&gt;# testscript | sort&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 23 Apr 2002 12:22:55 GMT</pubDate>
    <dc:creator>S.K. Chan</dc:creator>
    <dc:date>2002-04-23T12:22:55Z</dc:date>
    <item>
      <title>passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709081#M60008</link>
      <description>Hi Guys, I need to get the username, userid, groupid and comments from /etc/passwd and then sort it, can anyone help me out.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 23 Apr 2002 12:09:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709081#M60008</guid>
      <dc:creator>Anthony khan</dc:creator>
      <dc:date>2002-04-23T12:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709082#M60009</link>
      <description>Assume that you want to sort by users' names.&lt;BR /&gt;&lt;BR /&gt;# awk -F: '{print $1 " " $3 " " $4 " " $5}' | sort&lt;BR /&gt;&lt;BR /&gt;Hai</description>
      <pubDate>Tue, 23 Apr 2002 12:17:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709082#M60009</guid>
      <dc:creator>Hai Nguyen_1</dc:creator>
      <dc:date>2002-04-23T12:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709083#M60010</link>
      <description># cat /etc/passwd | cut -f1,3-5 -d: | sort      &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Trond</description>
      <pubDate>Tue, 23 Apr 2002 12:18:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709083#M60010</guid>
      <dc:creator>Trond Haugen</dc:creator>
      <dc:date>2002-04-23T12:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709084#M60011</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;awk -F: '{printf "%-10s %6s %6s %-25s\n", $1, $3, $4, $5}' /etc/passwd | sort&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Tue, 23 Apr 2002 12:21:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709084#M60011</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-04-23T12:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709085#M60012</link>
      <description>The script would look like this ..(call it testscript)&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;IFS=:&lt;BR /&gt;exec 0while read -r Name PW UID GID Gecos Home Shell&lt;BR /&gt;do&lt;BR /&gt;print "$Name $UID $GID $Gecos"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This is how you can run it ..&lt;BR /&gt;&lt;BR /&gt;# testscript | sort&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Apr 2002 12:22:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709085#M60012</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-04-23T12:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709086#M60013</link>
      <description>Hi Khan,&lt;BR /&gt;&lt;BR /&gt;You can use the cut command on /etc/passwd file and extract the information.&lt;BR /&gt;&lt;BR /&gt;1. to get the username&lt;BR /&gt;cut -d":" -f1 /etc/passwd&lt;BR /&gt;&lt;BR /&gt;2. To get the userid &lt;BR /&gt; cut -d":" -f3 /etc/passwd&lt;BR /&gt;&lt;BR /&gt;3. To get the groupid&lt;BR /&gt; cut -d":" -f4 /etc/passwd&lt;BR /&gt;&lt;BR /&gt;and the comments&lt;BR /&gt; cut -d":" -f5 /etc/passwd&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Sukant</description>
      <pubDate>Tue, 23 Apr 2002 12:24:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709086#M60013</guid>
      <dc:creator>Sukant Naik</dc:creator>
      <dc:date>2002-04-23T12:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709087#M60014</link>
      <description>I was missing the input file /etc/passwd in my command which should be:&lt;BR /&gt;&lt;BR /&gt;# awk -F: '{print $1 " " $3 " " $4 " " $5}' /etc/passwd | sort &lt;BR /&gt;&lt;BR /&gt;Hai&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Apr 2002 12:29:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709087#M60014</guid>
      <dc:creator>Hai Nguyen_1</dc:creator>
      <dc:date>2002-04-23T12:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709088#M60015</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;This is only an optimized version for the cut solution:&lt;BR /&gt;cut -d":" -f1,3,4,5 /etc/passwd |sort&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Tue, 23 Apr 2002 12:56:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709088#M60015</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-04-23T12:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709089#M60016</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Here is a good one !! use the &lt;BR /&gt;following hp-ux command&lt;BR /&gt;&lt;BR /&gt;# /usr/sbin/logins -t&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--Niraj</description>
      <pubDate>Wed, 24 Apr 2002 02:38:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709089#M60016</guid>
      <dc:creator>Niraj Kumar Verma</dc:creator>
      <dc:date>2002-04-24T02:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: passwd file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709090#M60017</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;i would also add the "-m" option to the logins command to display multiple group membership data.&lt;BR /&gt;&lt;BR /&gt;logins -t -m&lt;BR /&gt;&lt;BR /&gt;hope this helps&lt;BR /&gt;&lt;BR /&gt;Best Regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Wed, 24 Apr 2002 06:29:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/passwd-file/m-p/2709090#M60017</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2002-04-24T06:29:26Z</dc:date>
    </item>
  </channel>
</rss>

