I am getting this error when trying to run this command sudo useradd -m splunk. Can anyone help?
The useradd command you tried to run failed (miserably ;-)) on the operating system level. Why? We have no idea - we don't know your setup, we don't know your environment, we are not your system's admins so we can't help you here.
In general - there is something wrong with your authentication and autorization subsystem. It's hard to tell whether it's the sudo that failed or the useradd comand itself. You have to call your admins for help to fix your system.