usermod equivalent for Alpine Linux The Next CEO of Stack OverflowLinux - Debian - Original...
Small nick on power cord from an electric alarm clock, and copper wiring exposed but intact
Could a dragon use hot air to help it take off?
What did the word "leisure" mean in late 18th Century usage?
My boss doesn't want me to have a side project
Does Germany produce more waste than the US?
What does this strange code stamp on my passport mean?
Planeswalker Ability and Death Timing
How dangerous is XSS
Why do we say “un seul M” and not “une seule M” even though M is a “consonne”?
Can a PhD from a non-TU9 German university become a professor in a TU9 university?
Are British MPs missing the point, with these 'Indicative Votes'?
Is it "common practice in Fourier transform spectroscopy to multiply the measured interferogram by an apodizing function"? If so, why?
My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?
How does a dynamic QR code work?
Finitely generated matrix groups whose eigenvalues are all algebraic
How exploitable/balanced is this homebrew spell: Spell Permanency?
Free fall ellipse or parabola?
How seriously should I take size and weight limits of hand luggage?
How to show a landlord what we have in savings?
Incomplete cube
Gödel's incompleteness theorems - what are the religious implications?
Do I need to write [sic] when including a quotation with a number less than 10 that isn't written out?
Can Sri Krishna be called 'a person'?
Is there a rule of thumb for determining the amount one should accept for a settlement offer?
usermod equivalent for Alpine Linux
The Next CEO of Stack OverflowLinux - Debian - Original groups that a user is inHow to install a specific package version in Alpine?What is a prescriptive way for managing the permissions for mounted volumes in Alpine-based Docker?How to install npm in alpine linuxFixate version alpine linux apk package (in container)How to install specific version of libxml2 on Alpine linux without downgrade of whole alpine to v3.1?What is the best way to install latest nodejs with npm on alpine linuxPython wx-widgets in Alpine LinuxShare a directory with one (not all) other non-root user on Linux (no root privileges)Docker group assignment doesn't affect the user
I'm building a Docker container, and I need to add my user to a group. usermod
is not available in Alpine Linux by default. Apparently, you can add shadow
from apk
to install usermod
, but I would prefer to not install additional packages.
Is there an alternative way to add a user to a group, or an equivalent tool to usermod
available in Alpine?
user-accounts user-groups alpine-linux
add a comment |
I'm building a Docker container, and I need to add my user to a group. usermod
is not available in Alpine Linux by default. Apparently, you can add shadow
from apk
to install usermod
, but I would prefer to not install additional packages.
Is there an alternative way to add a user to a group, or an equivalent tool to usermod
available in Alpine?
user-accounts user-groups alpine-linux
Have you seen this? Basically adding environment variables for UID and GID when initializing.
– JakeGould
Jan 17 at 17:20
2
Why not simply modify the /etc/group file directly?
– davidgo
Jan 17 at 18:12
@davidgo Some people don’t know you can just edit it like that but it’s a good solution. Would need to be scriptable viased
or something like that.
– JakeGould
Jan 17 at 21:09
add a comment |
I'm building a Docker container, and I need to add my user to a group. usermod
is not available in Alpine Linux by default. Apparently, you can add shadow
from apk
to install usermod
, but I would prefer to not install additional packages.
Is there an alternative way to add a user to a group, or an equivalent tool to usermod
available in Alpine?
user-accounts user-groups alpine-linux
I'm building a Docker container, and I need to add my user to a group. usermod
is not available in Alpine Linux by default. Apparently, you can add shadow
from apk
to install usermod
, but I would prefer to not install additional packages.
Is there an alternative way to add a user to a group, or an equivalent tool to usermod
available in Alpine?
user-accounts user-groups alpine-linux
user-accounts user-groups alpine-linux
asked Jan 17 at 17:13
ZakZak
1063
1063
Have you seen this? Basically adding environment variables for UID and GID when initializing.
– JakeGould
Jan 17 at 17:20
2
Why not simply modify the /etc/group file directly?
– davidgo
Jan 17 at 18:12
@davidgo Some people don’t know you can just edit it like that but it’s a good solution. Would need to be scriptable viased
or something like that.
– JakeGould
Jan 17 at 21:09
add a comment |
Have you seen this? Basically adding environment variables for UID and GID when initializing.
– JakeGould
Jan 17 at 17:20
2
Why not simply modify the /etc/group file directly?
– davidgo
Jan 17 at 18:12
@davidgo Some people don’t know you can just edit it like that but it’s a good solution. Would need to be scriptable viased
or something like that.
– JakeGould
Jan 17 at 21:09
Have you seen this? Basically adding environment variables for UID and GID when initializing.
– JakeGould
Jan 17 at 17:20
Have you seen this? Basically adding environment variables for UID and GID when initializing.
– JakeGould
Jan 17 at 17:20
2
2
Why not simply modify the /etc/group file directly?
– davidgo
Jan 17 at 18:12
Why not simply modify the /etc/group file directly?
– davidgo
Jan 17 at 18:12
@davidgo Some people don’t know you can just edit it like that but it’s a good solution. Would need to be scriptable via
sed
or something like that.– JakeGould
Jan 17 at 21:09
@davidgo Some people don’t know you can just edit it like that but it’s a good solution. Would need to be scriptable via
sed
or something like that.– JakeGould
Jan 17 at 21:09
add a comment |
1 Answer
1
active
oldest
votes
You should be able to use the built-in addgroup
command to add the user to a given group:
$ addgroup --help
BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary.
Usage: addgroup [-g GID] [-S] [USER] GROUP
Add a group or add a user to a group
-g GID Group id
-S Create a system group
So running addgroup ${USER} ${GROUP}
should update /etc/groups
without needing to edit the file directly.
New contributor
add a comment |
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2fsuperuser.com%2fquestions%2f1395473%2fusermod-equivalent-for-alpine-linux%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
You should be able to use the built-in addgroup
command to add the user to a given group:
$ addgroup --help
BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary.
Usage: addgroup [-g GID] [-S] [USER] GROUP
Add a group or add a user to a group
-g GID Group id
-S Create a system group
So running addgroup ${USER} ${GROUP}
should update /etc/groups
without needing to edit the file directly.
New contributor
add a comment |
You should be able to use the built-in addgroup
command to add the user to a given group:
$ addgroup --help
BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary.
Usage: addgroup [-g GID] [-S] [USER] GROUP
Add a group or add a user to a group
-g GID Group id
-S Create a system group
So running addgroup ${USER} ${GROUP}
should update /etc/groups
without needing to edit the file directly.
New contributor
add a comment |
You should be able to use the built-in addgroup
command to add the user to a given group:
$ addgroup --help
BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary.
Usage: addgroup [-g GID] [-S] [USER] GROUP
Add a group or add a user to a group
-g GID Group id
-S Create a system group
So running addgroup ${USER} ${GROUP}
should update /etc/groups
without needing to edit the file directly.
New contributor
You should be able to use the built-in addgroup
command to add the user to a given group:
$ addgroup --help
BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary.
Usage: addgroup [-g GID] [-S] [USER] GROUP
Add a group or add a user to a group
-g GID Group id
-S Create a system group
So running addgroup ${USER} ${GROUP}
should update /etc/groups
without needing to edit the file directly.
New contributor
New contributor
answered 3 hours ago
tzrlktzrlk
1013
1013
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- 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%2fsuperuser.com%2fquestions%2f1395473%2fusermod-equivalent-for-alpine-linux%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
Have you seen this? Basically adding environment variables for UID and GID when initializing.
– JakeGould
Jan 17 at 17:20
2
Why not simply modify the /etc/group file directly?
– davidgo
Jan 17 at 18:12
@davidgo Some people don’t know you can just edit it like that but it’s a good solution. Would need to be scriptable via
sed
or something like that.– JakeGould
Jan 17 at 21:09