w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

Running python cron script as non-root user
Cron jobs run with the permissions of the user that the cron job was setup under. I.E. Whatever is in the cron table of the reports user, will be run as the reports user. If you're having to so sudo to get the script to run when logged in as reports, then the script likely won't run as a cron job either. Can you run this script when logged in as reports without sudo? If not, then the cron job can't either. Make sense? Check your logs - are you getting permissions errors? There are a myriad of reasons why your script would need certain privs, but an easy way to fix this is to set the cron job up under root instead of reports. The longer way is to see what exactly is requiring elevated permissions and fix that. Is it file permissions? A protected command? Maybe adding reports to certai

Categories : Python

Jetty bash script works only with root user
Check the ${jetty.home}/logs/start.log (or similarly named log file) That will tell you why it failed. Also, you might want to look into the optional setuid support. http://www.eclipse.org/jetty/documentation/current/setuid.html

Categories : Linux

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

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

loggin into an iOS app using a system with ADFS
The latest version of ADFS (3.0, included in Windows server 2012 R2) has a feature called "workplace join". This can be used to join iPads etc. to active directory and get single sign on and storing a certificate on the iPad. Here is a nice overview of ADFS 2012 R2.

Categories : IOS

Loggin' try-catch transactions
There is nothing essentially different inside try..catch blocks. And your file writing code should be working the same way as outside, no difference. The only issue I can think of is irrelevant to try..catch but to exceptions in general: a thrown exception terminates further code execution. Say, if there is an error in $stmt->rollBack(); - no code below will be executed. So, it's better to move a logger at the top of the block.

Categories : PHP

Loggin page doesnt work
You are using action as start.html page for your <form>. Because of that it is redirecting to start.html rather than start.php. Change this echo '<form action="start.html" method="post">'; to echo '<form action="start.php" method="post">'; OR quote by Prisoner echo '<form action="" method="post">';

Categories : PHP

