SSH configuration: chown username:group: says invalid user
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
My Ubuntu16.04.4 server has username: graycodes
THE ERROR OUTPUT:
chown: invalid user: 'vagrant:vagrant'
I'm setting file permissions for OpenSSH.
What I'd like is to keep my username as graycodes and define the permisions using this username in place of the username vagrant.
chown -R vagrant:vagrant .ssh
I understand it reads as:
chown -R username:group file name
I've also tried firstly:
chown -R graycodes:vagrant .ssh
but it's not working. Do I have no choice but to make my server username as vagrant?
I believe this may work to add 'graycodes' to the group 'vagrant'.
$ groups
$ sudo usermod -a -G vagrant $USER
$ exec su -l $USER
$ groups
ubuntu ssh users chown vagrant
add a comment |Â
up vote
0
down vote
favorite
My Ubuntu16.04.4 server has username: graycodes
THE ERROR OUTPUT:
chown: invalid user: 'vagrant:vagrant'
I'm setting file permissions for OpenSSH.
What I'd like is to keep my username as graycodes and define the permisions using this username in place of the username vagrant.
chown -R vagrant:vagrant .ssh
I understand it reads as:
chown -R username:group file name
I've also tried firstly:
chown -R graycodes:vagrant .ssh
but it's not working. Do I have no choice but to make my server username as vagrant?
I believe this may work to add 'graycodes' to the group 'vagrant'.
$ groups
$ sudo usermod -a -G vagrant $USER
$ exec su -l $USER
$ groups
ubuntu ssh users chown vagrant
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
My Ubuntu16.04.4 server has username: graycodes
THE ERROR OUTPUT:
chown: invalid user: 'vagrant:vagrant'
I'm setting file permissions for OpenSSH.
What I'd like is to keep my username as graycodes and define the permisions using this username in place of the username vagrant.
chown -R vagrant:vagrant .ssh
I understand it reads as:
chown -R username:group file name
I've also tried firstly:
chown -R graycodes:vagrant .ssh
but it's not working. Do I have no choice but to make my server username as vagrant?
I believe this may work to add 'graycodes' to the group 'vagrant'.
$ groups
$ sudo usermod -a -G vagrant $USER
$ exec su -l $USER
$ groups
ubuntu ssh users chown vagrant
My Ubuntu16.04.4 server has username: graycodes
THE ERROR OUTPUT:
chown: invalid user: 'vagrant:vagrant'
I'm setting file permissions for OpenSSH.
What I'd like is to keep my username as graycodes and define the permisions using this username in place of the username vagrant.
chown -R vagrant:vagrant .ssh
I understand it reads as:
chown -R username:group file name
I've also tried firstly:
chown -R graycodes:vagrant .ssh
but it's not working. Do I have no choice but to make my server username as vagrant?
I believe this may work to add 'graycodes' to the group 'vagrant'.
$ groups
$ sudo usermod -a -G vagrant $USER
$ exec su -l $USER
$ groups
ubuntu ssh users chown vagrant
ubuntu ssh users chown vagrant
edited Sep 19 at 18:12
asked Sep 19 at 17:53
Gray
175
175
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
There are a few things to take into consideration and I hope I'll cover some holes in your question.
First, when you use chown
, the user and group you're trying to assign the entities to should exist. If it doesn't, then you'll get an error. So make sure it does exist first.
Second, to use chown
, you need some elevated powers. You can't just move ownership of files, etc, to another user as a regular user yourself. Make sure you know what this means and that that's what you want.
Third, make sure you understand what you're trying to do. chown
changes the ownership of a filesystem entity or entities to the user and group you tell it.
Then I believe I would need to add my user 'graycodes' to the group 'vagrant' which would give it permission in Vagrant. I figure the relevant commands could look like I've show in my edited question.
â Gray
Sep 19 at 18:09
2
@Gray It's still not clear to me what in fact you are trying to achieve.
â Tomasz
Sep 19 at 18:10
okay. I'm actually following the sitepoint base-box tutorial. I'm packaging a base box which I'll later provision an a LAMP server and then add wordpress to that. Here's the link to the sitepoint tutorial: sitepoint.com/create-share-vagrant-base-box (under subheading 'SSH configuration'..."Open SSH is very strict about this folder and file permission. So let's change it to the correct one.")
â Gray
Sep 19 at 18:16
@Gray That tutorial goes pretty much against my intuition and experience with Vagrant. My experience is distant, but I thought Vagrant is for fast and easy creation of virtual machines, while the tutorial makes this manual. Why use Vagrant then? Quite likely I'm not in the story. So abstracting from this, there's no step included in the tutorial where you'd install Vagrant itself. This plus the "invalid user" error makes me think you still miss the actualvagrant
on your system. Am I wrong?
â Tomasz
Sep 19 at 18:29
shift, I dnk what I'm doing. But I know how to do it one way. The way the tutorial says I should. But that means my username on the server HAS TO BE 'vagrant'.
â Gray
Sep 19 at 18:34
 |Â
