Bash cannot act as nobody and nogroup?
Clash Royale CLAN TAG#URR8PPP
I have a log file that was created by nobody
:nogroup
, which is activity being logged to, I wanted to emulate adding a message to that log file.
My first thought was to:
$ sudo su nobody
This account is currently not available.
bash shell users privileges
add a comment |
I have a log file that was created by nobody
:nogroup
, which is activity being logged to, I wanted to emulate adding a message to that log file.
My first thought was to:
$ sudo su nobody
This account is currently not available.
bash shell users privileges
add a comment |
I have a log file that was created by nobody
:nogroup
, which is activity being logged to, I wanted to emulate adding a message to that log file.
My first thought was to:
$ sudo su nobody
This account is currently not available.
bash shell users privileges
I have a log file that was created by nobody
:nogroup
, which is activity being logged to, I wanted to emulate adding a message to that log file.
My first thought was to:
$ sudo su nobody
This account is currently not available.
bash shell users privileges
bash shell users privileges
edited Oct 15 '15 at 23:58
Thomas Dickey
52k594164
52k594164
asked Aug 11 '15 at 20:33
ThorSummoner
1,22741629
1,22741629
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You have a way simpler solution, just run: su -s /bin/bash nobody
(replace /bin/bash
with the shell of your choice).
The This account is currently not available.
error is due to the fact that nobody
user default shell is /usr/sbin/nologin
, su -s
force the system to use another shell.
add a comment |
An email thread:
- http://www.sudo.ws/pipermail/sudo-users/2002-September/001225.html
- http://www.sudo.ws/pipermail/sudo-users/2002-September/001226.html
.. points out that sudo -u nobody [cmd ...]
can be used:
(Combined with the trick of How to append to a file as sudo)
echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log
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%2f222602%2fbash-cannot-act-as-nobody-and-nogroup%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You have a way simpler solution, just run: su -s /bin/bash nobody
(replace /bin/bash
with the shell of your choice).
The This account is currently not available.
error is due to the fact that nobody
user default shell is /usr/sbin/nologin
, su -s
force the system to use another shell.
add a comment |
You have a way simpler solution, just run: su -s /bin/bash nobody
(replace /bin/bash
with the shell of your choice).
The This account is currently not available.
error is due to the fact that nobody
user default shell is /usr/sbin/nologin
, su -s
force the system to use another shell.
add a comment |
You have a way simpler solution, just run: su -s /bin/bash nobody
(replace /bin/bash
with the shell of your choice).
The This account is currently not available.
error is due to the fact that nobody
user default shell is /usr/sbin/nologin
, su -s
force the system to use another shell.
You have a way simpler solution, just run: su -s /bin/bash nobody
(replace /bin/bash
with the shell of your choice).
The This account is currently not available.
error is due to the fact that nobody
user default shell is /usr/sbin/nologin
, su -s
force the system to use another shell.
edited Dec 13 at 10:37
GAD3R
25.3k1750106
25.3k1750106
answered Jan 19 '16 at 20:26
Hartator
26623
26623
add a comment |
add a comment |
An email thread:
- http://www.sudo.ws/pipermail/sudo-users/2002-September/001225.html
- http://www.sudo.ws/pipermail/sudo-users/2002-September/001226.html
.. points out that sudo -u nobody [cmd ...]
can be used:
(Combined with the trick of How to append to a file as sudo)
echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log
add a comment |
An email thread:
- http://www.sudo.ws/pipermail/sudo-users/2002-September/001225.html
- http://www.sudo.ws/pipermail/sudo-users/2002-September/001226.html
.. points out that sudo -u nobody [cmd ...]
can be used:
(Combined with the trick of How to append to a file as sudo)
echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log
add a comment |
An email thread:
- http://www.sudo.ws/pipermail/sudo-users/2002-September/001225.html
- http://www.sudo.ws/pipermail/sudo-users/2002-September/001226.html
.. points out that sudo -u nobody [cmd ...]
can be used:
(Combined with the trick of How to append to a file as sudo)
echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log
An email thread:
- http://www.sudo.ws/pipermail/sudo-users/2002-September/001225.html
- http://www.sudo.ws/pipermail/sudo-users/2002-September/001226.html
.. points out that sudo -u nobody [cmd ...]
can be used:
(Combined with the trick of How to append to a file as sudo)
echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log
edited Mar 20 '17 at 10:18
Community♦
1
1
answered Aug 11 '15 at 20:33
ThorSummoner
1,22741629
1,22741629
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f222602%2fbash-cannot-act-as-nobody-and-nogroup%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