2

@work (using Red Hat) we have the notion of npa users, these users are normally for services or applications (git, mysql, nginx etc) and these users can't login themselves. Only as a login authorized user you can sudo su to that user, using your own password:

sudo su - git

which brings me, after specifying my own password, to the git account without the need to specify or store a password for the git account. How can I get the same behaviour in Ubuntu?

3

Is a system user what you are looking for? You can create a new one with the following command

adduser --system --no-create-home USERNAME

This is the kind of account mysql uses. However, you cannot login into these accounts, even with sudo su - USERNAME. If you want to be able to login with su -, just create a new user without a password.

useradd USERNAME

He will not be able to login, only with sudo su - USERNAME.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.