show 2 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
There are a few things to take into consideration and I hope I'll cover some holes in your question.
First, when you use chown
, the user and group you're trying to assign the entities to should exist. If it doesn't, then you'll get an error. So make sure it does exist first.
Second, to use chown
, you need some elevated powers. You can't just move ownership of files, etc, to another user as a regular user yourself. Make sure you know what this means and that that's what you want.
Third, make sure you understand what you're trying to do. chown
changes the ownership of a filesystem entity or entities to the user and group you tell it.
Then I believe I would need to add my user 'graycodes' to the group 'vagrant' which would give it permission in Vagrant. I figure the relevant commands could look like I've show in my edited question.
â Gray
Sep 19 at 18:09
2
@Gray It's still not clear to me what in fact you are trying to achieve.
â Tomasz
Sep 19 at 18:10
okay. I'm actually following the sitepoint base-box tutorial. I'm packaging a base box which I'll later provision an a LAMP server and then add wordpress to that. Here's the link to the sitepoint tutorial: sitepoint.com/create-share-vagrant-base-box (under subheading 'SSH configuration'..."Open SSH is very strict about this folder and file permission. So let's change it to the correct one.")
â Gray
Sep 19 at 18:16
@Gray That tutorial goes pretty much against my intuition and experience with Vagrant. My experience is distant, but I thought Vagrant is for fast and easy creation of virtual machines, while the tutorial makes this manual. Why use Vagrant then? Quite likely I'm not in the story. So abstracting from this, there's no step included in the tutorial where you'd install Vagrant itself. This plus the "invalid user" error makes me think you still miss the actualvagrant
on your system. Am I wrong?
â Tomasz
Sep 19 at 18:29
shift, I dnk what I'm doing. But I know how to do it one way. The way the tutorial says I should. But that means my username on the server HAS TO BE 'vagrant'.
â Gray
Sep 19 at 18:34
 |Â
