privileges

#1130 - Host ‘localhost’ is not allowed to connect to this MySQL server

走远了吗. 提交于 2019-11-27 09:20:45
I issued a command of: DROP USER 'root'@'localhost'; GRANT ALL PRIVILEGES ON . TO 'root'@'%'; ...in PhpMyAdmin. Immediately after the execution, I was forced out PhpMyAdmin. I got: error #1130 - Host 'localhost' is not allowed to connect to this MySQL server, how to resolve my problem? Use the IP instead: DROP USER 'root'@'127.0.0.1'; GRANT ALL PRIVILEGES ON . TO 'root'@'%'; For more possibilities, see this link . To create the root user, seeing as MySQL is local & all, execute the following from the command line (Start > Run > "cmd" without quotes): mysqladmin -u root password 'mynewpassword'

RealUID, Saved UID, Effective UID. What's going on?

元气小坏坏 提交于 2019-11-27 09:11:23
问题 This is a set-root-uid program $ls -l -rwsr-sr-x 1 root root 7406 2011-12-13 22:37 ./x* The source code: int main(void) { printf( " UID GID \n" "Real %d Real %d \n" "Effective %d Effective %d \n", getuid (), getgid (), geteuid(), getegid() ); seteuid(600); printf( " UID GID \n" "Real %d Real %d \n" "Effective %d Effective %d \n", getuid (), getgid (), geteuid(), getegid() ); setuid(1000); printf( " UID GID \n" "Real %d Real %d \n" "Effective %d Effective %d \n", getuid (), getgid (), geteuid(

C++ MSI Package Administative Privileges

柔情痞子 提交于 2019-11-27 08:49:12
问题 Here is the issue that I am having, I have a C++ application that runs by writing data to .txt files and I want to create an MSI Package for the application. When I build and run my app all is fine but when I run my MSI Setup File the created application does get granted the correct privileges to function. I can't find a way to allow the app to write to the .txt files needed even if I include them in the package and set them as system files. If I "Run as administrator" all is well but that

What registry access can you get without Administrator privileges?

こ雲淡風輕ζ 提交于 2019-11-27 06:52:34
I know that we shouldn't being using the registry to store Application Data anymore, but in updating a Legacy application (and wanting to do the fewest changes), what Registry Hives are non-administrators allowed to use? Can I access all of HKEY_CURRENT_USER (the application currently access HKEY_LOCAL_MACHINE ) without Administrator privileges? Euro Micelli In general, a non-administrator user has this access to the registry: Read/Write to: HKEY_CURRENT_USER Read Only: HKEY_LOCAL_MACHINE HKEY_CLASSES_ROOT (which is just a link to HKEY_LOCAL_MACHINE\Software\Classes ) It is possible to change

How do I get column datatype in Oracle with PL-SQL with low privileges?

旧城冷巷雨未停 提交于 2019-11-27 04:15:41
问题 I have "read only" access to a few tables in an Oracle database. I need to get schema information on some of the columns. I'd like to use something analogous to MS SQL's sp_help . I see the table I'm interested in listed in this query: SELECT * FROM ALL_TABLES When I run this query, Oracle tells me "table not found in schema", and yes the parameters are correct. SELECT DBMS_METADATA.GET_DDL('TABLE', 'ITEM_COMMIT_AGG', 'INTAMPS') AS DDL FROM DUAL; After using my Oracle universal translator

Privileges/owner issue when writing in C:\\ProgramData\\

风流意气都作罢 提交于 2019-11-27 04:02:28
As pointed out in Writing config file in C:\Program Files (x86)\MyApp\myapp.cfg, vs. Administrator privilege , it is not a good idea to write a config file in C:\Program Files (x86)\MyApp\myapp.cfg . Instead of this, my software now saves its data in a subdir of %ALLUSERSPROFILE% (ex : C:\ProgramData\MyApp\myapp.cfg on Win7) [I use myfile = open(filename, 'a') in Python to do this.] I now encounter an issue about this file : I installed the software with User A , and ran it, then the file C:\ProgramData\MyApp\myapp.cfg was written. Then, I changed user to User B , and ran my software again :

Programmatically getting UID and GID from username in Unix?

你离开我真会死。 提交于 2019-11-27 03:53:21
问题 I'm trying to use setuid() and setgid() to set the respective id's of a program to drop privileges down from root, but to use them I need to know the uid and gid of the user I want to change to. Is there a system call to do this? I don't want to hardcode it or parse from /etc/passwd . Also I'd like to do this programmatically rather than using: id -u USERNAME Any help would be greatly appreciated 回答1: Have a look at the getpwnam() and getgrnam() functions. 回答2: You want to use the getpw*

How to get all privileges back to the root user in MySQL?

不羁的心 提交于 2019-11-27 02:14:49
问题 I am using MySQL. My root user doesn't have all privileges. How can I get all privileges back to the root user? How to do it step by step? 回答1: This worked for me on Ubuntu: Stop MySQL server: /etc/init.d/mysql stop Start MySQL from the commandline: /usr/sbin/mysqld In another terminal enter mysql and issue: grant all privileges on *.* to 'root'@'%' with grant option; You may also want to add grant all privileges on *.* to 'root'@'localhost' with grant option; and optionally use a password as

How can I tell if my process is running as Administrator?

眉间皱痕 提交于 2019-11-27 01:31:49
I would like to display some extra UI elements when the process is being run as Administrator as opposed to when it isn't, similar to how Visual Studio 2008 displays 'Administrator' in its title bar when running as admin. How can I tell? Technically, if you want to see if the member is the local administrator account , then you can get the security identifier (SID) of the current user through the User property on the WindowsIdentity class , like so (the static GetCurrent method gets the current Windows user): WindowsIdentity windowsIdentity = WindowsIdentity.GetCurrent(); string sid =

Calling CreateProcessAsUser from C#

一个人想着一个人 提交于 2019-11-27 01:11:20
问题 I've been attempting to create a new process under the context of a specific user using the CreateProcessAsUser function of the Windows API, but seem to be running into a rather nasty security issue... Before I explain any further, here's the code I'm currently using to start the new process (a console process - PowerShell to be specific, though it shouldn't matter). private void StartProcess() { bool retValue; // Create startup info for new console process. var startupInfo = new STARTUPINFO(