useradd problem with UID calculation
I am having problems with the useradd command. When I call "useradd someuser" the program starts and never finish. When I give the UID option (useradd -u ) sometimes it works properly, but with some UID's that aren't in /etc/passwd it shows a message saying that the uid is not unique. I checked out /var/log/auth.log and nothing about the command is being logged.
It seems that the command is not calculating the new UID prperly. My someone help me? It's running on a Debian Linux 2.6.26-2-686 i686 GNU/Linux Thank you, and sory for my bad english. |
Are you connected to NIS? LDAP? What's in /etc/nsswitch.conf ?
|
The server is in my work. I'll check on monday.
Thanks. |
cat /etc/nsswitch.conf
# /etc/nsswitch.conf # # Example configuration of GNU Name Service Switch functionality. # If you have the `glibc-doc-reference' and `info' packages installed, try: # `info libc "Name Service Switch"' for information about this file. passwd: compat ldap group: compat ldap shadow: compat hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis How can I know the server is connected to NIS or LDAP? If its connected to LDAP, the uid must be unique considering the LDAP database? What the "compat" word in password, group and shadow means? Thank you, and sory for the big ammount of questions. |
It seems that the problem is really related with nsswitch.conf file. I removed the word "ldap" from file and now "adduser" is adding the user normally, but when I add the parameter "-u 200" it's still displaying the error saying that the UID is not unique.
|
:redface: After I removed the word "ldap" from the nsswitch.conf file I should have restarted the server. Everything is working now.
Thank you AlucardZero. |
All times are GMT -5. The time now is 10:12 AM. |