Is it possible to unset or change a
readonly variable in Korn Shell? I am using AIX 5.
Not that I know of. At least, the obvious ways won't work: you can't
unset a readonly variable or remove the readonly attribute with
typeset +r. This goes for all the ksh variants that I've seen, and for bash, but there are apparently ksh versions such as on AIX 4.3 that allow
typeset +r (which zsh also allows).
Technically, you can do this from outside: connect to the ksh process with a debugger and flip the bit in memory where the ksh process stores the information that the variable is read-only. So a readonly variable is not an absolute security feature.
If you need to set a variable to a different value before launching a command, do it through
readonly foo='some value' env foo='other value' mycommand
Alternatively, make the variable read-only in a restricted scope (in a function).