w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Fabric sudo as another user with root privileges
1: You said MyAppUser wasn't in sudoers. So it can't run sudo. Use the debug flag to see this, but you're essentially doing this: $ ssh MyAppUser@myapp.mycompany.com "sudo -u me 'sudo cp ...'" So if MyAppUser can't sudo at all, then fabric connecting as this use can not sudo. 2: If you have multiple users able to connect to this machine, use the settings() context manager or the execute() function and supply me (see prompted user) as the user to connect with in the host string. eg: execute(setup_task, host="me@myapp.mycompany.com") Where setup_task is the task doing the copy into the init dir.

Categories : Bash

mysql reset root user privileges
I have had issues with GRANT ... TO 'user'@'%' ... before. Try to additionally issue the following GRANT statement: GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; For me, this did the trick. Somehow mysql seems picky when it comes to localhost

Categories : Mysql

Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges?
Use the instructions for resetting the root password - but instead of resetting the root password, we'll going to forcefully INSERT a record into the mysql.user table In the init file, use this instead INSERT INTO mysql.user (Host, User, Password) VALUES ('%', 'root', password('YOURPASSWORD')); GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;

Categories : Mysql

Linux skip /root/.gvfs when executing df command with non-root user
I got the solution for my own question :) In df command you can pass the file system types which you would like to exclude, in this case it is 'fuse.gvfs-fuse-daemon'. So when I execute the below the command I no more get this message "df: `/root/.gvfs': Permission denied" df -x fuse.gvfs-fuse-daemon For more details one can look into df --help option.

Categories : Linux

Is sudo-ing tomcat's startup with a non-root user the same as running it as root?
Do be aware that the recommended solution to run tomcat on port 80 is to use mod-jk with the Apache web server, not to have tomcat listen on port 80 directly.

Categories : Unix

How to use root privileges in my app
This is what I have found you must specify android.permission.FACTORY_TEST permission. docs here For accessing root permission you can use p = Runtime.getRuntime().exec("su"); Source : Here

Categories : Android

How to gain root privileges for iOS app?
What step 4 is telling you: Open the original executable file and delete its contents (the contents are now stored in the previously copied and renamed binary). is simply that you have moved the executable file for your app to a new filename, and you should replace it with a script with the name of the original executable. Example If you build an app named HelloWorld, Xcode will create a HelloWorld.app directory, with a file named HelloWorld inside it, which is executable. The answer you link to suggests basically renaming the executable to something like MobileHelloWorld. Once you've done that, create a new file in the HelloWorld.app directory called HelloWorld, and edit it with a text editor to give it this content: #!/bin/bash dir=$(dirname "$0") exec "${dir}"/MobileHello

Categories : IOS

Granting privileges to root won't let me login?
Looks like you may need to get a bit clever. If you can download a zip of the version of mysql you have installed and unzip it somewhere not in you actual installed mysql location. You can then rename the existing /data/mysql folder and copy the vanilla /data/mysql directory over your now messed up one. This should reset you to its initial state. You will of course have to re-create all the other mysql accounts ( if you created any ). And this time I would create a new account for your remote access, and if necessary give that all privilages.

Categories : Mysql

mysql root@localhost has no privileges
Well, it seems that this is your problem (emphasis mine): CONSOLE: [SEVERE] Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) Apparently you didn't specify a password in the connection details.

Categories : Mysql

php exec fails even though _www has root privileges
The open command (as well as any other way of opening TextEdit) only work in the context of a GUI session; the web server is not part of your session, so it has no way to open something within your session. There are ways to solve this, but they're really really ugly. They involve switching from the _www user to root (probably with sudo), attaching to the context of some process running in the GUI session (launchctl bsexec somePID somecommand), then maybe also having to switch to the session owner (sudo -u loggedinuser), then running the open command. This is ugly because what you're trying to do is really unnatural. Having something in a web server trigger a GUI edit session really just doesn't make any sense. Please rethink what you're trying to do and why.

Categories : PHP

