LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-31-2012, 02:42 AM   #1
romel
Member
 
Registered: Sep 2003
Location: Bangladesh
Distribution: Debian
Posts: 102

Rep: Reputation: 15
adduser or useradd command not working


Dear All,

I am using RHEL5 version. I log on as root. But adduser or useradd command is not working.Please help.

Thanks,

Romel.
 
Old 01-31-2012, 02:49 AM   #2
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
what exactly the error you are getting?
 
Old 01-31-2012, 02:51 AM   #3
eehmke
LQ Newbie
 
Registered: Aug 2011
Distribution: Debian, Gentoo
Posts: 24

Rep: Reputation: 0
Quote:
Originally Posted by romel View Post
I am using RHEL5 version. I log on as root. But adduser or useradd command is not working.Please help.
"This does not work" is not a useful information. Please tell us what you are doing, and what error messages you get.
 
Old 01-31-2012, 03:51 AM   #4
romel
Member
 
Registered: Sep 2003
Location: Bangladesh
Distribution: Debian
Posts: 102

Original Poster
Rep: Reputation: 15
command not found..
 
Old 01-31-2012, 04:00 AM   #5
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Try the full path
Quote:
# /usr/sbin/useradd xyz
It should be there.

OR

Try:
Quote:
# locate useradd | grep bin
and see if you find it. If that fails too show the program try:

Quote:
# locate adduser
.

Last edited by Satyaveer Arya; 01-31-2012 at 04:10 AM.
 
Old 01-31-2012, 04:03 AM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
If that also not helps you then check this:

Quote:
# echo $PATH
Normally useradd resides on /usr/sbin/useradd

Can you see /usr/sbin from output of echo ?

enter "man useradd" or "man adduser"

If not exist, somebody removed it !

Probably "shadow-utils" package is removed

You can install it by "rpm -Uvh shadow-utils-......rpm"
 
Old 01-31-2012, 04:05 AM   #7
cbtshare
Member
 
Registered: Jul 2009
Posts: 619

Rep: Reputation: 42
command not found error is because the path is not exported.



Since your on Red Hat, enter this in the command prompt:
Quote:
export PATH=$PATH:/usr/sbin
(This is temporary so you should add it to your bash_profile to be permanent)

then try again to use the command.

Last edited by cbtshare; 01-31-2012 at 04:06 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is difference b/t useradd & adduser ram_rajavarapu Linux - Enterprise 1 07-25-2009 10:41 AM
Useradd -vs Adduser carlosinfl Linux - General 3 03-10-2009 11:10 PM
CentOS 4.4 - no useradd or adduser command Micro420 Red Hat 5 04-04-2007 11:14 PM
useradd vs adduser shipon_97 Linux - Networking 1 10-03-2006 10:12 PM
commands: adduser and useradd kurrupt Linux - Security 2 10-19-2004 11:47 PM


All times are GMT -5. The time now is 11:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration