2

I tried this command

root@node1:~# usermod -l node1admin serveradmin -d /home/node1admin -m
Usage: usermod [options] LOGIN

It keeps saying I have wrong command. The help provides only the options, doesn't really tell me the format. But where is the problem?

4

Assuming you're trying to change serveradmin's name to node1admin, use this instead:

usermod -l node1admin -m -d /home/node1admin serveradmin

In particular, the name of the user account you're operating on should be last, as the general syntax for usermod is:

usermod [options] LOGIN
2

As the usage line explains, the current username (LOGIN) must be the last argument of the command.

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.