Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
As far as i remember while installing ubuntu,the installer didn't ask me for the root password. It asked me to create an account just before preparing for the first time use.There i specified a username and a password.I use this password to log onto my ubuntu machine. I had to install something which gave the following error :
What could be the problem ? when i enter as root an mention the password,it says auth failure. How
Perhaps better suited on SuperUser...
Text taken from ubuntu-help
By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user. However, since the Root account physically exists it is still possible to run programs with root-level privileges. This is where sudo comes in - it allows authorized users (normally "Administrative" users; for further information please refer to AddUsersHowto) to run certain programs as Root without having to know the root password.
This means that in the terminal you should use sudo for commands that require root privileges
So, in your case, use sudo gem install instead
yes. This is a root problem.
What command did you try for going root?
Did you just type su <username>
Type in sudo su
Then use the username/password combo to get into root.
The gem will work then.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Recently updated to Windows 10, installed Ubuntu Bash. Wanted to start configuring, But I have hit a wall already.
When installed, you are asked for a username and password for your account.
This creates a user level.
Is it possible to access to root user, SU?
Every time I try, it asks for a password, and none of the accounts on the PC work (i.e., Windows 10 admin account password does not work). Tried default passwords too etc., all fail.
The reason for it is when looking at the users home directory: When creating a file, it creates it under my Windows User Account (Permissions).
But when I view files created from Bash, they are created for Root user.
So this is the confusion, I modified bashrc and it's no longer owned by root, So it's not accessible.
But I cannot login to root to create or modify the files.
Am I being a complete noob or something?
When bashrc is not owned by Root, when loading Bash.exe, I get .bashrc Input/output error.
as far as i know you'll have to type "sudo su"
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I want to login my server without the password, I have succeeded on the server localhost, but I failed when I try to login from my mac pro.
First, I test on my server.
Step 1: generate the Key
Step 2: cat to the authorized_keys, and Try Passwordless SSH login localhost, there is no problem.
So, I try this on my mac pro
Step 3: generate the key
Step 4: copy the public key to my sever, and cat to the authorized_keys
Step 5: try login to my sever on my mac pro, still need the password
Step 6: I google the "Passwordless SSH login", and find on the SSH said that The file named authorized_keys should have permissions 600 & ~/.ssh directory should generally have permission 700. So I do the following step
Step 7: Still need the password
Can someone help this problem? My mac is OS X 10.11, My server is CentOS 7.0 64bit
Update:
The config is the authorized_keys
You process seems fine, but for MAC you seem to be missing one key step;
sudo systemsetup -setremotelogin on
you need to configure MAC to accept remote logins through setremotelogin as above.
I've found that RHEL 7 and SELinux were the root cause, even after tweaking every variable in the /etc/ssh/sshd_config and making more keys than a locksmith. Login as root, and run this:
setsebool -P use_nfs_home_dirs 1
You still have to create a key, share it with the other host login. My issue was that we were using NFS based "home" directories, so SELinux wasn't allowing access without this explicit flag.
Let me know if your problem goes away.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
OK i googled a lot but something just doesn't add-up:
in terminal i use this code: sudo mkdir /Volumes/aNewFolder
but then the terminal asks me for my user password. why? and also - how can i pass the password so terminal wont stop and wait for user's input?
this is silly but i cant seem to fix it or to find it on the web; all i want is to mkdir without having to input my password directly...
i didnt really tried anything cause i cant seem to find any info about it.
im pretty sure that the solution is easy and im missing something. im new to unix and bash but mkdiris a very basic thing, right?
help, please?
edit: forgot to say that i thought expect could help but all i see is how to use it with ssh...
mac user
sudo = super user do.. You need to give your terminal session the password for the super user, to have "administrative" access.
Depending where you're trying to make a new directory, you don't always need to add "sudo" to your command.
If say you were trying to make a new directory in your home folder.. i.e.: mkdir ~/myNewDir
you won't need to add a sudo to it, because your home folder is owned by your user.
But let's say you were trying to make a new folder in /etc/ssh/, an area where your user does not have read/write access to, you would need to append the command with sudo, to inform the CLI that a or the, super user is going to perform the task.
Hope it helps.
If you really want to skip the password authentication every time, you could type:
sudo -su root give it root users password, and from that point on forward (and only for that terminal session) will the user root be used (see it as super user), and your commands will run without any authentication (Since root user has read/write access across the system). I wouldn't recommend doing this, if you're not sure about what you're doing.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
In my Mac program, I want to copy the file located in /private/var/db/dslocal/nodes/Default/users/xx.plist to another disc.
Presumably it will failed, and it is.
I use the api of copyItemAtPath:toPath:error: to do this,
and I NSLog out the error infomation:
it says /private/var/db/dslocal/nodes/Default/users/xx.plist this file couldn't be opened because I don't have permission to view it.
The operation couldn't be completed, Permission denied.
And can anyone could introduce me to some documentations or sample codes that I should read to solve my problem? Please!
You're trying to do something that requires the user to be an administrator (or root), which requires elevated access. The way to do go about this in OSX is to factor out the privileged code into a separate executable that is run with elevated permissions, after having prompted the user for an administrator's credentials.
Take a look at OSX Authorization services for prompting the user:
https://developer.apple.com/library/mac/#documentation/Security/Reference/authorization_ref/Reference/reference.html
And SMJobBless for creating the application with elevated rights: -
https://developer.apple.com/library/mac/#samplecode/SMJobBless/Introduction/Intro.html
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I just downloaded Cygwin for Windows 7. I want to install an OpenSSH SSH daemon, and after running "ssh-host-config", I tried starting the service by running
$net start sshd
System error 1069 has occurred.
The service did not start due to a logon failure.
I changed the password for user "sshd" to have upper/lower case letters and numbers. But I still get this error. Any help or additional troubleshooting advice is appreciated, - Dave
I had the same issue. If you had previously tried to install openssh you need to remove it first.I followed this these two links for removing openssh:
http://pigtail.net/LRP/printsrv/vista-cygwin.txt
http://www.kgx.net.nz/2010/03/cygwin-sshd-and-windows-7/
They are mostly the same although the first link is based on the second one and the second one has some extra information about installing privileges for users.
After that you can try to reinstall openssh it should work.
It could be that your password for the cyg_server user has expired. This is usually the case with Windows Server versions.
Run lusrmgr.svc and change the password for it. You can also disable the Password never expires by checking the user's properties.
You should be able to verify the password did expire by checking the windows events.
"1069 Error Code is caused in one way or another by misconfigured system files in your windows operating system."
You need to restore your OS to a previous state or download the repair tool. I have the same issue for the same reason.