0

How do I add a user similar to this in Solaris (disable password, login and no home page) for service account.

adduser --system --ingroup group-name --disabled-password --disabled-login -no-create-home user-name
2

"adduser" is typically a Linux thing, but if you look at the other Shadow utils -- passwd, useradd, usermod -- they should be similar enough. Shadow (what's in Linux ...) was based on SVR1, which is what I had access to when I started writing it in 1987. "useradd" needs the "-m" option to handle the home directory, so don't supply that. And "passwd -l" locks the password by inserting an invalid character in the password field.

What you want to avoid is "chage" since that's something I made up. Even if it is a handy something.

|improve this answer|||||

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.