privileges

PostgreSQL user listing

让人想犯罪 __ 提交于 2019-12-03 02:36:59
问题 I want to get a list of users for a certain database in psql - for example "template0". Who are the users? Or for "template1" database: - who are the users there? Already tried: \du+ -- no database is Listed not Users Select * from "pg_users"; -- no database is listed 回答1: User aren't actually, "for the database", they're for cluster and are given different permissions to access databases. To list users \du should do, but you need to be connected. Something like psql template1 -c '\du' from

Check Postgres access for a user

依然范特西╮ 提交于 2019-12-03 01:04:07
I have looked into the documentation for GRANT Found here and I was trying to see if there is a built-in function that can let me look at what level of accessibility I have in databases. Of course there is: \dp and \dp mytablename But this does not show what my account has access to. I would like to see ALL the tables I have access to. Can anyone tell me if there is a command that can check my level of access in Postgres (whether I have SELECT , INSERT , DELETE , UPDATE privileges)? And if so, what would that command be? You could query the table_privileges table in the information schema:

Windows UAC Security With Exe

◇◆丶佛笑我妖孽 提交于 2019-12-02 23:29:48
问题 I have an exe created with an old Borland C++ compiler. It needs administrator privileges to function correctly. Since the app will run at startup, I do not want the user prompted if it's OK to run the program (testing on Win7). My question is is there ANY way to remove that annoying prompt every time the app is run? I added a manifest file with admin privs and signed it, but it then still appears with the publisher name. This will be distributed, so I don't want users to have to turn off UAC

mysql_exceptions.OperationalError: (1045, “Access denied for user 'root'@'localhost' (using password: YES)”)

心不动则不痛 提交于 2019-12-02 20:51:24
I've started working with django, and here is the error on 'runserver' after setting up 'DATABASES' in settings.py mysql_exceptions.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)") My settings.py portion of code: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'my_site', # Or path to database file if using sqlite3. 'USER': 'root', # Not used with sqlite3. 'PASSWORD': 'root', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with

Cross-platform way to check admin rights in a Python script under Windows?

你说的曾经没有我的故事 提交于 2019-12-02 20:38:08
Is there any cross-platform way to check that my Python script is executed with admin rights? Unfortunately, os.getuid() is UNIX-only and is not available under Windows. import ctypes, os try: is_admin = os.getuid() == 0 except AttributeError: is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0 print is_admin Try doing whatever you need admin rights for, and check for failure. This will only work for some things though, what are you trying to do? It's better if you check which platform your script is running (using sys.platform ) and do a test based on that, e.g. import some hasAdminRights

How to view user privileges using windows cmd?

谁说胖子不能爱 提交于 2019-12-02 20:19:49
I am trying to view the user privileges using the command prompt in Windows. User account & User privileges such as SeBatchLogonRight SeDenyBatchLogonRight SeInteractiveLogonRight SeDenyInteractiveLogonRight SeServiceLogonRight SeDenyServiceLogonRight SeNetworkLogonRight SeDenyNetworkLogonRight.....etc. I tried using ntrights but it's not working. I can't use any tool as I am trying to create an automated script for an OS audit. Thanks in advance. I'd start with secedit /export /areas USER_RIGHTS /cfg OUTFILE.CFG . Then examine the line for the relevant privilege. However, the problem now is

PostgreSQL user listing

耗尽温柔 提交于 2019-12-02 16:11:51
I want to get a list of users for a certain database in psql - for example "template0". Who are the users? Or for "template1" database: - who are the users there? Already tried: \du+ -- no database is Listed not Users Select * from "pg_users"; -- no database is listed User aren't actually, "for the database", they're for cluster and are given different permissions to access databases. To list users \du should do, but you need to be connected. Something like psql template1 -c '\du' from the command line prompt should do. (or \du from psql prompt when you are connected to the database ). You

Windows UAC Security With Exe

谁都会走 提交于 2019-12-02 13:26:40
I have an exe created with an old Borland C++ compiler. It needs administrator privileges to function correctly. Since the app will run at startup, I do not want the user prompted if it's OK to run the program (testing on Win7). My question is is there ANY way to remove that annoying prompt every time the app is run? I added a manifest file with admin privs and signed it, but it then still appears with the publisher name. This will be distributed, so I don't want users to have to turn off UAC or do anything too complicated. Any suggestions are much appreciated. I am hoping there's something

Root privileges to install ruby gems on Openshift

放肆的年华 提交于 2019-12-02 12:52:50
问题 How can I get root privileges in my Openshift app? I need to install additional gems to my Openshift virtual machine and it's impossible to do it without superuser privileges. For login, I'm using SSH: ssh generated-hash@myapp-myns.rhcloud.com I've already entered my id_key.pub to the Openshift web interface and I'm doing SSH with no password. 回答1: To install additional gems in openshift see this forum, copied from ramr answer: So what you would need to do is add a Gemfile + Gemfile.lock to

Difference between query of privileges in tables

拜拜、爱过 提交于 2019-12-02 08:54:58
问题 Reading this answer I found a query to find the privileges of a table: SELECT * FROM ALL_TAB_PRIVS WHERE TABLE_NAME = 'MY_TABLE' But a friend give me to me this query: select a.USERNAME,a.GRANTED_ROLE,b.ROLE,b.owner,b.TABLE_NAME,b.privilege from user_role_privs a,role_tab_privs b where b.ROLE=a.GRANTED_ROLE and b.TABLE_NAME = 'MY_TABLE'; There is some substantial difference between each query? 回答1: They are quite different, yes. In Oracle, privileges on a table can be granted either directly