PDA

View Full Version : Help Tivo Password


cravens
10-22-2005, 08:54 PM
I thought that a good first little project would be to figure out a tivosh script that reads and sets the tivo password. The following script works perfectly to read the password from /State/LocksLimits. However, I run into problems when I attempt to set the password to a new password. The script does in fact change /State/LocksLimits/Password to the new password. But when I actually go to my Tivo and check the password using my remote, I find that the password has not actually been changed on the box.

Can anyone help shed some light on this? Is there some extra step that I need to do so that the Tivo updates its state from the mfs database? Any help would be greatly appreciated.

Here is the script that I wrote:

global db argv

set db [dbopen]

if { [lindex $argv 0] == "-s" } {
set newpassword [lindex $argv 1]
RetryTransaction {
set locks [db $db open "/State/LocksLimits"]
dbobj $locks set Password $newpassword
set password [dbobj $locks get Password]
}
puts "Set Password: $password"

} else {


RetryTransaction {
set locks [db $db open "/State/LocksLimits"]
set password [dbobj $locks get Password]
puts "Current Password: $password"
}
}

JJBliss
10-23-2005, 12:02 AM
Try adding the line in red


global db argv

set db [dbopen]

if { [lindex $argv 0] == "-s" } {
set newpassword [lindex $argv 1]
RetryTransaction {
set locks [db $db open "/State/LocksLimits"]
dbobj $locks set Password $newpassword
set password [dbobj $locks get Password]
dbobj $locks remove "CompressedFile"
}



Can't swear to it, 'cause I haven't slept in 5 days, but give it a shot

cravens
10-23-2005, 03:05 AM
Thank you very much for the response. I tried adding that line to the script but it didn't work. I did a search on "compressedfile," and based on what I read (i don't understand it all yet) it looks like a reboot might be necessary before changes to string resources take effect? Is that correct?

I hope not because I'm trying to figure out a way to make changes to the lockslimits on the fly without rebooting. Any idea if this is possible?

JJBliss
10-23-2005, 01:07 PM
Thank you very much for the response. I tried adding that line to the script but it didn't work. I did a search on "compressedfile," and based on what I read (i don't understand it all yet) it looks like a reboot might be necessary before changes to string resources take effect? Is that correct?

I hope not because I'm trying to figure out a way to make changes to the lockslimits on the fly without rebooting. Any idea if this is possible?

MFS information is loaded into memory at boot. The data you're changing exists in the database, not active. In order to make the changes effective, they need to be loaded, therefore a reboot.

There's nothing different in your script then in bufferhack > 3.x and any other MFS manipulation script that requires a reboot.

The short answer is, reboot.