<?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: List group/users access in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609408#M35795</link>
    <description>Hi John,&lt;BR /&gt;&lt;BR /&gt;Strange, it works perfectly for me on HP-UX 11.00. What version of HP-UX are you using? Are you able to post your script here so I can take a further look at it?&lt;BR /&gt;&lt;BR /&gt;And are you going to assign points to all the nice people that have posted helping responses? :-)&lt;BR /&gt;&lt;BR /&gt;James</description>
    <pubDate>Fri, 09 Nov 2001 14:12:06 GMT</pubDate>
    <dc:creator>James Beamish-White</dc:creator>
    <dc:date>2001-11-09T14:12:06Z</dc:date>
    <item>
      <title>List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609396#M35783</link>
      <description>Does anyone know of a cmd that will list all of the files &amp;amp; directories that a particular group/users has access to and what level of access they have?  I've tried "find" and I can't seem to get the correct syntax to list the filename/directory with permissions.</description>
      <pubDate>Wed, 07 Nov 2001 20:42:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609396#M35783</guid>
      <dc:creator>John Ferrara</dc:creator>
      <dc:date>2001-11-07T20:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609397#M35784</link>
      <description>John&lt;BR /&gt;&lt;BR /&gt;users&lt;BR /&gt;find / -user USERNAME -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;groups&lt;BR /&gt;find / -group GROUPNAME -exec ll {} \;&lt;BR /&gt;&lt;BR /&gt;I just threw the -exec part in there but this syntax should work for you.&lt;BR /&gt;&lt;BR /&gt;Good Luck,&lt;BR /&gt;C</description>
      <pubDate>Wed, 07 Nov 2001 20:47:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609397#M35784</guid>
      <dc:creator>Craig Rants</dc:creator>
      <dc:date>2001-11-07T20:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609398#M35785</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt; to list files/directories&lt;BR /&gt;owner by particular user/group&lt;BR /&gt;and their permissions:&lt;BR /&gt;&lt;BR /&gt;find $DIR -user &lt;LOGINID&gt; -exec ll {} \;  | more&lt;BR /&gt;&lt;BR /&gt;(for group -&amp;gt; change -user&lt;BR /&gt;to  -group &lt;GROUPID&gt;&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;raj&lt;/GROUPID&gt;&lt;/LOGINID&gt;</description>
      <pubDate>Wed, 07 Nov 2001 20:48:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609398#M35785</guid>
      <dc:creator>Roger Baptiste</dc:creator>
      <dc:date>2001-11-07T20:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609399#M35786</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;Did you try&lt;BR /&gt;&lt;BR /&gt;find / -user login_name -exec ll {}\;&lt;BR /&gt;&lt;BR /&gt;I don't think there is any equivalent switch for group.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Nov 2001 20:49:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609399#M35786</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-11-07T20:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609400#M35787</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;Ooops..no... You have got -group also there... I never used it before....&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Nov 2001 20:50:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609400#M35787</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-11-07T20:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609401#M35788</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;OK&lt;BR /&gt;&lt;BR /&gt;for i in `find / -user pipo`&lt;BR /&gt;do&lt;BR /&gt;echo $i &amp;gt;&amp;gt;filename&lt;BR /&gt;ll $i &amp;gt;&amp;gt;filename&lt;BR /&gt;echo "##### Next######"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Something like this should do it.&lt;BR /&gt;&lt;BR /&gt;Gideon&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Nov 2001 20:51:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609401#M35788</guid>
      <dc:creator>G. Vrijhoeven</dc:creator>
      <dc:date>2001-11-07T20:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609402#M35789</link>
      <description>Hi John,&lt;BR /&gt;&lt;BR /&gt;If you indeed want all files and directories a user / group has permissions to, read the man page for find and look at -perm.  I've not used it until just now but testing seems to show that -perm -nnn will show the files and directories with a mininum of the perms you specify.  Examples:&lt;BR /&gt;find . -perm -001 returns those with at least execute bit on for others.  It would return --x, -wx, r-x, and rwx for others without regard for user or group&lt;BR /&gt;find . -perm -020 returns those with at least write bit on for group.  It would return -w-, -wx, -rw, and rwx for group without regard for user and others&lt;BR /&gt;Also, the -nnn syntax will get those with suid and sticky bits as well&lt;BR /&gt;&lt;BR /&gt;Combine -perm syntax with -group and -user to get what you want.  For example, to find all files and directories that user userA in group groupA has write on:&lt;BR /&gt;&lt;BR /&gt;find / -user userA&lt;BR /&gt;    obviously if userA owns it he can change perms to include write&lt;BR /&gt;find / -group groupA -perm -020&lt;BR /&gt;find / -perm -002&lt;BR /&gt;&lt;BR /&gt;I think this can work.  Please test before trusting.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Wed, 07 Nov 2001 21:16:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609402#M35789</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2001-11-07T21:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609403#M35790</link>
      <description>Hi again John,&lt;BR /&gt;&lt;BR /&gt;If using the -exec ll syntax you should make it -exec ll -d {} \; otherwise it will list contents of the matching directories.&lt;BR /&gt;&lt;BR /&gt;I prefer xargs to -exec because it is more performant.  xargs takes as many command line args as possible then executes the command once for all those args. If there are more args it will execute the command again for remaining args, and so forth.  Test this by comparing the difference between:&lt;BR /&gt;timex find . -perm -002 -exec ll -d {} \;&lt;BR /&gt;timex find . -perm -002 | xargs ll -d&lt;BR /&gt;&lt;BR /&gt;I did a little more testing with the -perm syntax.  It only seems to do AND not OR logic.  That is, -perm -007 returns files that are rwx for others, not files that are read, write, execute, OR any combination other than rwx (again, without regard for owner and group permissions).  This can get a little cumbersome as shown by the following find commands needed to list all files and directories to which userA in groupA has access of any kind.&lt;BR /&gt;&lt;BR /&gt;find / -user userA | xargs ll -d &amp;gt;/tmp/list&lt;BR /&gt;find / -group groupA -perm -010 | xargs ll -d &amp;gt;&amp;gt;/tmp/list&lt;BR /&gt;find / -group groupA -perm -020 | xargs ll -d &amp;gt;&amp;gt;/tmp/list&lt;BR /&gt;find / -group groupA -perm -030 | xargs ll -d &amp;gt;&amp;gt;/tmp/list&lt;BR /&gt;find / -perm -001 | xargs ll -d &amp;gt;&amp;gt;/tmp/list&lt;BR /&gt;find / -perm -002 | xargs ll -d &amp;gt;&amp;gt;/tmp/list&lt;BR /&gt;find / -perm -003 | xargs ll -d &amp;gt;&amp;gt;/tmp/list&lt;BR /&gt;sort -u /tmp/list &amp;gt;list.sorted&lt;BR /&gt;&lt;BR /&gt;I thought that was the answer then I thought about "secondary" groups the user belongs to in /etc/group.  You've got to include them so now you have to add something like:&lt;BR /&gt;&lt;BR /&gt;for grp in `grep userA /etc/group | awk -F: '{print $1}'`&lt;BR /&gt;do&lt;BR /&gt;find / -group $grp -perm -010 | xargs ll -d &amp;gt;&amp;gt;/tmp/list&lt;BR /&gt;find / -group $grp -perm -020 | xargs ll -d &amp;gt;&amp;gt;/tmp/list&lt;BR /&gt;find / -group $grp -perm -030 | xargs ll -d &amp;gt;&amp;gt;/tmp/list&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;You'd think someone would write a program to do all this.  Any takers?&lt;BR /&gt;&lt;BR /&gt;This was probably overkill for your question but I wanted to follow up for my own benefit and then share it with the forums.&lt;BR /&gt;&lt;BR /&gt;One last thing, it's okay and desirable to assign points to all replies to your question, not just the one you choose to use.  The first 5 answers to this question were all entered within 4 minutes of each other so please don't disregard them.  It would be quite acceptable to give multiple "right" answers 10 points.  Also a few points for those where someone tried to answer will encourage them to continue trying.&lt;BR /&gt;&lt;BR /&gt;As for my replies, well it's a case of trying to add more info and completeness for your question.  I also spent some time in research which hopefully will help others down the road.  And even though I would like some points, I am using my reply just as an example of others where people who spend a little time trying to be helpful should be recognized. &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Darrell</description>
      <pubDate>Thu, 08 Nov 2001 15:08:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609403#M35790</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2001-11-08T15:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609404#M35791</link>
      <description>As noted above, find will do the search, but if you want both user OR group, try:&lt;BR /&gt;&lt;BR /&gt;find / \( -user YOURUSER -o -group YOURGROUP \) -exec ls -ld {} \;&lt;BR /&gt;&lt;BR /&gt;Substitute -a for -o if you want AND.&lt;BR /&gt;&lt;BR /&gt;Note that I used ls -ld so that it picks up directory ownership, and is cross-platform, as solaris doesn't have ll, and I don't know about AIX :-)&lt;BR /&gt;&lt;BR /&gt;James</description>
      <pubDate>Thu, 08 Nov 2001 17:32:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609404#M35791</guid>
      <dc:creator>James Beamish-White</dc:creator>
      <dc:date>2001-11-08T17:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609405#M35792</link>
      <description>As a response to Darrell's statement, instead of:&lt;BR /&gt;&lt;BR /&gt;for grp in `grep userA /etc/group | awk -F: '{print $1}'` &lt;BR /&gt;do &lt;BR /&gt;find / -group $grp -perm -010 | xargs ll -d &amp;gt;&amp;gt;/tmp/list &lt;BR /&gt;find / -group $grp -perm -020 | xargs ll -d &amp;gt;&amp;gt;/tmp/list &lt;BR /&gt;find / -group $grp -perm -030 | xargs ll -d &amp;gt;&amp;gt;/tmp/list &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;try replacing all those finds with&lt;BR /&gt;&lt;BR /&gt;find / -group $grp \( -perm -010 -o -perm -020 -o -perm -030 \) | xargs ls -ld {} \;&lt;BR /&gt;&lt;BR /&gt;Just my 0.02c since we were talking about performance ;-)&lt;BR /&gt;&lt;BR /&gt;James</description>
      <pubDate>Thu, 08 Nov 2001 17:36:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609405#M35792</guid>
      <dc:creator>James Beamish-White</dc:creator>
      <dc:date>2001-11-08T17:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609406#M35793</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;Nice add-on about using () to group the args.  Can't believe I've never used that.  I will now!&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Thu, 08 Nov 2001 22:53:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609406#M35793</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2001-11-08T22:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609407#M35794</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;I tried your cmd "find / \( -user YOURUSER -o -group YOURGROUP \) -exec ls -ld {} \;"  it came back w/ "bad option" for -o &amp;amp; -a.  When I omitted those, I got "missing conjunction" Did I miss something?&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Fri, 09 Nov 2001 14:00:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609407#M35794</guid>
      <dc:creator>John Ferrara</dc:creator>
      <dc:date>2001-11-09T14:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609408#M35795</link>
      <description>Hi John,&lt;BR /&gt;&lt;BR /&gt;Strange, it works perfectly for me on HP-UX 11.00. What version of HP-UX are you using? Are you able to post your script here so I can take a further look at it?&lt;BR /&gt;&lt;BR /&gt;And are you going to assign points to all the nice people that have posted helping responses? :-)&lt;BR /&gt;&lt;BR /&gt;James</description>
      <pubDate>Fri, 09 Nov 2001 14:12:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609408#M35795</guid>
      <dc:creator>James Beamish-White</dc:creator>
      <dc:date>2001-11-09T14:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609409#M35796</link>
      <description>Doh! I remember now....&lt;BR /&gt;&lt;BR /&gt;There *has* to be a space in between the \( and the -user, and before the \) at the end of the command. Try again and tell me if it works for you now :-)&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;James</description>
      <pubDate>Fri, 09 Nov 2001 14:13:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609409#M35796</guid>
      <dc:creator>James Beamish-White</dc:creator>
      <dc:date>2001-11-09T14:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: List group/users access</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609410#M35797</link>
      <description>BINGO!  That was it.  Thanks so much.  In case you were wondering why I needed this info, my systems get audited on a regular basis.  I'm required to submit access for individuals/groups on EVERY directory and file that is on each of my 15 servers!  &lt;BR /&gt;The previous admin had all of these cmds in his head.  I've been the admin for less than a year and sometimes the syntax for these cmds gets a little confusing. Thanks again for your help.&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Fri, 09 Nov 2001 14:40:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-group-users-access/m-p/2609410#M35797</guid>
      <dc:creator>John Ferrara</dc:creator>
      <dc:date>2001-11-09T14:40:52Z</dc:date>
    </item>
  </channel>
</rss>

