Where do I find files specific to a user?
I've been having a problem connecting to my rabbitmq server when I start it on my local machine. Apparently the erlang cookie of the server, running on my local machine, does not match the cookie on my local machine. I found an old post on the internet explaining that such a problem when running on a local machine can be caused by the fact that I'm not running rabbitmq as a rabbitmq user which is created for you by the installer. So I did just that and started rabbitmq as rabbitmq user, with the following command.
sudo -H -u rabbitmq bash /usr/lib/rabbitmq/bin/rabbitmq-server
How does it really work? Since I don't have a dedicated folder for the user rabbitmq I want to understand where erlang cookie can be saved for the mentioned user, so that it does not match the cookie inside MY home folder (it IS there). Also I would like to know how the command --set-home would work in the context of the given command given such user does not (to my understanding) have a home directory.
ubuntu rabbitmq erlang
add a comment |
I've been having a problem connecting to my rabbitmq server when I start it on my local machine. Apparently the erlang cookie of the server, running on my local machine, does not match the cookie on my local machine. I found an old post on the internet explaining that such a problem when running on a local machine can be caused by the fact that I'm not running rabbitmq as a rabbitmq user which is created for you by the installer. So I did just that and started rabbitmq as rabbitmq user, with the following command.
sudo -H -u rabbitmq bash /usr/lib/rabbitmq/bin/rabbitmq-server
How does it really work? Since I don't have a dedicated folder for the user rabbitmq I want to understand where erlang cookie can be saved for the mentioned user, so that it does not match the cookie inside MY home folder (it IS there). Also I would like to know how the command --set-home would work in the context of the given command given such user does not (to my understanding) have a home directory.
ubuntu rabbitmq erlang
1
I don't know anything about rabbitmq, but it sounds like you want to know what the user's home directory is set to when you execute the command: if so, you can usesudo -H -u rabbitmq sh -c 'echo $HOME'
(it's important to use single quotes here). OTOH it's possible that rabbitmq is configured to save the cookie somewhere other than its user's$HOME
– steeldriver
Jan 26 at 13:31
That's actually the command I was looking for, thanks! I didn't know you could set a home directory for a user inside the /var/lib.
– Alexander Tolub
Jan 26 at 21:40
add a comment |
I've been having a problem connecting to my rabbitmq server when I start it on my local machine. Apparently the erlang cookie of the server, running on my local machine, does not match the cookie on my local machine. I found an old post on the internet explaining that such a problem when running on a local machine can be caused by the fact that I'm not running rabbitmq as a rabbitmq user which is created for you by the installer. So I did just that and started rabbitmq as rabbitmq user, with the following command.
sudo -H -u rabbitmq bash /usr/lib/rabbitmq/bin/rabbitmq-server
How does it really work? Since I don't have a dedicated folder for the user rabbitmq I want to understand where erlang cookie can be saved for the mentioned user, so that it does not match the cookie inside MY home folder (it IS there). Also I would like to know how the command --set-home would work in the context of the given command given such user does not (to my understanding) have a home directory.
ubuntu rabbitmq erlang
I've been having a problem connecting to my rabbitmq server when I start it on my local machine. Apparently the erlang cookie of the server, running on my local machine, does not match the cookie on my local machine. I found an old post on the internet explaining that such a problem when running on a local machine can be caused by the fact that I'm not running rabbitmq as a rabbitmq user which is created for you by the installer. So I did just that and started rabbitmq as rabbitmq user, with the following command.
sudo -H -u rabbitmq bash /usr/lib/rabbitmq/bin/rabbitmq-server
How does it really work? Since I don't have a dedicated folder for the user rabbitmq I want to understand where erlang cookie can be saved for the mentioned user, so that it does not match the cookie inside MY home folder (it IS there). Also I would like to know how the command --set-home would work in the context of the given command given such user does not (to my understanding) have a home directory.
ubuntu rabbitmq erlang
ubuntu rabbitmq erlang
edited Jan 26 at 12:26
Rui F Ribeiro
39.8k1479134
39.8k1479134
asked Jan 26 at 12:07
Alexander TolubAlexander Tolub
62
62
1
I don't know anything about rabbitmq, but it sounds like you want to know what the user's home directory is set to when you execute the command: if so, you can usesudo -H -u rabbitmq sh -c 'echo $HOME'
(it's important to use single quotes here). OTOH it's possible that rabbitmq is configured to save the cookie somewhere other than its user's$HOME
– steeldriver
Jan 26 at 13:31
That's actually the command I was looking for, thanks! I didn't know you could set a home directory for a user inside the /var/lib.
– Alexander Tolub
Jan 26 at 21:40
add a comment |
1
I don't know anything about rabbitmq, but it sounds like you want to know what the user's home directory is set to when you execute the command: if so, you can usesudo -H -u rabbitmq sh -c 'echo $HOME'
(it's important to use single quotes here). OTOH it's possible that rabbitmq is configured to save the cookie somewhere other than its user's$HOME
– steeldriver
Jan 26 at 13:31
That's actually the command I was looking for, thanks! I didn't know you could set a home directory for a user inside the /var/lib.
– Alexander Tolub
Jan 26 at 21:40
1
1
I don't know anything about rabbitmq, but it sounds like you want to know what the user's home directory is set to when you execute the command: if so, you can use
sudo -H -u rabbitmq sh -c 'echo $HOME'
(it's important to use single quotes here). OTOH it's possible that rabbitmq is configured to save the cookie somewhere other than its user's $HOME
– steeldriver
Jan 26 at 13:31
I don't know anything about rabbitmq, but it sounds like you want to know what the user's home directory is set to when you execute the command: if so, you can use
sudo -H -u rabbitmq sh -c 'echo $HOME'
(it's important to use single quotes here). OTOH it's possible that rabbitmq is configured to save the cookie somewhere other than its user's $HOME
– steeldriver
Jan 26 at 13:31
That's actually the command I was looking for, thanks! I didn't know you could set a home directory for a user inside the /var/lib.
– Alexander Tolub
Jan 26 at 21:40
That's actually the command I was looking for, thanks! I didn't know you could set a home directory for a user inside the /var/lib.
– Alexander Tolub
Jan 26 at 21:40
add a comment |
1 Answer
1
active
oldest
votes
The RabbitMQ installer creates the rabbitmq
user and sets the home directory to /var/lib/rabbitmq
. You can discover this by looking for the rabbitmq
user in /etc/passwd
.
Apparently the erlang cookie of the server, running on my local machine, does not match the cookie on my local machine.
How do you know this? Did you run a command and see an error? This is important information.
The way RabbitMQ is intended to be used when installed via a package is to be started by init
(systemd
) as the rabbitmq
user. Then, when you need to run rabbitmqctl
, you do so as root
and the command switches to the rabbitmq
user, ensuring that the correct cookie is used.
You may be able to copy the /var/lib/rabbitmq/.erlang.cookie
file to your home directory and run rabbbitmqctl
as your own user.
NOTE: the RabbitMQ team monitors the rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow.
I know that the cookie does not match since I looked at the logs that the rabbitmq provides when I try to login with rabbitmqctl. I can't provide the exact error message at the moment, but I searched for that error message and found numerous posts of people telling it's probably caused by the cookie mismatch. So I looked how to rectify that, and eventually came up with an idea to run rabbitmq as the rabbitmq user, which helped. That's how I reached a conclusion that cookie does indeed mismatch.
– Alexander Tolub
Jan 26 at 21:31
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f496863%2fwhere-do-i-find-files-specific-to-a-user%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The RabbitMQ installer creates the rabbitmq
user and sets the home directory to /var/lib/rabbitmq
. You can discover this by looking for the rabbitmq
user in /etc/passwd
.
Apparently the erlang cookie of the server, running on my local machine, does not match the cookie on my local machine.
How do you know this? Did you run a command and see an error? This is important information.
The way RabbitMQ is intended to be used when installed via a package is to be started by init
(systemd
) as the rabbitmq
user. Then, when you need to run rabbitmqctl
, you do so as root
and the command switches to the rabbitmq
user, ensuring that the correct cookie is used.
You may be able to copy the /var/lib/rabbitmq/.erlang.cookie
file to your home directory and run rabbbitmqctl
as your own user.
NOTE: the RabbitMQ team monitors the rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow.
I know that the cookie does not match since I looked at the logs that the rabbitmq provides when I try to login with rabbitmqctl. I can't provide the exact error message at the moment, but I searched for that error message and found numerous posts of people telling it's probably caused by the cookie mismatch. So I looked how to rectify that, and eventually came up with an idea to run rabbitmq as the rabbitmq user, which helped. That's how I reached a conclusion that cookie does indeed mismatch.
– Alexander Tolub
Jan 26 at 21:31
add a comment |
The RabbitMQ installer creates the rabbitmq
user and sets the home directory to /var/lib/rabbitmq
. You can discover this by looking for the rabbitmq
user in /etc/passwd
.
Apparently the erlang cookie of the server, running on my local machine, does not match the cookie on my local machine.
How do you know this? Did you run a command and see an error? This is important information.
The way RabbitMQ is intended to be used when installed via a package is to be started by init
(systemd
) as the rabbitmq
user. Then, when you need to run rabbitmqctl
, you do so as root
and the command switches to the rabbitmq
user, ensuring that the correct cookie is used.
You may be able to copy the /var/lib/rabbitmq/.erlang.cookie
file to your home directory and run rabbbitmqctl
as your own user.
NOTE: the RabbitMQ team monitors the rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow.
I know that the cookie does not match since I looked at the logs that the rabbitmq provides when I try to login with rabbitmqctl. I can't provide the exact error message at the moment, but I searched for that error message and found numerous posts of people telling it's probably caused by the cookie mismatch. So I looked how to rectify that, and eventually came up with an idea to run rabbitmq as the rabbitmq user, which helped. That's how I reached a conclusion that cookie does indeed mismatch.
– Alexander Tolub
Jan 26 at 21:31
add a comment |
The RabbitMQ installer creates the rabbitmq
user and sets the home directory to /var/lib/rabbitmq
. You can discover this by looking for the rabbitmq
user in /etc/passwd
.
Apparently the erlang cookie of the server, running on my local machine, does not match the cookie on my local machine.
How do you know this? Did you run a command and see an error? This is important information.
The way RabbitMQ is intended to be used when installed via a package is to be started by init
(systemd
) as the rabbitmq
user. Then, when you need to run rabbitmqctl
, you do so as root
and the command switches to the rabbitmq
user, ensuring that the correct cookie is used.
You may be able to copy the /var/lib/rabbitmq/.erlang.cookie
file to your home directory and run rabbbitmqctl
as your own user.
NOTE: the RabbitMQ team monitors the rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow.
The RabbitMQ installer creates the rabbitmq
user and sets the home directory to /var/lib/rabbitmq
. You can discover this by looking for the rabbitmq
user in /etc/passwd
.
Apparently the erlang cookie of the server, running on my local machine, does not match the cookie on my local machine.
How do you know this? Did you run a command and see an error? This is important information.
The way RabbitMQ is intended to be used when installed via a package is to be started by init
(systemd
) as the rabbitmq
user. Then, when you need to run rabbitmqctl
, you do so as root
and the command switches to the rabbitmq
user, ensuring that the correct cookie is used.
You may be able to copy the /var/lib/rabbitmq/.erlang.cookie
file to your home directory and run rabbbitmqctl
as your own user.
NOTE: the RabbitMQ team monitors the rabbitmq-users
mailing list and only sometimes answers questions on StackOverflow.
answered Jan 26 at 16:52
Luke BakkenLuke Bakken
1112
1112
I know that the cookie does not match since I looked at the logs that the rabbitmq provides when I try to login with rabbitmqctl. I can't provide the exact error message at the moment, but I searched for that error message and found numerous posts of people telling it's probably caused by the cookie mismatch. So I looked how to rectify that, and eventually came up with an idea to run rabbitmq as the rabbitmq user, which helped. That's how I reached a conclusion that cookie does indeed mismatch.
– Alexander Tolub
Jan 26 at 21:31
add a comment |
I know that the cookie does not match since I looked at the logs that the rabbitmq provides when I try to login with rabbitmqctl. I can't provide the exact error message at the moment, but I searched for that error message and found numerous posts of people telling it's probably caused by the cookie mismatch. So I looked how to rectify that, and eventually came up with an idea to run rabbitmq as the rabbitmq user, which helped. That's how I reached a conclusion that cookie does indeed mismatch.
– Alexander Tolub
Jan 26 at 21:31
I know that the cookie does not match since I looked at the logs that the rabbitmq provides when I try to login with rabbitmqctl. I can't provide the exact error message at the moment, but I searched for that error message and found numerous posts of people telling it's probably caused by the cookie mismatch. So I looked how to rectify that, and eventually came up with an idea to run rabbitmq as the rabbitmq user, which helped. That's how I reached a conclusion that cookie does indeed mismatch.
– Alexander Tolub
Jan 26 at 21:31
I know that the cookie does not match since I looked at the logs that the rabbitmq provides when I try to login with rabbitmqctl. I can't provide the exact error message at the moment, but I searched for that error message and found numerous posts of people telling it's probably caused by the cookie mismatch. So I looked how to rectify that, and eventually came up with an idea to run rabbitmq as the rabbitmq user, which helped. That's how I reached a conclusion that cookie does indeed mismatch.
– Alexander Tolub
Jan 26 at 21:31
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f496863%2fwhere-do-i-find-files-specific-to-a-user%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I don't know anything about rabbitmq, but it sounds like you want to know what the user's home directory is set to when you execute the command: if so, you can use
sudo -H -u rabbitmq sh -c 'echo $HOME'
(it's important to use single quotes here). OTOH it's possible that rabbitmq is configured to save the cookie somewhere other than its user's$HOME
– steeldriver
Jan 26 at 13:31
That's actually the command I was looking for, thanks! I didn't know you could set a home directory for a user inside the /var/lib.
– Alexander Tolub
Jan 26 at 21:40