mysql Access denied for user 'root'@'localhost' (using password: NO) |
I've solved this error. I'm posting this because someone could have
encounter the same thing as me.
The problem lies with the data source. Apparently something happen during
the creation of data source. The password parameter is missing. So I
deleted the current data source and created a new one again and the problem
is solved.
|
How to allow a normal user to kill a certain root application in visudo with no password |
sudo will not interpret the command as a shell script to execute.
Therefore you have said that this literal command can be run as
normal_user:
/usr/bin/kill $(ps aux | grep 'target_application' | awk '{print $2}')
However since the shell will interpret the stuff in the $(...) before sudo
is called on it, the command you are running looks more like this:
sudo /usr/bin/kill 1234
So it doesn't let you use it.
As fedorqui suggested, you should write a script that kills the user and
then give normal_user the right to run that script (make sure they don't
have write access to the script or its directory though).
kill_target_application.sh:
#!/bin/sh
/usr/bin/kill $(ps aux | grep 'target_application' | awk '{print $2}')
Use this command to allow users to execute or read the script, bu
|
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;
|
mysqldbcopy - Error 1045: Access denied for user 'root'@'localhost' (using password: NO) |
By looking at the link you provided, I can conclude this -
You are using -
mysqldbcopy
--source
"root:&1qqq34rtyy@localhost:3310:/var/run/mysqld/mysqld.sock"
--destination
"root:&1qqq34rtyy@localhost:3310:/var/run/mysqld/mysqld.sock"
old:new
But the link shows,
mysqldbcopy
--source=root:pass@localhost:3310:/test123/mysql.sock
--destination=root:pass@localhost:3310:/test123/mysql.sock
util_test:util_test_copy
Conclusions,
After --source and --destination, the example in the link you provided have
'='.
Try with single quotes if double quotes doesn't help.
Verify if the port 3310 is correct. Default I guess when you install is
3306. Can you confirm?
|
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
|
How to make apache2 user to access the file in /root directory? |
First, it is generally a bad idea to give apache access to root. If you
insist ...
Install ACL (Access Control List) Installing ACL
Then, assuming your apache server runs with 'apache2' for it's user and
group, give the apache2 user and group access to directories/files:
setfacl -m "group:apache2:r-x" /root/whatever.file
setfacl -m "user:apache2:r-x" /root/whatever.file
# *** only need the next two lines if you plan on writing new files in the
specified directory. It sets the default file permissions that will be
used when the new file is created.
setfacl -d -m "group:apache2:r-x" /root
setfacl -d -m "user:apache2:r-x" /root
Change the r-x permissions to whatever you need
Edit - potential solution without ACL
The following is untested and may require tweaking but should get you
|
How to make django to save user password in plain-text? |
I give up to use in plaintext... and I use MD5 password hasher.. but in
Django, the default MD5 password hasher use a SALT to make the hash, and in
delphi we can't use them.. the solution is use this:
PASSWORD_HASHERS = (
'django.contrib.auth.hashers.UnsaltedMD5PasswordHasher',
)
Use in setting.py, and recreate all users. After that, all passwords is
stored in MD5 pure, and we can read in Delphi or other software.
|
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.
|
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.
|
Security for DataBase password and user login password in Spring and Java Encoder How to? |
To encrypt properties, consider using jasypt, it integrates with Spring and
Spring Security. For example you can define encrypted properties:
datasource.password=ENC(G6N718UuyPE5bHyWKyuLQSm02auQPUtm)
Then create a EncryptablePropertyPlaceholderConfigurer bean, which allows
you refer to the properties as you normally would - they are decrypted for
you:
...
<property name="password" value="${datasource.password}"/>
...
It's not exactly as described by your sample, but it may be a good starting
point.
|
Sending password link to email when user forget password |
Use this code if you want to send an email:
$to = 'recepient@somemail.com';
$subject = 'Subject here';
$message = "Content";
$message .= "more Content";
$message .= "even more Content or a variable".$variable;
$headers = 'From: sender@yourdomain.com' . "
" .
'Reply-To: sender@yourdomain.com' . "
" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
Be aware that there are security issues like header injection if you don't
validate the user input. A good email validation is this:
$to = $_POST["email"];
if (filter_var($email, FILTER_VALIDATE_EMAIL)) { /*mail is ok*/ }
else {/*mail is NOT ok*/}
|
How to change mysql root password |
Try adding sudo in front of the kill and cat commands. Like this:
sudo kill `sudo cat /usr/local/mysql/data/FitValet-MacBook-Pro.local.pid`
It will then ask you for the root password for your Mac (not mysql). Enter
it, and the command should execute without giving you a permission denied
error.
|
Forgotten MySQL root password |
This time around, the newer version of mysql let me log in with no
password. I was able to get it fixed from the command line and get it
reset to what I wanted. Tried that multiple times before, so I cannot say
I understand what changed now, but it did.
|
'root'@'localhost' access denied, no password used |
Default password is '' (empty) apparently.
To see what your password might be set to try this: go to wamp installation
pathapps, for example C:wampappsphpmyadmin2.10.1
In this path you can find the file named config.inc.php.
Open that file with any text editor and search for:
$cfg['Servers'][$i]['password']
the password should be stored here.
|
Changed root password for phpMyAdmin, now I can't access anything MAMP |
If you have root access (by way of SSH or by way of the console) to the
machine that MySQL is running on, then you can change or reset the MySQL
root password by following the procedure at:
http://dev.mysql.com/doc/refman/5.6/en/resetting-permissions.html.
|
phpMyAdmin Error #1043 Cannot log in to MySQL with root password (OS X 10.8.3) |
That is because you need to use the following syntax:
mysqladmin -uroot -p***** (command here)
I had a similar problem and I solved it by setting a blank password for
root and adding this to my config.inc:
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
Then, when I successfully logged in, I changed my root password within the
web based GUI.
Hope this helps.
|
Chef: mysql cookbook does not know root's password after I change it using mysqladmin |
You need to update the node's attribute to reflect the new password.
One way to do that would be to use Knife and the knife-set-attribute
plugin.
knife set_attribute node mysql.server_root_password yournewpassword
Other ways to set attributes can be explored in the Chef attribute docs.
|
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)
|
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
|
Does setting a password on the postgres user mean that a password is required even when setting pg_hba.conf to trust? |
Change your pg_hba.conf to:
local all postgres trust
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
This will allow you to connect without password.
Remember to restart (or reload) postgresql after you edit pg_hba.conf.
In alternative, you can try to change your php code like this:
pg_connect('dbname=dev user=postgres');
This should work even without any change to pg_hba.conf.
Explanation:
You can connect to postgres via unix socket (suggested, faster) or via
TCP/IP. The first and second line in pg_hba.conf are relative to socket,
the third to ipv4 and the fourth to ipv6. If
|
innobackupex restoring changes root and debian-sys-maint password. mysql restart failed |
I believe you are using this tool from Percona.
Then the only helpful option I can find is --databases. I will assume you
do not want to maintain a list of databases in your script, you can build
the list dynamically with a command like this:
shell > mysql [options] -NBe
"SELECT schema_name FROM information_schema.schemata WHERE
schema_name NOT IN ('mysql', 'information_schema')"
You should be able to integrate this call in something like this:
shell > innobackupex
--databases=`mysql [options] -NBe
"SELECT schema_name FROM information_schema.schemata WHERE
schema_name NOT IN ('mysql', 'information_schema')"`
(some extra double quotes may be required, sorry, I do not have access to
the tool at this time)
|
How to assign to workers a proxy that requires user name - password and a custom user agent? |
Assign User Agent by Desired Capabilities
dcap = dict(DesiredCapabilities.PHANTOMJS)
dcap["phantomjs.page.settings.userAgent"] = (
"Your User Agent String here . . .")
Found API Reference here for the proxy authorization.
Add "--proxy-auth=username:password" to server_args. Like . . .
service_args = [
'--proxy=xxx.xxx.xx.xxx:xxxx',
'--proxy-auth=username:password',
'--proxy-type=http',
]
Then use both when starting the webdriver
driver =
webdriver.PhantomJS(desired_capabilities=dcap,service_args=service_args)
This took care of all my issues.
EDIT: Unable to reproduce solution. Only proxy is changed with above
method.
EDIT.02: Issue resolved. It was never a coding issue. A new proxy
provider at the server level assigned a default UA that ov
|
PayPal iOS sdk allow user to pay with old credentials even if user changes the password/pin using sandbox |
moka, I think that the scenario you describe is okay as is.
Within your app, the user logs in to her PayPal account, pays you, and
chooses to not log out from PayPal.
Later, within your app she remains logged in to her PayPal account, even
though elsewhere she has changed her password. And therefore she can still
pay you from this account.
That all seems fine to me.
Regarding your second question:
When you call [PayPalPaymentViewController
initWithClientId:receiverEmail:payerId:payment:delegate:], the SDK uses the
payerId to determine whether this is a new user or a returning user.
So if you change the payerId each time you call the SDK, then each time
this will be interpreted as a new user, who will therefore require a fresh
PayPal login. (For example, you could set payerId to somet
|
The session has been invalidated because the user has changed the password -> no Password was changed |
Actually there's nothing wrong in your flow. It actually throws that error
when the token is expired.
We've experience this kind of error before and what we did was we regularly
check that the accessToken is still valid if it is not then we generate and
save a new one. However, when we set the accessToken that will be used we
also extend the life of the token prior to saving it in the local database.
See extendedAccessToken
Here's a sample update (This is just a rough code):
// Set the access token and extend it
$facebookClient = new FacebookClient();
$facebookClient->setAccessToken($accessToken);
$facebookClient->setExtendedAccessToken();
// Query your user that will have the updated access token and update it.
$user = User::get($userId);
$user->accessToken = $facebookClient
|
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.
|
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.
|
How to make root json on rails? |
Its a configuration thing. By default the root is not included in json. You
can enable it via:
ActiveRecord::Base.include_root_in_json = true
If you want it application wide add it to a new initializer that will run
the code when the app is started. Its documented here:
http://apidock.com/rails/ActiveRecord/Serialization/to_json
|
How to make python tkinter root close itself only? |
Not clear if you mean multiple Tk instances or multiple Toplevel windows,
but if you need to control what happens when a user clicks the close button
on either of them, you can use register a protocol handler:
widget.protocol("WM_DELETE_WINDOW", handler)
After this call, the close button will call the function handler instead of
closing the window. The default behaviour is similar to:
widget.protocol("WM_DELETE_WINDOW", widget.destroy)
(yes, this is a bit obscure, but any Tkinter book should explain this)
|
(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.
|
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
|
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
|
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.
|
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())
|
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.
|
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
|
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
|
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.
|
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?
|
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
|
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).
|