by Blackthorn » Fri Aug 17, 2018 7:42 pm
I’m sorry that you find that my question makes ABSOLUTELY no sense and my whole line of questioning EXTREMELY bizarre. I can only presume that you work in an environment where you can slap anything in to production without a tested and proven backout plan. Unfortunately I do not have that luxury. Either that or you work somewhere where everything is set up so perfectly in the first place that nothing ever needs changing, or everything has been documented to the n’th degree so there is never any room for uncertainty or ambiguity.
I am fully aware of what the PROTECTED attribute does. If I knew why the ID had a password in the first place then perhaps I wouldn’t be in this situation, but the reason for that, if there ever was one, is lost in the midst of time. Since you seem so keen on knowing all the ins and outs of the situation, the ID is a DB2 package owner and an authorisation call is made to RACF when the package is executed. As far as I can ascertain, that is it’s only use, there is no other evidence of any activity. We wish to protect it, as otherwise, were it to be revoked either accidentally or maliciously, those packages would fail to execute. But in order to get the change approved, we need a backout – and that means getting the password back to whatever it is now, not merely unprotecting it.
You’re suggestion about restoring the RACF database is really not viable. If we were making the change at a time when there was no activity and we could test it immediately then it might be, but the nature of the issue is such that if there were to be a problem, it would likely surface some time later. There must be a way, albeit not necessarily documented or supported, to get the encrypted password out of the database. In case anyone else comes across this issue, this is what we have found –
From reading the zSecure manual, it suggests that the R (Recreate) command in option RA.U can be used to generate all commands to recreate a user, including the current password. This example from the manual –
ckgracf field USER USR0001 set password(’E40B16EBE88BD808’X)
Initially we couldn’t get this to work, it was generating a password statement without a corresponding value, which means it will assign a random (and unknown) password. We then determined that accessing the RACF database directly rather than via the CKNSERVE task (in SE.1, blank out the ‘zSecure Node name’ field) will correctly generate the set password statement with the encrypted password value, assuming of course that you have read access to the RACF database. This can then be used to set the password back to it’s previous value when backing out the PROTECT.
Can I suggest in future, if you don’t know the answer to the question, as you clearly don’t in this case, that you just refrain from posting anything rather than critiquing the approach?