I take back the part about /etc/passwd. If we take the standards as any indication of portability, useradd is in the LSB, but /etc/passwd is not really specified (although it's mentioned) so it should be plenty portable. Also, sudo is not mentioned at all. But instead, you could add the options "-u 0 -o" to useradd to create an account that is an alias to root. http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/useradd.html