Posted 07 August 2012 - 02:18 PM
On the two tekkit servers I play, I tend to be "incharge" of the CC setups for people. When they request a passworded door, I tend to veer away from them telling me the password, as it could look bad if they ever get griefed.
I like to use the following script, saved generally as "pwset" or "setpw". In the example, it is named "pwset"
This works for me every time.
I like to use the following script, saved generally as "pwset" or "setpw". In the example, it is named "pwset"
-- I like to call this program "pwset" or to that effect
term.clear()
term.setCursorPos(1,1)
print("Please enter your desired password: ")
pw1 = read("*") -- For the newbies, this will make the text appear as *s rather than letters
sleep(1)
print("Please confirm your password: ")
pw2 = read("*")
sleep(1)
if pw1 == pw2 then
os.setComputerLabel(pw2)
os.reboot()
else
print("Passwords did not match. Please try again")
shell.run("pwset")
end
-- I like to use ComputerLabel as the password because it stays set even after the reboot, and is the simplist form I know. Even if someone managed to see the startup code, they would not see a password.
This works for me every time.