I have two users
tomcat neither of them have a password.
How can I allow
dev 1 do
su - tomcat without having him having to enter any credentials?
1 connects with ssh keyfile
You have sudo added to your tags. In your sudoers file, you can add dev to allowed users and, if you wish, restrict which commands they're allowed to run, and that password isn't required. Then all they'd have to do is type "sudo su - tomcat".
There's lots more information and examples in the man file for sudoers.
If what you want is to allow
This is how I ended up doing it.
I created the file
changed the file permissions with
created an alias in dev's
This results in the ability for the dev user to become the tomcat user without either having to type (or indeed having) a password ever by typing