No "Privileges" in PHPMyAdmin, already tried deleting cookies/using FF/loggin in as 'root'
It's normal that phpMyAdmin does not show you the Privileges (or Users in recent versions) tab, since you're not privileged. Usually, on shared servers, hosting providers also use a shared MySQL server, thus they won't allow you root access. They usually also allow MySQL access only from their web server and not from your home machine, as an additional security measure.

Categories : Mysql

Configuration for Java binding for ZeroMQ (0MQ) with no root privileges on Linux
This can be overcome by adding --with-zeromq=/home/user/zeromq (installation directory of zeromq) ./configure --with-zeromq=/home/user/zeromq Other steps include export LD_LIBRARY_PATH=/home/user/zeromq/lib

Categories : Misc

Unlimited users Wifi AP android mode (no ROOT privileges)
The Android limit is hardcoded at a system level, and probably at a protocol level too. Modifying it will at the very least require root privileges, and maybe even a direct rewrite of the Android code at the system level.

Categories : Java

Root immediate child nodes icons not visible when hiding root
JTree#setShowsRootHandles(boolean newValue) controls the state of the handles for root elements. Normally, this is false. Try changing to true

Categories : Java

Read and Write root folder wihout root
You can use run-as on some devices to execute commands as a particular package. Google have fixed this on Jelly Bean so it no longer works: adb shell run-as app.package.name cp /data/data/package.name/file.txt /sdcard/ exit adb pull /sdcard/file.txt ~/ Here is a good article explaining file access in Android without root permissions, including a one-liner for the above script. It details how to use the new backup command: backup -f ~/data.ab -noapk app.package.name And how to extract the contents of the resulting .ab file: dd if=data.ab bs=1 skip=24 | openssl zlib -d | tar -xvf - You will most likely need the android.permission.BACKUP permission.

Categories : Android

Reset MAMP Pro username and password to root/root
Assuming you still know the password, you can change the password back to root using /Applications/MAMP/Library/bin/mysqladmin -u root -p password root It'll prompt you to enter a password again, after which it'll be reset to root

Categories : Mysql

Any Advantage to Giving All Collections a Separate Root Node in XML Documents?
I can see no reason to have the extra hierarchy, if there is only one per parent node and they have no attributes or special data of their own. I would just have subcategory directly under category and article directly under subcategory. I personally like to keep things clean and simple :) EDIT: I agree with @JimGarrison, if you had other data at that level, which from your example you don't seem to have, then grouping them under one node would have had an advantage.

Categories : Xml

SVN (svnserve) virtual root --root= not recognized
svn+ssh handles the whole transaction including writing and reading the files so it ignores the --root parameter in svnserve. Here is how to fix it over at serverfault -- Basically you just make svnserve into a script that calls svnserve with the proper variables.

Categories : Svn

Apache giving 403 error when accessing root; viewing .html files is working
You may be lacking a .htaccess file in the root directory. If this is the case, you will need to create one with, at a minimum, the content: DirectoryIndex index.html This will allow "/" to map to the correct location.

Categories : Apache

Document root element "hibernate-configuration", must match DOCTYPE root "hibernate-mapping"
DOCTYPE for <hibernate-configuration> should be: <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

Categories : Hibernate

