Simplicity is a form of art...

Getting su to work in init scripts
by Sven Vermeulen, post on Mon 14 September 2015

While developing an init script which has to switch user, I got a couple of errors from SELinux and the system itself:

~# rc-service hadoop-namenode format
Authenticating root.
 * Formatting HDFS ...
su: Authentication service cannot retrieve authentication info
(Ignored)