View Single Post
Old 11-22-2017, 11:52 AM   #2
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Unable to login as root after an Amazon update

Which sort of makes having serial port access useless until you fix it via 'diags'.

Instead, use this script at the top of visible USB storage and call it with:
;log runme

File must be named: RUNME.sh (case is important, at least for now) an MUST use *nix line endings, not Windows line endings.
Code:
#!/bin/sh

# Disable passwd for 'root'
cp /etc/passwd /mnt/us/passwd-frm
sed "s/^root:[^:]*:/root::/" </mnt/us/passwd-frm >/mnt/us/passwd-to

mntroot rw
cp /mnt/us/passwd-to /etc/passwd
mntroot ro
You will notice that I am keeping a "before" and an "after" copy of the password file on USB storage.
Just in case the result of this script needs trouble shooting.
(So how bad can things get? You can't log in now, at the worst you can't log in afterward. )

When faced with the login prompt, for user enter: root
If asked for the password, just enter: enter (return key, a blank line).

Edit:
Worked just fine on my PW3-5.9.2
Before:
Code:
root:x:0:0:root:/tmp/root:/bin/sh
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:100:sync:/bin:/bin/sync
operator:x:37:37:Operator:/var:/bin/sh
sshd:x:103:99:Operator:/var:/bin/sh
messagebus:x:92:92:messagebus:/bin/false
nobody:x:99:99:nobody:/tmp:/bin/sh
default:x:1000:1000:Default non-root user:/dev/null:/bin/sh
framework:x:9000:150:Framework User:/tmp/framework:/bin/sh
guestuser:x:1002:1001:Guest user:/tmp/guestuser:/bin/sh
After:
Code:
root::0:0:root:/tmp/root:/bin/sh
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:100:sync:/bin:/bin/sync
operator:x:37:37:Operator:/var:/bin/sh
sshd:x:103:99:Operator:/var:/bin/sh
messagebus:x:92:92:messagebus:/bin/false
nobody:x:99:99:nobody:/tmp:/bin/sh
default:x:1000:1000:Default non-root user:/dev/null:/bin/sh
framework:x:9000:150:Framework User:/tmp/framework:/bin/sh
guestuser:x:1002:1001:Guest user:/tmp/guestuser:/bin/sh
Note to self: Bridge passwd and shadow files across Amazon updates or do this fix-up in the bridge code.

Last edited by knc1; 11-22-2017 at 12:50 PM.
knc1 is offline   Reply With Quote