show 2 more comments
up vote
1
down vote
accepted
There are a few things to take into consideration and I hope I'll cover some holes in your question.
First, when you use chown
, the user and group you're trying to assign the entities to should exist. If it doesn't, then you'll get an error. So make sure it does exist first.
Second, to use chown
, you need some elevated powers. You can't just move ownership of files, etc, to another user as a regular user yourself. Make sure you know what this means and that that's what you want.
Third, make sure you understand what you're trying to do. chown
changes the ownership of a filesystem entity or entities to the user and group you tell it.
Then I believe I would need to add my user 'graycodes' to the group 'vagrant' which would give it permission in Vagrant. I figure the relevant commands could look like I've show in my edited question.
â Gray
Sep 19 at 18:09
2
@Gray It's still not clear to me what in fact you are trying to achieve.
â Tomasz
Sep 19 at 18:10
okay. I'm actually following the sitepoint base-box tutorial. I'm packaging a base box which I'll later provision an a LAMP server and then add wordpress to that. Here's the link to the sitepoint tutorial: sitepoint.com/create-share-vagrant-base-box (under subheading 'SSH configuration'..."Open SSH is very strict about this folder and file permission. So let's change it to the correct one.")
â Gray
Sep 19 at 18:16
@Gray That tutorial goes pretty much against my intuition and experience with Vagrant. My experience is distant, but I thought Vagrant is for fast and easy creation of virtual machines, while the tutorial makes this manual. Why use Vagrant then? Quite likely I'm not in the story. So abstracting from this, there's no step included in the tutorial where you'd install Vagrant itself. This plus the "invalid user" error makes me think you still miss the actualvagrant
on your system. Am I wrong?
â Tomasz
Sep 19 at 18:29
shift, I dnk what I'm doing. But I know how to do it one way. The way the tutorial says I should. But that means my username on the server HAS TO BE 'vagrant'.
â Gray
Sep 19 at 18:34
 |Â
show 2 more comments
up vote
1
down vote
accepted
up vote
1
down vote
accepted
There are a few things to take into consideration and I hope I'll cover some holes in your question.
First, when you use chown
, the user and group you're trying to assign the entities to should exist. If it doesn't, then you'll get an error. So make sure it does exist first.
Second, to use chown
, you need some elevated powers. You can't just move ownership of files, etc, to another user as a regular user yourself. Make sure you know what this means and that that's what you want.
Third, make sure you understand what you're trying to do. chown
changes the ownership of a filesystem entity or entities to the user and group you tell it.
There are a few things to take into consideration and I hope I'll cover some holes in your question.
First, when you use chown
, the user and group you're trying to assign the entities to should exist. If it doesn't, then you'll get an error. So make sure it does exist first.
Second, to use chown
, you need some elevated powers. You can't just move ownership of files, etc, to another user as a regular user yourself. Make sure you know what this means and that that's what you want.
Third, make sure you understand what you're trying to do. chown
changes the ownership of a filesystem entity or entities to the user and group you tell it.
answered Sep 19 at 17:59
Tomasz
8,43552560
8,43552560
Then I believe I would need to add my user 'graycodes' to the group 'vagrant' which would give it permission in Vagrant. I figure the relevant commands could look like I've show in my edited question.
â Gray
Sep 19 at 18:09
2
@Gray It's still not clear to me what in fact you are trying to achieve.
â Tomasz
Sep 19 at 18:10
okay. I'm actually following the sitepoint base-box tutorial. I'm packaging a base box which I'll later provision an a LAMP server and then add wordpress to that. Here's the link to the sitepoint tutorial: sitepoint.com/create-share-vagrant-base-box (under subheading 'SSH configuration'..."Open SSH is very strict about this folder and file permission. So let's change it to the correct one.")
â Gray
Sep 19 at 18:16
@Gray That tutorial goes pretty much against my intuition and experience with Vagrant. My experience is distant, but I thought Vagrant is for fast and easy creation of virtual machines, while the tutorial makes this manual. Why use Vagrant then? Quite likely I'm not in the story. So abstracting from this, there's no step included in the tutorial where you'd install Vagrant itself. This plus the "invalid user" error makes me think you still miss the actualvagrant
on your system. Am I wrong?
â Tomasz
Sep 19 at 18:29
shift, I dnk what I'm doing. But I know how to do it one way. The way the tutorial says I should. But that means my username on the server HAS TO BE 'vagrant'.
â Gray
Sep 19 at 18:34
 |Â
