bash: adduser: command not found on centOS
Clash Royale CLAN TAG#URR8PPP
I installed CentOS 5.5 on my VMWare 8 recently and I am trying to add a new user on the system. I am unable to add the user unless I use su -
option. I believe it has to do something with path not set properly.
I updated the path and here is what it looks like /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/uone/bin:/sbin
I believe the command is in /sbin dir which is already a part of path. Can anyone suggest me what else I might be missing?
shell path
add a comment |
I installed CentOS 5.5 on my VMWare 8 recently and I am trying to add a new user on the system. I am unable to add the user unless I use su -
option. I believe it has to do something with path not set properly.
I updated the path and here is what it looks like /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/uone/bin:/sbin
I believe the command is in /sbin dir which is already a part of path. Can anyone suggest me what else I might be missing?
shell path
add a comment |
I installed CentOS 5.5 on my VMWare 8 recently and I am trying to add a new user on the system. I am unable to add the user unless I use su -
option. I believe it has to do something with path not set properly.
I updated the path and here is what it looks like /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/uone/bin:/sbin
I believe the command is in /sbin dir which is already a part of path. Can anyone suggest me what else I might be missing?
shell path
I installed CentOS 5.5 on my VMWare 8 recently and I am trying to add a new user on the system. I am unable to add the user unless I use su -
option. I believe it has to do something with path not set properly.
I updated the path and here is what it looks like /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/uone/bin:/sbin
I believe the command is in /sbin dir which is already a part of path. Can anyone suggest me what else I might be missing?
shell path
shell path
edited Feb 27 at 13:24
Jeff Schaller
43.9k1161141
43.9k1161141
asked Aug 3 '14 at 6:33
AtulAtul
4772722
4772722
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
Try adding /usr/sbin
to your path.
Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)
– Atul
Aug 3 '14 at 6:54
1
How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?
– xiaodai
Dec 17 '14 at 7:05
@xiaodai unix.stackexchange.com/a/26059/24354
– Hartley Brody
Oct 20 '15 at 18:41
Want to provide an example of that for this to be a complete answer?
– Henry F
Feb 28 '17 at 4:01
add a comment |
/usr/sbin/useradd username -g groupname -d homedirectory
Its giving me error -bash: /usr/sbin/useradd: No such file or directory
– Nishad Up
Feb 20 '18 at 7:51
add a comment |
I know the OP answer was solved, however for those who are running CentOS from within the docker container, which appears to be missing both adduser and useradd, the solution is to install shadow-utils (under root obviously):
yum install shadow-utils
add a comment |
whereis useradd
this is used to solve that problem
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%2f148105%2fbash-adduser-command-not-found-on-centos%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try adding /usr/sbin
to your path.
Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)
– Atul
Aug 3 '14 at 6:54
1
How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?
– xiaodai
Dec 17 '14 at 7:05
@xiaodai unix.stackexchange.com/a/26059/24354
– Hartley Brody
Oct 20 '15 at 18:41
Want to provide an example of that for this to be a complete answer?
– Henry F
Feb 28 '17 at 4:01
add a comment |
Try adding /usr/sbin
to your path.
Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)
– Atul
Aug 3 '14 at 6:54
1
How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?
– xiaodai
Dec 17 '14 at 7:05
@xiaodai unix.stackexchange.com/a/26059/24354
– Hartley Brody
Oct 20 '15 at 18:41
Want to provide an example of that for this to be a complete answer?
– Henry F
Feb 28 '17 at 4:01
add a comment |
Try adding /usr/sbin
to your path.
Try adding /usr/sbin
to your path.
edited Feb 27 at 11:33
Prvt_Yadv
2,92531327
2,92531327
answered Aug 3 '14 at 6:39
mdpcmdpc
5,07621838
5,07621838
Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)
– Atul
Aug 3 '14 at 6:54
1
How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?
– xiaodai
Dec 17 '14 at 7:05
@xiaodai unix.stackexchange.com/a/26059/24354
– Hartley Brody
Oct 20 '15 at 18:41
Want to provide an example of that for this to be a complete answer?
– Henry F
Feb 28 '17 at 4:01
add a comment |
Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)
– Atul
Aug 3 '14 at 6:54
1
How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?
– xiaodai
Dec 17 '14 at 7:05
@xiaodai unix.stackexchange.com/a/26059/24354
– Hartley Brody
Oct 20 '15 at 18:41
Want to provide an example of that for this to be a complete answer?
– Henry F
Feb 28 '17 at 4:01
Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)
– Atul
Aug 3 '14 at 6:54
Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)
– Atul
Aug 3 '14 at 6:54
1
1
How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?
– xiaodai
Dec 17 '14 at 7:05
How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?
– xiaodai
Dec 17 '14 at 7:05
@xiaodai unix.stackexchange.com/a/26059/24354
– Hartley Brody
Oct 20 '15 at 18:41
@xiaodai unix.stackexchange.com/a/26059/24354
– Hartley Brody
Oct 20 '15 at 18:41
Want to provide an example of that for this to be a complete answer?
– Henry F
Feb 28 '17 at 4:01
Want to provide an example of that for this to be a complete answer?
– Henry F
Feb 28 '17 at 4:01
add a comment |
/usr/sbin/useradd username -g groupname -d homedirectory
Its giving me error -bash: /usr/sbin/useradd: No such file or directory
– Nishad Up
Feb 20 '18 at 7:51
add a comment |
/usr/sbin/useradd username -g groupname -d homedirectory
Its giving me error -bash: /usr/sbin/useradd: No such file or directory
– Nishad Up
Feb 20 '18 at 7:51
add a comment |
/usr/sbin/useradd username -g groupname -d homedirectory
/usr/sbin/useradd username -g groupname -d homedirectory
edited Aug 20 '15 at 12:13
don_crissti
51.7k15141168
51.7k15141168
answered Aug 20 '15 at 11:26
user60679user60679
14513
14513
Its giving me error -bash: /usr/sbin/useradd: No such file or directory
– Nishad Up
Feb 20 '18 at 7:51
add a comment |
Its giving me error -bash: /usr/sbin/useradd: No such file or directory
– Nishad Up
Feb 20 '18 at 7:51
Its giving me error -bash: /usr/sbin/useradd: No such file or directory
– Nishad Up
Feb 20 '18 at 7:51
Its giving me error -bash: /usr/sbin/useradd: No such file or directory
– Nishad Up
Feb 20 '18 at 7:51
add a comment |
I know the OP answer was solved, however for those who are running CentOS from within the docker container, which appears to be missing both adduser and useradd, the solution is to install shadow-utils (under root obviously):
yum install shadow-utils
add a comment |
I know the OP answer was solved, however for those who are running CentOS from within the docker container, which appears to be missing both adduser and useradd, the solution is to install shadow-utils (under root obviously):
yum install shadow-utils
add a comment |
I know the OP answer was solved, however for those who are running CentOS from within the docker container, which appears to be missing both adduser and useradd, the solution is to install shadow-utils (under root obviously):
yum install shadow-utils
I know the OP answer was solved, however for those who are running CentOS from within the docker container, which appears to be missing both adduser and useradd, the solution is to install shadow-utils (under root obviously):
yum install shadow-utils
answered Apr 16 '18 at 4:38
verminvermin
311
311
add a comment |
add a comment |
whereis useradd
this is used to solve that problem
add a comment |
whereis useradd
this is used to solve that problem
add a comment |
whereis useradd
this is used to solve that problem
whereis useradd
this is used to solve that problem
edited Dec 11 '14 at 12:30
Hauke Laging
57.5k1287136
57.5k1287136
answered Dec 11 '14 at 11:18
Admin linuxAdmin linux
1
1
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.
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%2f148105%2fbash-adduser-command-not-found-on-centos%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