LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trouble Creating User/ Changing Password (https://www.linuxquestions.org/questions/linux-newbie-8/trouble-creating-user-changing-password-633508/)

beantier 04-06-2008 03:22 PM

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

raskin 04-06-2008 03:50 PM

What happens when you run "su ts" ?

beantier 04-06-2008 04:00 PM

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

raskin 04-06-2008 08:13 PM

Well. try "su - ts" not to leave traces of your orgignal root session in the environment/"real uid"

mrrangerman 04-06-2008 08:52 PM

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.

beantier 04-06-2008 10:58 PM

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

raskin 04-07-2008 12:33 AM

So, check if "su - ts" lets you run teamspeak server, and also check if there is a /etc/passwd line for ts.

beantier 04-07-2008 09:20 AM

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

raskin 04-07-2008 01:04 PM

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

beantier 04-07-2008 06:40 PM

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

yancek 04-07-2008 07:46 PM

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.

beantier 04-08-2008 08:40 PM

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

beantier 04-08-2008 08:44 PM

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

mcd 04-08-2008 10:14 PM

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

beantier 04-08-2008 11:14 PM

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

billymayday 04-08-2008 11:22 PM

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?

mcd 04-08-2008 11:28 PM

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
then do what billymayday suggested again, and post the output.

beantier 04-08-2008 11:57 PM

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?

beantier 04-09-2008 12:00 AM

> 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

mcd 04-09-2008 09:42 AM

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
And then try this again:

Code:

/usr/sbin/useradd -p password ts
That should work. Instead of typing "password", put in whatever you want the password to be.


All times are GMT -5. The time now is 10:22 AM.