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?

user1012451
  • 3,135

2 Answers2

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
Eliah Kagan
  • 117,780
2

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

geirha
  • 46,101