Reputation: 1281
On Python, I was wondering if there was a simple way to create a text file which can't be edited by the user and can only be edited once, by the computer.
I want to use this so that I can make a User ID for a user that cannot be changed. Does anyone have a solution?
Upvotes: 2
Views: 1798
Reputation: 3485
If there is any security reason why the UserID shouldn't be changed then you need to store the information on your own server.
If you don't want it to be easy, but don't mind it being possible, then you could either change the file permission on the file, encrypt the file in some way so that it's not easy to edit by the user, or hide it by prefixing the name with a .
so that it doesn't automatically appear in the explorer window.
Upvotes: 1