Script to list the users and their privileges in a database

Hi Team,
Can someone provide me a script that list all the users and their privileges in a database?
DB version:11.2.0.2
OS:AIX

Osama_mustafa wrote:
Why you create your own script
SELECT * FROM USER_SYS_PRIVS;
SELECT * FROM USER_TAB_PRIVS;
SELECT * FROM USER_ROLE_PRIVS;
That won't tell him what privileges a user has via a role. It will only tell him what privilges were granted directly, and what roles were granted directly. But those roles have privileges, and may have other roles, which have still more roles and privs, etc. It's a recursive issue and a simple select from user__privs won't get it.
Pete Finnigan has a good script for reporting the entire picture. I leave it as an exercise for the student to use google to find it. I have already given all the information needed to complete that exercise.

Similar Messages

  • How to find out list of users and their access on Sharepoint

    Hello Everyone
    How can i find out list of users and what access they have on SharePoint site? I want to create table with list of the users and their access?
    Thanks

    you can get the report using below powershell scripts. first one gives list of users in a site collection level.
    The second link generates the permissions reports for each user.
    http://techtrainingnotes.blogspot.com/2010/12/sharepoint-powershell-script-to-list.html
    https://sp2010userperm.codeplex.com/
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • List of users and their decimal notation settings in SAP system

    Hi all, i'm looking to get my hands on a list of all users in our SAP system and their respective decimal notation settings? I know that these can be mass changed using SU10 however I am unable to determine how to view a list of users and their settings.
    Thanks,
    James

    Hi James,
    You can find many useful reports, in SUIM transaction to see user details, but not decimal notation field. I don't know a report to show decimal notations, but as a workaround, in order to see the decimal notation, you can check "USR01-DCPFM" by using "SE16".
    Best regards,
    Orkun Gedik

  • How can I list all users and their DEFAULT tablespace?

    How can I list all users and their DEFAULT tablespace?
    Peter

    Peter, the following short article that lists the most heavily used Oracle rdbms dictionay views might be of interest based on your question:
    How do I find information about a database object: table, index, constraint, view, etc… in Oracle ? http://www.jlcomp.demon.co.uk/faq/object_info.html
    HTH -- Mark D Powell --

  • BI Report - List all users and their assigned roles

    Hello,
    i need a report, which lists me all users and their roles.
    Which table stores this membership information about the users?
    USR or UGP does not have any values

    Hi Reynaldo,
    You can go to SE16 -> table name "AGR_USERS" and see the records for all users. Arrange them in ascending order by name and you will get the report what you have mention above.
    Download it and put it in EXCEL.
    Best Wishes.
    Kumar

  • List all users and their own roles.

    Hi everybody!
    I have to make a list of all sap users and their own separated roles by user. There are any transaction to do it? The SUIM transaction gives me a sap user and their own roles, but if I try with a lot users It gives me all the roles that are using those users but don't give me the roles for each one.
    Thanks a lot.
    Best regards.

    Hi Reynaldo,
    You can go to SE16 -> table name "AGR_USERS" and see the records for all users. Arrange them in ascending order by name and you will get the report what you have mention above.
    Download it and put it in EXCEL.
    Best Wishes.
    Kumar

  • List of users and their licence allocation

    I am aware of accessing Admin>> License>> License allocation, one by on - but would like to have access to be able to llist users and their licence allocation.

    hello Liza,
    you may see this thread. this may help you
    License Allocation
    hope it helps..
    Fidel

  • List EM Users and their access to targets

    Hi,
    We have a requirement to show who has access to Enterprise Manager and what can each person do. Seems simple enough. Still, lol, I cannot find a report or an example of how to do this.
    How do I list all of the administrators in Enterprise Manager (other than taking a screenshot of the 'Administrators' page under Setup), please?
    How to I list each Administrator's privileges by Target?
    Thank you in advance!
    - Beach

    Hello,
    Thank you.
    That gives me a list of users in the Grid Control. How do I determine which targets each user can use, please?
    Now that I know about this table, I will start looking around the schema to see what I can find.
    - Beach

  • Tracing all users and their privileges

    Hi everbody!
    I want to trace all users(online/offline) and those user's given privileges as a system dba. Are there any data dictionary views to trace it ?
    i.e.
    we have 3 users and 3 of them have connect,resource. How can we know who have which privs ?
    i checked dba_role_privs, nothing to solve my prob.
    thanks.

    You should never assign CONNECT or RESOURCE to anyone.
    Determine what privileges each connected user requires and create a role that contains the actual privs required.
    System and Object privileges may be granted explicitly or in roles and roles can be granted to roles. Check here too:
    all_tab_privs_made
    all_tab_privs_recd
    all_col_privs_made
    all_col_privs_recd

  • List all users and their OUs they belong to

    Hi,
    I would like to list all users with the OU they belong to and furthermore add an specific attribute that was added...
    I can get both information separately:
    get-aduser -SearchBase 'OU=DOMAIN,DC=mygroup,DC=re,DC=lan' | FT name
    and
    Get-ADOrganizationalUnit -SearchBase 'OU=DOMAIN,DC=mygroup,DC=re,DC=lan' -properties name,budgetanalytics | FT name,budgetanalytics
    but I'd like to get the list containing user1, its OU, its budgetanalytics
    Thanking you in advance,
    Cédric

    Thanks for your reply!
    I tried the following:
    $Users = get-aduser -SearchBase 'OU=Mes Utilisateurs,DC=itced,DC=lan' -filter '*'
    $OU = $User.distinguishedname -split ',',2 | select -last 1
    $output = @()
    Foreach($User in $Users){
    $budgetanalytics = Get-ADOrganizationalUnit -SearchBase $OU -Properties objectGUID
    $Object = New-Object PSObject                                       
    $Object | add-member Noteproperty user $user.name         
    $Object | add-member Noteproperty OU $OU                       
    $Object | add-member Noteproperty objectGUID $objectGUID       
    $output += $Object
    $output
    but I get the following
    user                                             
    OU                                              
    objectGUID                                      
    User1                                            
    OU=Mon OU,OU=Mes Utilisateurs,DC=itced,DC=lan    {Microsoft.PowerShell.Commands.Internal.Forma...
    User2                                            
    OU=Mon OU,OU=Mes Utilisateurs,DC=itced,DC=lan    {Microsoft.PowerShell.Commands.Internal.Forma...
    Why do I get "Microsoft.PowerShell.Commands.Internal.Forma..." instead of the actual objectGUID of the Organizational Unit
    Thanking you in advance

  • Modifying my script to list all folders and their lastwritetime on remote computers

    Hello,
    I've got the following script that is trying to report on a list of computers (in computerlist.txt) the contents of the C:\Users folder and list in the resulting CSV File the Name of the computer, the Folder Name and the Date it was last changed (sort by
    most recent first).
    $servers = GC C:\Powershell_Scripts\computerlist.txt
    ForEach($server in $servers) {
    If (Test-Connection -comp $server -count 1 -quiet) {
    Get-Childitem ("\\$server\c$\Users") | Where-Object { $_.mode -like 'd*' } | Select-Object $server, Name, LastWriteTime | Export-Csv C:\Apps\Powershell_Scripts\LastLogin\Reports\directoryFile.csv
    I'm part way there but my script is not showing each computer..only the last computer in the list.
    Please assist with making the necessary changes to this script.
    Thank you.

    Thanks for the reply Mike.
    I am running version 3.  I've added the -Append to my script but it doesn't seem to like it.  Here's the error I get:
    Export-Csv : Cannot append CSV content to the following file: C:\Powershell_Scripts\Reports\directoryFile.csv. The appended object does not have a property that corresponds to the following column: ServerABC. To proceed with mismatched
    properties, add the -Force switch and retry.
    Where ServerABC is the name of the first server in computerlist.txt. 
    Here is how I added the -Append:
    $servers = GC C:\Powershell_Scripts\computerlist.txt
    ForEach($server in $servers) {
    If (Test-Connection -comp $server -count 1 -quiet) {
    Get-Childitem ("\\$server\c$\Users") | Where-Object { $_.mode -like 'd*' } | Select-Object $server, Name, LastWriteTime | Export-Csv -Append C:\Apps\Powershell_Scripts\LastLogin\Reports\directoryFile.csv
    The report being written out also isn't in the format I need.
    ServerABC Name LastWriteTime
    User1 5/12/2014 16:11
    ADMINI~1 7/30/2012 13:37
    User2 4/1/2014 18:23
    How do I modify this to show the following output instead:
    Computer Name LastWriteTime
    ServerABC User1 5/12/2014 16:11
    ADMINI~1 7/30/2012 13:37
    User2 4/1/2014 18:23
    ServerDEF User1 6/14/2014 14:12
    ADMINI~1 6/24/2012 15:38
    User2 5/1/2014 20:25
    Thank you.

  • Getting list of all users and their group memberships from Active Directory

    Hi,
    I want to retrieve a list of all the users and their group memberships through JNDI from Active Directory. I am using the following code to achieve this:
    ==================
    import javax.naming.*;
    import java.util.Hashtable;
    import javax.naming.directory.*;
    public class GetUsersGroups{
         public static void main(String[] args){
              String[] attributeNames = {"memberOf"};
              //create an initial directory context
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://172.19.1.32:389/");
              env.put(Context.SECURITY_AUTHENTICATION, "simple");
              env.put(Context.SECURITY_PRINCIPAL, "[email protected]");
              env.put(Context.SECURITY_CREDENTIALS, "p8admin");
              try {
                   // Create the initial directory context
                   DirContext ctx = new InitialDirContext(env);     
                   //get all the users list and their group memberships
                   NamingEnumeration contentsEnum = ctx.list("CN=Users,DC=filenetp8,DC=com");
                   while (contentsEnum.hasMore()){
                        NameClassPair ncp = (NameClassPair) contentsEnum.next();
                        String userName = ncp.getName();
                        System.out.println("User: "+userName);
                        try{
                             System.out.println("am here....1");
                             Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should be returned
                             System.out.println("am here....2");
                             Attribute groupsAttribute = attrs.get(attributeNames[0]); // memberOf
                             System.out.println("-----"+groupsAttribute.size());
                             if (groupsAttribute != null){
                                  // memberOf is a multi valued attribute
                                  for (int i=0; i<groupsAttribute.size(); i++){
                                  // print out each group that user belongs to
                                  System.out.println("MemberOf: "+groupsAttribute.get(i));
                        }catch(NamingException ne){
                        // ignore for now
                   System.err.println("Problem encountered....0000:" + ne);
                   //get all the groups list
              } catch (NamingException e) {
              System.err.println("Problem encountered 1111:" + e);
    =================
    The following exception gets thrown at every user entry:
    User: CN=Administrator
    am here....1
    Problem encountered....0000:javax.naming.NamingException: [LDAP: error code 1 -
    000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
    ]; remaining name 'CN=Administrator'
    I think it gets thrown at this line in the code:
    Attributes attrs = ctx.getAttributes(userName, attributeNames);
    Any idea how to overcome this and where am I wrong?
    Thanks in advance,
    Regards.

    In this sentence:
    Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should
    It seems Ok when I add "CN=Users,DC=filenetp8,DC=com" after userName, just as
    userName + ",CN=Users,DC=filenetp8,DC=com"
    But I still have some problem with it.
    Hope it will be useful for you.

  • List all users and other information into application

    Hi,
    In the LDAP that we use, it contains - user id and xyz_code (this code is particular to application). Note that for each user_id there exists one xyz_code.
    I can get the user id from IUser and xyz_code from an attribute app_xyz_code.
    String xyzCode = sapume.getValue("app_xyz_code",iuser, true);
    I have a requirement where I need to get user ids for a set of xyz_codes.
    1) Suppose I have 100 xyz_codes I need to get 100 users from LDAP. So 100 times I need to hit LDAP. How do i make a search in LDAP using xyz_code. Is it preferrable to make a search like this?
    2) Another thing I want to know is if it is possible to get all the users and their corresponding xyz_codes from LDAP and store them in a List/Vector/Enumeration. So that I can search in the list for user id corresponding to xyz_code.
    Any code snippets is appreciated.
    Thank you
    Karthika

    Thanks for your reply!
    I tried the following:
    $Users = get-aduser -SearchBase 'OU=Mes Utilisateurs,DC=itced,DC=lan' -filter '*'
    $OU = $User.distinguishedname -split ',',2 | select -last 1
    $output = @()
    Foreach($User in $Users){
    $budgetanalytics = Get-ADOrganizationalUnit -SearchBase $OU -Properties objectGUID
    $Object = New-Object PSObject                                       
    $Object | add-member Noteproperty user $user.name         
    $Object | add-member Noteproperty OU $OU                       
    $Object | add-member Noteproperty objectGUID $objectGUID       
    $output += $Object
    $output
    but I get the following
    user                                             
    OU                                              
    objectGUID                                      
    User1                                            
    OU=Mon OU,OU=Mes Utilisateurs,DC=itced,DC=lan    {Microsoft.PowerShell.Commands.Internal.Forma...
    User2                                            
    OU=Mon OU,OU=Mes Utilisateurs,DC=itced,DC=lan    {Microsoft.PowerShell.Commands.Internal.Forma...
    Why do I get "Microsoft.PowerShell.Commands.Internal.Forma..." instead of the actual objectGUID of the Organizational Unit
    Thanking you in advance

  • List of Users and Roles Assigned in Portal (producer & consumer)

    Hi
    We are running federated portal EP 7.0 EHP1 SPS07, we need to pull the list of users and their roles assigned from tables or thru report in our federated portal, so that we can have a consolidated list of users and their roles in both producer and consumer portal
    Thanks
    Senthil

    Hi Senthil,
    Use report RSUSR002 to get list of roles for the users.
    Regards,
    Marasa.

  • Get the list of reports and their ODBC details

    Hi :
    We have around 20,000 objects hosted on our BOXI R2 SP3 environment. May be around 17000 of these are reports. I have a few questions >>
    1. Is their a way to get the list of all the reports and their ODBC details. I tried running the following query 'Select Top 20000 SI_ID, SI_NAME, SI_PROCESSINFO.SI_LOGON_INFO From CI_INFOOBJECTS Where SI_PROGID = 'CrystalEnterprise.Report' and SI_INSTANCE = 'False'' in the query builder. But it times out.
    2. Will running this query using the sdk affect the stability of the environment.
    3. Is there a way to spilt the query into 4-5 batches to get 3000-4000 records at a time.
    4. Can we get the min(SI_ID) and max(SI_ID), how ?
    Regards,
    Abhijit Sanas

    You can try batching on SI_ID, doing something like:
    "Select TOP 1000  SI_ID, SI_NAME, SI_PROCESSINFO.SI_LOGON_INFO From CI_INFOOBJECTS Where SI_PROGID = 'CrystalEnterprise.Report' and SI_INSTANCE = 0 and SI_ID > " + max_si_id_value + " ORDER BY SI_ID ASC"
    then update the max_si_id_value each batch.  SI_ID and SI_PROGID are indexed properties, so they help.
    Sincerely,
    Ted Ueda

Maybe you are looking for

  • Help with two ipod users on one computer???

    Ok heres a quick rundown of the problem. My girlfriend and i both have ipod minis and i am having difficulty getting I tunes to work for me. Her I tunes works fine for her I pod, but when i try to add music files to my ipod using her I tunes, it keep

  • Ready to play in 14 minutes. Is this normal?

    Im concerned about my dcownload speed.  For example, to download a 45 minute hd show, my Atv says ready to play in 14 minutes. Than the estimated time drops throughout the download and ends up taking 4 minutes and 30 seconds. Is this normal?  My down

  • First time log to 9i Portal

    To test whether my personalization portal works fine, I typed http://hostname.papz.login.jsp , and entered log in /pwd ( as rajeev/rajeev , I created during portal install) BUT it shows INVALID LOGIN PASSWORD ? Do Need to enter some other other log i

  • Light table in Keynote 3

    In the light table view in Keynote 3 you can rearrange the order of slides. But is there any way I can reorder the slides vertically, instead of horizontally? I would like to arrange them from top to bottom in light table view. Thanks, norris

  • RMAN Failure

    Hi, Any body pz help here what may be the issue and solution Tonight’s RMAN backup has failed with the following errors: Starting backup at 07-OCT-09 could not read file header for datafile 5 error reason 1 could not read file header for datafile 6 e