show 2 more comments
Then I believe I would need to add my user 'graycodes' to the group 'vagrant' which would give it permission in Vagrant. I figure the relevant commands could look like I've show in my edited question.
â Gray
Sep 19 at 18:09
2
@Gray It's still not clear to me what in fact you are trying to achieve.
â Tomasz
Sep 19 at 18:10
okay. I'm actually following the sitepoint base-box tutorial. I'm packaging a base box which I'll later provision an a LAMP server and then add wordpress to that. Here's the link to the sitepoint tutorial: sitepoint.com/create-share-vagrant-base-box (under subheading 'SSH configuration'..."Open SSH is very strict about this folder and file permission. So let's change it to the correct one.")
â Gray
Sep 19 at 18:16
@Gray That tutorial goes pretty much against my intuition and experience with Vagrant. My experience is distant, but I thought Vagrant is for fast and easy creation of virtual machines, while the tutorial makes this manual. Why use Vagrant then? Quite likely I'm not in the story. So abstracting from this, there's no step included in the tutorial where you'd install Vagrant itself. This plus the "invalid user" error makes me think you still miss the actualvagrant
on your system. Am I wrong?
â Tomasz
Sep 19 at 18:29
shift, I dnk what I'm doing. But I know how to do it one way. The way the tutorial says I should. But that means my username on the server HAS TO BE 'vagrant'.
â Gray
Sep 19 at 18:34
Then I believe I would need to add my user 'graycodes' to the group 'vagrant' which would give it permission in Vagrant. I figure the relevant commands could look like I've show in my edited question.
â Gray
Sep 19 at 18:09
Then I believe I would need to add my user 'graycodes' to the group 'vagrant' which would give it permission in Vagrant. I figure the relevant commands could look like I've show in my edited question.
â Gray
Sep 19 at 18:09
2
2
@Gray It's still not clear to me what in fact you are trying to achieve.
â Tomasz
Sep 19 at 18:10
@Gray It's still not clear to me what in fact you are trying to achieve.
â Tomasz
Sep 19 at 18:10
okay. I'm actually following the sitepoint base-box tutorial. I'm packaging a base box which I'll later provision an a LAMP server and then add wordpress to that. Here's the link to the sitepoint tutorial: sitepoint.com/create-share-vagrant-base-box (under subheading 'SSH configuration'..."Open SSH is very strict about this folder and file permission. So let's change it to the correct one.")
â Gray
Sep 19 at 18:16
okay. I'm actually following the sitepoint base-box tutorial. I'm packaging a base box which I'll later provision an a LAMP server and then add wordpress to that. Here's the link to the sitepoint tutorial: sitepoint.com/create-share-vagrant-base-box (under subheading 'SSH configuration'..."Open SSH is very strict about this folder and file permission. So let's change it to the correct one.")
â Gray
Sep 19 at 18:16
@Gray That tutorial goes pretty much against my intuition and experience with Vagrant. My experience is distant, but I thought Vagrant is for fast and easy creation of virtual machines, while the tutorial makes this manual. Why use Vagrant then? Quite likely I'm not in the story. So abstracting from this, there's no step included in the tutorial where you'd install Vagrant itself. This plus the "invalid user" error makes me think you still miss the actual
vagrant
on your system. Am I wrong?â Tomasz
Sep 19 at 18:29
@Gray That tutorial goes pretty much against my intuition and experience with Vagrant. My experience is distant, but I thought Vagrant is for fast and easy creation of virtual machines, while the tutorial makes this manual. Why use Vagrant then? Quite likely I'm not in the story. So abstracting from this, there's no step included in the tutorial where you'd install Vagrant itself. This plus the "invalid user" error makes me think you still miss the actual
vagrant
on your system. Am I wrong?â Tomasz
Sep 19 at 18:29
shift, I dnk what I'm doing. But I know how to do it one way. The way the tutorial says I should. But that means my username on the server HAS TO BE 'vagrant'.
â Gray
Sep 19 at 18:34
shift, I dnk what I'm doing. But I know how to do it one way. The way the tutorial says I should. But that means my username on the server HAS TO BE 'vagrant'.
â Gray
Sep 19 at 18:34
 |Â
show 2 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f470084%2fssh-configuration-chown-usernamegroup-says-invalid-user%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password