LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-30-2010, 07:40 AM   #1
smsahmed
LQ Newbie
 
Registered: May 2010
Location: Dhaka, Bangladesh
Distribution: RHEL5, CentOS, Fedora
Posts: 8

Rep: Reputation: 0
problem with useradd/userdel command on RHEL5


Hi!
Im not getting able to neither add new users using command useradd nor delete existing users using command userdel. And even Im not getting able to login into any existing users except root. It was ok before. Im having this problem very recently on my linux server. Im using RHEL5.

Can any body please tell me what is the problem?

Thanks in advance..
 
Old 06-30-2010, 07:59 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
First, what exactly happens when you attempt to use those commands?

Second, what happened (or what were you doing) before the problem started?

I assume that you can log in as root-----can you change the password of another user, and then log in as that user?
 
Old 06-30-2010, 10:35 AM   #3
myposts
Member
 
Registered: Jun 2010
Posts: 46

Rep: Reputation: 21
root?

Did you attempt it under root account? Make sure that you do it as s root user.
 
Old 07-01-2010, 12:58 AM   #4
smsahmed
LQ Newbie
 
Registered: May 2010
Location: Dhaka, Bangladesh
Distribution: RHEL5, CentOS, Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
I was logging in as root and trying to add new users with that command adduser when I saw that its not working then I tried userdel command to see whether or not its working and found that its not working also.

Then I tried with graphical mood using system-config-users command and here I can delete users only but cant add new users. When I tried with useradd command just nothing happens but when trying to add from graphical mood with system-config-users then system gets hanged.

when I try to login into one of those existing users with su - john (suppose john is a user) from root then nothing happens. Even when I reboot my server and try to login as john then getting message authentication failed. I've tried with disabling SELinux.

The last time I was able to add user while implementing an LDAP server. Yesterday I just removed my previously installed sendmail package and installed new package of squirrelmail.

Thanks in advance...
 
Old 07-01-2010, 11:35 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by smsahmed View Post
I was logging in as root and trying to add new users with that command adduser when I saw that its not working then I tried userdel command to see whether or not its working and found that its not working also.
Please tell us exactly what happens when attempting to run those commands---post the actual terminal messages if necessary.

Note that--on RedHat systems--you sometimes have to get into the root environment to access certain commands.

"su" = switch to root privileges

"su -" = switch to root privileges AND environment

Alternatively, you can specify the full path on commands---eg:
/usr/sbin/userdel
 
Old 07-03-2010, 01:41 AM   #6
smsahmed
LQ Newbie
 
Registered: May 2010
Location: Dhaka, Bangladesh
Distribution: RHEL5, CentOS, Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
When I run useradd or /usr/sbin/useradd then nothing happens, the cursor just blinks, blinks and blinks and get no message. I also tried with "su -" and then "useradd" or "/usr/sbin/useradd" but the result is same. The password is getting changed successfully for user "john" when I run "passwd john" command, but still when I try to login with that username and password from login page then get message "Authentication failed."

I am really worried..
 
Old 07-03-2010, 05:47 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Try it with a name---eg "useradd name". On my system, "useradd" with no arguments gives a dump of the command options---but sometimes, when a command expects arguements, the system will just sit there waiting.
 
Old 07-03-2010, 06:15 AM   #8
smsahmed
LQ Newbie
 
Registered: May 2010
Location: Dhaka, Bangladesh
Distribution: RHEL5, CentOS, Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
Dear pixellany, thank you so much for you helping attitude.

Actually since the beginning I've been trying with "useradd username" or "/usr/sbin/useradd username" but it didn't work.

I've talked to some local people regarding this problem but none of them are recognized with this problem.
 
Old 07-03-2010, 08:11 AM   #9
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,647

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
What does /var/log/secure say?
 
1 members found this post helpful.
Old 07-04-2010, 02:11 AM   #10
smsahmed
LQ Newbie
 
Registered: May 2010
Location: Dhaka, Bangladesh
Distribution: RHEL5, CentOS, Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
Dear AlucardZero!!!
Thank you!! Thank you very very much.

/var/log/secure showed that nss_ldap: reconnecting the LDAP server (...)

Then I've just restarted the LDAP server. And now everything is ok. "useradd/userdel" or "su - username" all those commands are working.

thank you so much once again..
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userdel problem armandino Linux - General 1 02-25-2009 01:46 PM
Userdel command , Need explaination srihariv Linux - General 4 03-07-2008 02:57 AM
useradd command problem rohit_67066 Linux - Server 2 02-25-2008 10:21 AM
bash: userdel: command not found dwdrumrboy Linux - Newbie 9 04-16-2005 11:47 AM
userdel command... should I run it? The_Nerd Linux - Software 2 09-12-2004 08:31 PM


All times are GMT -5. The time now is 08:45 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration