Trouble Creating User/ Changing Password
Having trouble creating user, specifically editing the password for it...
I am using the command shell in the webmin interface, I just need to create a different user so I can run a teamspeak server, it won't run the server as root, I am new to linux obviously so please be as specific as possible when explaining how to change the password. Thanks! Operating system: Redhat Linux Fedora 8 Webmin version: 1.400 I create a user "ts" and when I type "passwd ts" it says: New UNIX password: New UNIX password: New UNIX password: passwd: Authentication information cannot be recovered Changing password for user ts. Then I enter the password I want... 1234 (press enter) now it says: >1234 bash: 1234: command not found |
What happens when you run "su ts" ?
|
there isnt an error, su ts seems like it works, but it never said "user created" and i think thats because i never set the password
but when i do use su ts and then start the teamspeak server, it still says for security reasons dont start as root, and then fails to start |
Well. try "su - ts" not to leave traces of your orgignal root session in the environment/"real uid"
|
How did you add the user?
If the user ts is already created you can log in as root (in a terminal) then give the command passwd ts you will be prompted for the new passwd enter the new passwd press enter, you will be asked to enter it again press enter. |
i type: adduser ts
it doesnt prompt me for the password, so i type passwd ts then it says New UNIX password: New UNIX password: New UNIX password: passwd: Authentication information cannot be recovered Changing password for user ts. so then i type a password i want "1234" and press enter and it says: >1234 bash: 1234: command not found |
So, check if "su - ts" lets you run teamspeak server, and also check if there is a /etc/passwd line for ts.
|
after doing su - ts the server still will not start, i don't think there is a /etc/passwd line for the user ts, but i might not have checked the right way
|
Well, if there is no /etc/passwd line mentioning user ts, the user was not added successfully, I am afraid.. Can you just login to the server using normal ssh? And I thought webmin had a specialized user management module, it could work better, too.. It looks like useradd didn't have a chance to convey its error message to you..
|
When I type adduser ts then press enter, what do i do next? Do i type the password i want and press enter? Is this correct? I might just be so stupid I'm doing it wrong, that's what I assume...
|
As suggested above, check your /etc/passwd file to see if you do in fact have a user "ts" there. If you don't you will have to add it. If you do you just need to add password.
As root in terminal to add a user: "adduser ts", hit enter, type "passwd ts", you will be prompted for a password (twice). Enter it. I would check after entering the "adduser ts" to see if it shows up in /etc/passwd. |
theres no /etc/passwd file
when i type "passwd ts" and press enter it says: New UNIX password: New UNIX password: New UNIX password: passwd: Authentication information cannot be recovered Changing password for user ts. then i type the password i want, which for example is 1234, and press enter and it says > 1234 bash: 1234: command not found the whole thing looks like this ... > passwd ts New UNIX password: New UNIX password: New UNIX password: passwd: Authentication information cannot be recovered Changing password for user ts. > 1324 bash: 1234: command not found basically, its not letting me answering the password.... or im doing something wrong |
when i start the server i type this and heres what happens...
> cd /home/ts/tss2_rc2 > ./teamspeak2-server_startscript start WARNING ! For security reasons we advise: DO NOT RUN THE SERVER AS ROOT !!!!!!!!!!! starting the teamspeak2 server Error starting daemon. Aborted |
it's odd that it repeats "New UNIX Password" three times like that... but it's VERY odd that you don't have an /etc/passwd file. if that file doesn't exist you should not be able to log in to the system at all. can you copy and paste the following commands please? and then post the output.
ls -al /etc/passwd ls -al /etc id which adduser which passwd |
> ls -al /etc/passwd
-rw-r--r-- 1 root root 988 Apr 6 20:05 /etc/passwd > ls -al /etc total 816 ...theres a lot of stuff here, it all says "root root" in it, theres not "ts" anywhere... do you need each of these things? > id uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) > which adduser /usr/sbin/adduser > which passwd /usr/bin/passwd Thanks. |
You want to
cat /etc/passwd | grep ts Are you trying to add the user, change the password, etc. as root or some other user? |
ok, so the /etc/passwd file exists, and the permissions look ok. try what billymayday suggested, and post the output. also, try this, and post the output:
Code:
/usr/sbin/useradd -p password ts |
I rebuilt the VPS from fedora core to debian, now when I try to change the password I get a slightly different error message, which reveals a bit more of the problem I believe....
> passwd ts Enter new UNIX password: Retype new UNIX password: No password supplied Enter new UNIX password: Retype new UNIX password: No password supplied Enter new UNIX password: Retype new UNIX password: No password supplied passwd: Authentication token manipulation error passwd: password unchanged I have contacted my hosting provider asking if this is a problem with the server that they have to fix, any ideas? |
> cat /etc/passwd | grep ts
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh ts:x:1000:1001::/home/ts:/bin/bash > /usr/sbin/useradd -p password ts useradd: user ts exists > cat /etc/passwd | grep ts gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh ts:x:1000:1001::/home/ts:/bin/bash |
OK, it looks like for some reason the system is receiving repeated "enter" characters. Normally it should pause every time it prompts you to "Enter new UNIX password:". You enter a password (although nothing shows up on the screen for security reasons), it prompts you to re-enter it to make sure you didn't make a typo, and then it says authentication tokens changed or something like that. If you are not hitting enter, then something is screwed up. It seems like there would be other symptoms though...
As a workaround, you could delete the new user like this: Code:
/usr/sbin/userdel ts Code:
/usr/sbin/useradd -p password ts |
All times are GMT -5. The time now is 10:22 AM. |