I want to create a user(say,
hera) that can only be used in terminal. That is this user does not appear in the Mac welcome screen. This user can be
su - hera by other users.
Can I do this and how?
I echo the comments above. I'm not sure why you would want to bother hiding the user, why not just have a single admin account, making everyone else "standard" accounts and use sudo in the CLI (Command Line Interface - "Terminal.app") if you need to.
Anyway, here is the Apple tech article on creating hidden users and/or just hiding users from the login window:
Hope that helps.