sudo usermod -e 2011-10-22 -u username1 usermod: invalid user ID 'username1' -> A bug?

Asked by Khlood Elsayed

1) lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10

2) apt-cache policy passwd
passwd:
  Installed: 1:4.1.4.2+svn3283-3ubuntu2
  Candidate: 1:4.1.4.2+svn3283-3ubuntu2
  Version table:
 *** 1:4.1.4.2+svn3283-3ubuntu2 0
        500 http://eg.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages
        100 /var/lib/dpkg/status

3) I am trying to create and enable a user exclusively via the command line (please no suggestions to use the GUI :D). All of the following commands were successful except the last one:

sudo useradd username1

sudo adduser username1 username1

sudo smbpasswd -a username1

sudo usermod -e 2011-10-22 -u username1
usermod: invalid user ID 'username1'

However, according to the User and Groups GUI username1 is a valid user but is disabled. Is this a bug or am I missing something?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu shadow Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

-u uses the UID of the user, not the name. Check the man page

Revision history for this message
Khlood Elsayed (khlood-elsayed) said :
#2

Thanks actionparsnip, that solved my question.