I’m having this same problem, but the above doesn’t work. When I do the su - asterisk -c “gpg --refresh-keys --keyserver pgp.mit.edu” I get “This account is currently not available.” Any other suggestions?
As ‘root’ (which is how you should have logged in), you shouldn’t get an error when you run ‘su -m’. Also, the error when you executed the ‘su’ was that the file .bashrc was not owned by root. This is ridiculous, since root doesn’t have ownership limitations. One of the points of using ‘root’ is that, as root, you own the entire system.
This line has a similar problem. The system is claiming that, as root, you don’t own root’s home directory. There is something seriously wrong at this point.
Finally, when making updates to the password system in most Unix systems, it is generally preferable to use the program ‘vipw’. That makes sure that all of the shadow password files get updated as well. Yes, it requires you to understand the syntax of the ‘vi’ program, but that shouldn’t be too big a challenge.