Here is a simple program to allow computer users to protect their programs and data when playing on a server.
This means that all users wishing to use the computer, must first enter the correct password.
To use this program, players must type the code below into the program 'startup' on the relevant computer.
By default, the password is 'computercraft', but this can be changed by typing "edit startup" after you have logged in using the old password. The username can also be changed using this method. You should change only the top two lines of code as you wish.


password = "computercraft"
Your_Name = "Player"


os.pullEvent = os.pullEventRaw	 //Prevents users terminating the program using Ctrl+T

function clearscreen()	 //A neater way to clean the screen in the same way every time
term.clear()
term.setCursorPos(1,1)
end

while true do
clearscreen()
write("This is ")
write(Your_Name)
print("'s personal computer.")
print("Please input the password to continue:")
term.setCursorPos(1,4)
pass = io.read()			  //Asks the user to enter the password
   if pass == password then	  //Checks the password given with the correct password
   clearscreen()
   write("Welcome, ")          //If the password is correct, the user is let in, and the program stops
   write(Your_Name)
   print(".")
   sleep(1)
   clearscreen()
   break
   else
   clearscreen()
   print("Incorrect password, Access denied.")	 //If the password is incorrect, the user is told so, and the program starts again
   sleep(2)
   end
end

Download: [attachment=352:startup.txt]

Anyone is free to use / edit this code, but not to claim it publicly as their own.