Don't know what happend really. I changed the root password to a long password containing weird characters, and triple checked that I could log in with it, and has been ever since. Until now.

I think the bad character is a ’. How do I enter that in Putty? When I paste the password in Putty, that character and some other are removed/moved. I've set UTF-8 under Window>Translation.

Update: locale returns the following.

LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

I've (falsely) assumed it was using UTF-8.

Is there a way to make su read the password from a file?

Update 2: I created two files using Notepad++; ansi.txt and utf8.txt. Both containing the string abc’def

cat ansi.txt prints abcdef
cat utf8.txt prints abcâdef

link|improve this question

feedback

4 Answers

If the "special" character is in fact an accent char (like ' or ```), I could imagine that your current input method converts this character followed, say, by a vowel into an accented char. Entering ' and e on a German keyboard, e.g., will in many cases result in é, similar for ```` and u resulting in ù. You could try to enter a space directly after the "special" character to prevent such a conversion. No guarantee, just a guess. (And I hope this answer will appear as I see it now in the preview. ;-))

link|improve this answer
When I enter '[space], the row transforms into (arg: 4). I can't enter any characters like åäö, Putty just chimes angrily at me. I've updated the question – Znarkus Oct 3 '10 at 23:52
feedback

Try to copy and paste that character into the shell.

link|improve this answer
I've only got access to a web console, and it doesn't support Unicode characters – Znarkus Oct 3 '10 at 23:30
@Znarkus - it sounds like you're using SliceHost. I would stop by chat.sliehost.com if that's the case. They're really helpful. – orokusaki Oct 4 '10 at 2:55
feedback

Try

#!/bin/sh
su - << _EOF_
password goes here
_EOF_

Put it in a file tmpPassFix then run

chmod +x tmpPassFix
./tmpPassFix

Untested may or may not work. This is assuming you can get password into the "tmpPassFix" file above. I don't know much about encodings, but if you can get it in windows you could do the above and then winscp it over, providing the script works.

link|improve this answer
su: must be run from a terminal unfortunately it did not work – Znarkus Oct 4 '10 at 6:24
feedback
up vote 0 down vote accepted

Rackspace actually has a Reset Password button. Go to Hosting>Cloud Servers>[Your server] and click the life saving button.

Be aware that it reboots the server, so open the Console and monitor that the system comes online again fine.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.