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.. |
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? |
root?
Did you attempt it under root account? Make sure that you do it as s root user.
|
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... |
Quote:
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 |
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.. |
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.
|
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. |
What does /var/log/secure say?
|
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.. |
All times are GMT -5. The time now is 06:57 AM. |