Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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
share|improve this answer
    
Thank you it works ! –  user1012451 Jul 31 '12 at 4:21

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

share|improve this answer
    
Thanks. It works :)))))))))))) –  user1012451 Jul 31 '12 at 4:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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