How to create a rule for changing a user field to a random string?
There is a (sandbox) module for it, which is the Rules Random module. Here is a quote about it (from the linked page):


  A simple rule action to generate either a random string or integer. Can define the length of the random result. For random strings, can also choose to include numbers and lowercase letters.


Either you just use that module, or you look at its source code to understand what it takes to include this logic in your own (custom) module.

With that, all that's needed is to create a custom rule like so:


Rules Event: use whatever event that fits your requirements (eg: After saving a new account).
Rules Condition: "Entity has field", related to your some_var field. That will make this field available for subsequent processing in Rules Conditions and/or - Actions.
Rules Action: Use the action provided by this module, to set a value for your some_var field.