LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   problem with useradd/userdel command on RHEL5 (https://www.linuxquestions.org/questions/linux-general-1/problem-with-useradd-userdel-command-on-rhel5-817164/)

smsahmed 06-30-2010 07:40 AM

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..

pixellany 06-30-2010 07:59 AM

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?

myposts 06-30-2010 10:35 AM

root?
 
Did you attempt it under root account? Make sure that you do it as s root user.

smsahmed 07-01-2010 12:58 AM

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...

pixellany 07-01-2010 11:35 AM

Quote:

Originally Posted by smsahmed (Post 4020134)
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

smsahmed 07-03-2010 01:41 AM

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..

pixellany 07-03-2010 05:47 AM

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.

smsahmed 07-03-2010 06:15 AM

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.

AlucardZero 07-03-2010 08:11 AM

What does /var/log/secure say?

smsahmed 07-04-2010 02:11 AM

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.