I'm using vagrant for many projects.
The web-service and php-service is running with the user vagrant(uid:1000). I'm using OS X with nfs to sync my shared-folder with vagrant. At the guest-system all files get my OS X user-id as owner.
So I want to update the vagrant user to the uid 501. But if I use usermod -u 501 vagrant I get an error because the user is used by a process.
I hope that someone can help me.
Related
I'm trying to connect my Ec2 linux 2 server instance on windows using git bash. Every time I enter my code it says that my private key file is not accessible.
Since it was not working on one path I tried different path placing the key in different locations. Every time I get the same error.
$ ssh -i "path\keypair.pem" ec2-xx-xxx-xxx-xx.ap-south-1.compute.amazonaws.com
This is the error i get every time:
Warning: Identity file path\keypair.pem not accessible: No such file or directory.
user#ec2-xx-xxx-xxx-xx.ap-south-1.compute.amazonaws.com:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
This is my first time trying to work on aws linux 2. So please help me over come this issue.
Please refer to this link in order to connect to your EC2.
ssh -i /path/my-key-pair.pem ec2-user#ec2-198-51-100-1.compute-1.amazonaws.com
You are missing the user name for the ec2 instance.
For Amazon Linux 2 or the Amazon Linux AMI, the user name is
ec2-user. For a CentOS AMI, the user name is centos. For a
Debian AMI, the user name is admin or root. For a Fedora AMI, the
user name is ec2-user or fedora. For a RHEL AMI, the user name is
ec2-user or root. For a SUSE AMI, the user name is ec2-user or
root. For an Ubuntu AMI, the user name is ubuntu. Otherwise,
if ec2-user and root don't work, check with the AMI provider.
I'm new in Windows. I use Windows 10. While I run vagrant on my machine, there are some issues with UID. Please look at the picture for more information.
While I run vagrant up, I get some warning :
The VirtualBox VM was created with a user that doesn't match the
current user running Vagrant. VirtualBox requires that the same user
be used to manage the VM that as created. Please re-run Vagrant with
that user. This is not a Vagrant issue.
The UID used to create the VM was: 1000
Your UID is: 0
Looks like you are logged in as sudo, hence the UID is different. Log-out of sudo and try vagrant up as normal user.
If the above doesn't work then update the below file
vi .vagrant/machines/default/virtualbox/creator_uid
to add 0 in it
Let me know if this helps.
Find this path and change to 0.
.vagrant/machines/default/virtualbox/creator_uid
In the Windows folder. Vagrant is in the same folder as the Vagrantfile.
As default won't be available, so you may have to edit in every vm but the path is the same: vagrant/machines/(name of the vm)/virtualbox/creator_uid
Remove .vagrant dir in the current working dir and re-run vagrant up command.
Error, because of copy / backup of Vagranfile /s from one system to another system. user id's mismath to the Vagrant to bring up the environment..
hope it helps cheers..!! :))
This happened to me (on subsequent runs) when I used vagrant up with elevated privileges for the first time (administrator).
I am learning to use Vagrant, and I tried to boot a Vagrant machine (an ubuntu/trusty64 built in the recommended way "vagrant init ubuntu/trusty64; vagrant up") from inside the VirtualBox GUI (double clicking the icon of the Vagrant machine). But I cannot login: no username, no password.
Do I need to add a specific provision, or there is another easier way to do this?
Thank you.
UPDATE after clarification of question
You should be able to login as
user: vagrant
password: vagrant
This is a convention described in the base box creation documentation:
Also, even though Vagrant uses key-based authentication by default, it
is a general convention to set the password for the "vagrant" user to
"vagrant". This lets people login as that user manually if they need
to.
If you have a box where the password for the vagrant user is not set (or you just don't know it) you can do the following:
me#somebox$ vagrant ssh
vagrant#vagrant-ubuntu-trusty-64:~$ sudo passwd vagrant
Enter new UNIX password: <type invisible new password here>
Retype new UNIX password: <re-type invisible new password here>
passwd: password updated successfully
Now you can login e.g. through the VirtualBox GUI.
Original answer (basically explaining that you should not have to do the above)
The basic idea is, that you do not have to use the Virtual machine providers tools for anything to work with vagrant. So as soon as you think you have to use the VirtualBox GUI you are doing something wrong.
Just try in terminal (or in cmd.exe if you are on windows):
me#somebox$ vagrant init ubuntu/trusty64
me#somebox$ vagrant up
me#somebox$ vagrant ssh
vagrant#vagrant-ubuntu-trusty-64:~$
If everything works you should be on the command line inside your new machine logged in as the user vagrant.
I am working on Ubuntu 12.04 .Recently I downloaded Hadoop 2.0.3 and made a user named Hduser which I added and give privileged rights. Now I want to delete the user.
I used
sudo deluser hduser
But it's giving me the following error:
Warning: group hadoop' has no more members. userdel: user hduser is
currently logged in /usr/sbin/deluser:/usr/sbin/userdel hduser'
returned error code 8. Exiting
Try logging in as root or any other user before executing the above. And make sure HDFS is down.
i had these errors too on Ubuntu 12.04 but I tried it on WEBMIN and successfully deleted the user.
I have previously setup a EC2 instance on Ubuntu 10.04 and setup the necessary binaries to allow ssh and more importantly FreeNX(no machine) to work on my MacOS-10.6 machine.
As this was done on a micro instance, i was keen to try it on small instance today so i created a AMI image from the aws management console(browser) and launch a new small instance using the image with the exact same keypair and security setting.
Expecting the instance to work exactly the same(except much faster) i tried to connect to it using SSH and FreeNX again.
Result:
SSH is working fine and my env look exactly the same.
NX is unable to connect.
it complain username/password is incorrect.
I wonder why this is happen since i did an exact clone of the EC2 instance and i can connect fine using NX with the previous instance?
I had the same issue, and after a lot of searching fixed it. It seems freenx lost the usernames and passwords. I fixed it by doing the following:
log in with putty as ubuntu user then
cd /etc/nxserver
sudo vim node.conf
set ENABLE_PASSDB_AUTHENTICATION="1" and save the file
then
sudo nxserver --adduser xxxxxx
sudo nxserver --passwd yyyyyy
sudo nxserver --restart
after that I was able to log in using nomachine with the username and password I just set.