what 's difference between android system user and linux root user
As far as Linux is concerned, the system user is just a regular user (UID 1000). Android services however give it special permissions and you can get access to pretty much anything. Most services have code like this somewhere: private static final void enforceSystemOrRoot(String message) { final int uid = Binder.getCallingUid(); if (uid != Process.SYSTEM_UID && uid != 0) { throw new SecurityException(message); } } What that does is deny access to anyone who is not root or system. The shell user (UID 2000) (what you get when doing adb shell) is another user with a lot of power (member of many groups). Cf. system: $ su 1000 $ id uid=1000(system) gid=1000(system) groups=1003(graphics),1004(input),1007(log),1009(mount), 1011(adb),1015(sdcard_rw),1028(sdc

Categories : Android

is there any method to draw a tree with a root , the root's previous nodes and successor nodes?
Couple of ideas you might find useful: You can use the tree layout to place the nodes in the canvas, create link objects pointing back and forth, then bind the link objects to a diagonal. http://www.durablejs.org/examples/flowchart/1/admin.html You can also use place the nodes using a pack layout, create the link objects pointing back and forth, and bind the links to a Bezier curve. http://www.durablejs.org/examples/statechart/1/admin.html You can find the code for the graphs above: https://github.com/jruizgit/durable/tree/master/lib/durabjevisual.js

Categories : D3 Js

How to know if user is root or fakeroot?
It looks as if your binary (busybox) is compiled against a static libc. fakeroot uses dynamic library preloading to intercept and replace calls to various libc functions, but this only works if your binary is dynamically linked to libc. If it is statically linked, the function calls are bound to the real calls inside the binary, so there is no way to intercept them.

Categories : C

How to run node.js as non-root user?
Option 1 requires you launch the node server as root. Not ideal. Option 2 adds overhead to every handled request and adds another failure point to your stack. Option 3 Is the simplest and most efficient method. To implement Option 3, add the following to your system init scripts. (/etc/rc.d/rc.local on RedHat based systems like AWS). iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000 That will redirect requests from port 80 to port 3000.

Categories : Node Js

How to set Group Policy "Turn Off Automatic Root Certificates Update" vie Registry/Powershell?
Domain policies override local settings. That's how they're supposed to work (they'd be rather useless otherwise). If you want the policy disabled, disable or remove the policy in Group Policy Management or remove the computer from the domain.

Categories : Powershell

How can I remove the root node and make the first child the new root node with XSLT?
Add a rule to the identity transform that adds nothing to the result tree for your document element other than the processing of its children: <?xml version="1.0" encoding="US-ASCII"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/*"> <xsl:apply-templates select="*[1]"/> </xsl:template> <xsl:template match="@*|node()"><!--identity for all other nodes--> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> (edited to be agnostic to the name of the document element) (edited again to only preserve the first child element of the document element)

Categories : Xml

Including from child theme root or else include from parent theme root
To answer your question directly based on your sample, i would not check to see if the file has been placed in the child theme. If a child-theme developer has customized the file, they can simply declare the function and include their own file (wherever they place it). There is no risk of code duplication because your sample function is simple enough. Even if you simplified your code for the purposes of placing it here....you can always keep includes wrapped in a very simple function that can be declared by a child theme. This will keep PHP running efficient and not having to check for files all the time.

Categories : Wordpress

Treeview: custom order after adding new root nodes
I think you are using the wrong method to add nodes. For the initial creation you can just use treeView1.Nodes.Add(node). When you actually want to insert a node at a given index, work out where you want it and then use Insert at the appropriate index. The reason your nodes are swapping places is because in the example above the insert is meaningless. Inserting a node in position 2 in a list with no nodes will add it at position 0 instead. EDIT: Adding code sample. TreeNode node1 = new TreeNode("Node 1"); view.Nodes.Add(new TreeNode("Node 0")); view.Nodes.Add(new TreeNode("Node 2")); view.Nodes.Add(new TreeNode("Node 4")); // Point 1 view.Nodes.Insert(1, node1); // Point 2 view.Nodes.Insert(3, new TreeNode("Node

Categories : C#

Adding Mulitiple Lines on a TGraphError Graph (Root)
I assume you mean that you want to draw a straight line on the graph, for reference rather than to add information. This can be achieved using TLine like so: TLine line(x_0, y_0, x_1, y_1); line.Draw(); which draws a line between points (x_0, y_0) and (x_1, y_1). The units are the units of the axis (e.g. in GeV). The attributes of the line can be changed, too (see documentation).

Categories : C++

Iteratively adding a new node to a binary tree, root getting overwritten
Maybe the point is that you don't store your root node before doing the traversing/inserting inside the tree. Hence root is an arbitrary node after calling the function. Maybe you should store the root before first function call to always have the entry point to start again.

Categories : C++

sudo: different path variables for root and user
Try the following command in your user account: env | grep ^PATH= Now, compare this to the output from the same command run as root: sudo env | grep ^PATH= Are the paths the same?

Categories : Linux

Why do I get "Access denied for user 'root'@'localhost'"?
Basic trouble-shooting 101: If the literal strings work, and variable assignments don't, then suspect your variable assignments; Something could be wrong with one of them, such as an invisible character. Try: vars = ('localhost','root','admin','one') Mysql.new(*vars) Then try: vars = %w(localhost root admin one) Mysql.new(*vars) or: host, username, password, db = %w(localhost root admin one) Mysql.new(host, username, password, db) or: host, username, password, db = 'localhost','root','admin','one' Mysql.new(host, username, password, db) The idea is to start with what you know works, and work backwards until assigning to variables works, or it breaks. At that point you've either fixed the problem (possibly without knowing why), or you've learned what broke it. Either way you'r

Categories : Mysql

Devise custom user root is not working
My problem was that I was redirecting in the after_sign_in_path(resource) method instead of just returning the path: def after_sign_in_path_for(resource) return user_path(:user_id=>current_user.id) end is the correct way to do this.

Categories : Ruby On Rails

Creating another user account having power of root
Each Unix system should have one, and one only, root user. Unix systems are built on that rule. If you want to promote a user for any reason, the user should use the sudo command. $ sudo <command> <options> Or allow temporary super-user by loging in as the root (use with extreme caution) $ su One should manually edit the sudo configuration to specify which user can do what: $ sudo visudo Then you can add users one by one or add a group of users. Another way, would be to add users one by one to the sudo group. $ sudo adduser <username> sudo You said you updated the sudoers list. Then your user should be able to run sudo. If not, your configuration might be wrong. Remember to always log out and in after you modify the current user's sudoers' privileges. Or yo

Categories : Linux

Get user root directory from windows service
I found this under Win7 registry. XP looks to have the same registry keys, but the values have "All Users" profile within it. [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerShell Folders] "Common Desktop"="C:\Users\Public\Desktop" "Common Start Menu"="C:\ProgramData\Microsoft\Windows\Start Menu" "CommonVideo"="C:\Users\Public\Videos" "CommonPictures"="C:\Users\Public\Pictures" "Common Programs"="C:\ProgramData\Microsoft\Windows\Start Menu\Programs" "CommonMusic"="C:\Users\Public\Music" "Common Administrative Tools"="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools" "Common Startup"="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" "Common Documents"="C:\Users\Public\Documents" "OEM Links"="C:\ProgramData\OEM Links" "Common Template

Categories : C#

(Rails) Test if user tries to get root directories
Try this: def path_valid?(path, base = Rails.public_path) expanded_path_name = Pathname.new(path).realpath.to_s expanded_path_name.starts_with? base end Pathname#realpath will resolve a path to an absolute path, as well as do symlink resolution. This will let you test precisely where the path of the file to be operated on is, and ensure that it is inside a given path.

Categories : Ruby On Rails

User able to modify file owned by root. Why?
You don't change a file when renaming it or moving it in the same filesystem, because a file is really an inode (which may have zero, one or more filenames in directories). Renaming a file is an operation inside the relevant directories (not on the file itself). Perhaps removing write access to the directory might help (but if the user owns the directory, he could change again these permissions on the directory with chmod). Read also more about sticky bit on directories. BTW, the user could also hard link that same file, i.e. add a new filename to it. Then each filename is refering to the same file.

Categories : Linux

How to run AT commands in Android terminal as root user?
You can use the program atinout which will allow you to easily send AT commands from the commands line. Example to hang up a call: $ echo ATH | atinout - /dev/ttyACM0 - ATH OK $ You need to find the name of the serial device for android (on desktop linux it is typically /dev/ttyACM0 but Android use something different as far as I remember).

Categories : Android

Running/Debugging an app on Xcode as root user
I think running things as root is typically not advised, and I think that you wouldn't be able to get special write access on an actual device, but you could try logging in as root on your mac and launching Xcode from there. I have not tried it, but it may enable the "Run as root" option

Categories : IOS

Numpy segfault on large SVD as user but not as root
Looks like the comment is the answer, hence re-posting it as such: I would check if you are using the same python and libraries with the two accounts. Maybe the PATH, PYTHONPATH, LD_LIBRARY_PATH env vars are different and you are using a different version with the root account.

Categories : Python



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.