Operating System - HP-UX
1856402 Members
9836 Online
104112 Solutions
New Discussion

Identifying user / group privilages from command line

 
SOLVED
Go to solution
Sanjay Verma
Super Advisor

Identifying user / group privilages from command line

Hi Friends,

Is there any command which I can execute (not as a root but as a normal user) to identify which privilages belongs to a particular user. In other words, all privilages belonging to a specific group?

Regards,
Sanjay
Co-operation - The biggest chain reaction
7 REPLIES 7
Tom Geudens
Honored Contributor
Solution

Re: Identifying user / group privilages from command line

Hi,
Is "getprivgrp" what you are looking for ?

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
Michael Tully
Honored Contributor

Re: Identifying user / group privilages from command line

There is no one command that does this.

Have a look at
id
groups
logname
finger

There are man pages for each of these.
Anyone for a Mutiny ?
Sanjay Verma
Super Advisor

Re: Identifying user / group privilages from command line

Hey Tom,

I would like to know which directories or other privilages a specific user have.

Regards, Sanjay
Co-operation - The biggest chain reaction
Michael Tully
Honored Contributor

Re: Identifying user / group privilages from command line

You can use the find command to find their files/directories.

e.g
# find /home -type f -user fred -print | xargs ll
# find /home -type d -user fred -print | xargs ll

Anyone for a Mutiny ?
Sanjay Verma
Super Advisor

Re: Identifying user / group privilages from command line

Hi Michael / Tom,

What about if I want to see that information about other users also (apart from myself - logged in)?

Also, what does "||" refers to in your command as I am getting error mesg. while executing it:

find /home -type f -user icare -print | xargs ||

In brief, when I'm logged in as user "A", I would like to see the users & groups privilages of users "B", "C", "D" etc.

~Sanjay
Co-operation - The biggest chain reaction
Michael Tully
Honored Contributor

Re: Identifying user / group privilages from command line

Hi Sanjay,

The ll is el el
Like ls -l

To view the group priviledges of another user

# id -nr username
Anyone for a Mutiny ?
Sanjay Verma
Super Advisor

Re: Identifying user / group privilages from command line

Hi Friends,

Help me out in this. I have a user "A" belonging to group "G1" on Server 1. I want to create another user "B" belonging to group "G2" on Server 2 making sure that all directories that group "G1" has access to Server 1, also, group "G2" must have access to same set of directories/files on Server 2.

How can I determine which all access group G1 has on Server 1 so that I can have the same set of setup on Server 2.

Hope this's not confusing.

Thankx
Co-operation - The biggest chain reaction