Checking membership status and loggin in
Try changing this: if(isset($_POST['Login']) && isset($_POST['uname']) && isset($_POST['pass1'])) { // Here check if all input are sent to: if(isset($_POST['uname']) && isset($_POST['pass1'])) { // Here check if all input are sent Didn't test, this is just a guess from a quick look. But it seems to be not doing anything because your input check is failing.

Categories : PHP

Auto run script in root mode
You should use sudo - your command available in root mode without password for user or group Cmnd_Alias YCMD = /usr/local/somecommand username ALL=YCMD, NOPASSWD: YCMD

Categories : Unix

How to check if running as root in a bash script
If the script really requires root access then its file permissions should reflect that. Having a root script executable by non-root users would be a red flag. I encourage you not to control access with an if check. chown root:root script.sh chmod u=rwx,go=r script.sh

Categories : Bash

Running shell script as root using apache/php
You look for tool called sudo: https://en.wikipedia.org/wiki/Sudo But most likely instead of going for sudo you should rethink your app architecture as once your httpd is compromised, attacker can easily get root rights.

Categories : PHP

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 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 a Ruby script in Sublime Text 2 from project root
Depending on your scripts you might want to look into using Package Control and the SublimeREPL Package. SublimeREPL allows you to have a Ruby Interpreter in a separate tab or window in SublimeText. Running CMD + Shift + B has never been very reliable in SublimeText for Ruby code anyways. Also, similar answer to similar question: Execute Ruby code in sublime text 2

Categories : Ruby

How to execute local script as root in remote servers?
Use SSH Keys to avoid having to enter a password view this link: https://wiki.archlinux.org/index.php/SSH_Keys

Categories : Linux

How to run tshark commands from root mode in linux using TCL script ?
You have to either elevate the privileges of your tshark process via sudo (or any other available means) or run your whole script with elevated privileges. One way to do that which might be simpler than sudo as it would require zero customizations is to write a super-simple C program which would just run /usr/bin/tshark with the necessary arguments and then make that program setuid root and distribute along with your Tcl program. That is only needed if you need portability. Otherwise sudo is much simpler.

Categories : Linux

How to reset the Registry Editor view back to root using VB script?
By deleting the "LastKey" which holds the last key viewed in the Registry Editor, the view returns to the root view. WshShell.RegDelete "HKLMSOFTWAREMicrosoftWindowsCurrentVersionAppletsRegeditLastKey"

Categories : Windows

Windows batch script to name files after containing subfolder and copy to root
Here I made this my self. I created a similar situation to yours and it worked fine for me. However you have to specify the location to copy all the files to. for /d %%a in (*) do ( cd %%a for /r %%b in (*) do ( copy %%b C: [root] \%%a%%~xb ) cd.. ) pause Hopes this helps. Yours Mona.

Categories : Windows

Access denied for user 'root'@'localhost'
Start mysql client in the console and execute this query: select Host, User from mysql.user;. You MUST have a row like this: +----------------+------------------+ | Host | User | +----------------+------------------+ | localhost | root | +----------------+------------------+ a row with "localhost" in Host and "root" in User. If you don't have it that's the cause of your problem (it doesn't matter if you have other rows with "root" in User) If you don't have such row, add a new user with this: CREATE USER 'appUser'@'localhost' IDENTIFIED BY 'appPassword'; Change 'appUser' by 'root' if you want, but I strongly suggest to use another user. Then add permissions to your new user by executing this in the mysql client: GRANT ALL PRIVILEGES O

Categories : Java

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

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

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

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#

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

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

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

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

(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

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

Unit test for only root user in python
If you're using unittest, you can skip tests or entire test cases using unittest.skipIf and unittest.skipUnless. Here, you could do: import os @unittest.skipUnless(os.getuid() == 0) # Root has an uid of 0 def test_bla_as_root(self): ... Which could be simplified in a (less readable): @unittest.skipIf(os.getuid())

Categories : Python

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

Batch Script to Delete Files with Unique Root Stem in Directory
The way i'd go about this is as follows, i will explain the logic and i'll leave you to do the coding. You will parse all the file names into variables, while increasing each time. Then you will set a limit to the number of loops to go through. Then you will search the first 13 characters of the file name and if the number of lines is equal to 1 then delete it. After you will increase the variable by 1 and go through the loop, at the end of each loop it will check if it has reached the limit aka the number of files in the directory, if it has reached the limit, end the loop, otherwise continue. hah, i finally decided to do it after a guy decided to use my idea i described into actual code, anyway this is way shorter and a lot faster than his, tested+verified to work: @echo off & setl

Categories : Batch File

WampServer - Access denied for user 'root'@'localhost'
Wamp is usually without a MySQL-password. Try replacinng C:/wampdirectory/apps/phpmyadmin-versionthing/config.inc.php, with this version: (simply remove THE WHOLE CONTENT of your current file) <?php $cfg['blowfish_secret'] = 'a8b7c6d'; $i = 0; $i++; $cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = true; $cfg['UploadDir'] = ''; $cfg['SaveDir'] = ''; ?>

Categories : PHP

Scp fails in one direction for admin but is successful with root user
This looks like a known issue .bashrc and scp (excacly output from bash and non interactive shell). I solved this problem by modifying the part of .bashrc to execute only for interactive shell case $- in *i*) # interactive shell alias cc='clearCache.sh' echo 'Alias: cc - clear cache ;; esac Links to such problems: http://www.linuxquestions.org/questions/linux-server-73/strange-scp-error-and-fail-664945/ https://bugzilla.redhat.com/show_bug.cgi?id=20527 http://serverfault.com/questions/485487/use-bashrc-without-breaking-sftp

Categories : Misc

Launch a Python GUI from a C program running with user root
The reason it works when you run it the first way is that the DISPLAY environment variable is already set before you start the C program, and it will be inherited by subprocesses. If you're launching the C program on bootup, the DISPLAY variable (probably) won't be set, so you'll need to set it before spawning the subprocess, with something like... #include <stdlib.h> setenv("DISPLAY", something, 1); // Now launch the Python script The tricky bit is what to put in for something. It needs to be whatever you get when you do echo $DISPLAY from a regular X11 session, assuming the C program runs on the same system as your X11 session. You'll either have to hardcode a value which works, or find some way to pass the correct value to the C program. Update Regarding permissions issu

Categories : Python

mysql grant remote permissions via non-root user
Well with root SSH access you can restart MySQL and tell it not to check for the root password by running (once MySQL has been stopped) 'sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &' then you could create a user and grant that user the grant_option.

Categories : Mysql

MYSQL Access denied for user 'root'@'localhost'
It was absolutely correct what you did,but I guess not working just for a small thing.You should make identified by the password when you are going to grant privileges like the following example which I did.. mysql> GRANT ALL PRIVILEGES ONE `*`.`*` TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' WITH GRANT OPTION; Try this,I hope your problem will be solved.

Categories : Mysql



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