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"
}
}
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"
}
}