Update Linux User Info

At some point, you might want to update user's information apart from encrypted passwords. This section guides you on how to update Linux user info in an operating system.

Update User Info

There are many ways to update the user info. However, the most effective (yet very risky) way is to update the /etc/passwd manually.

Update /etc/passwd Manually

In this case, you want to update it manually inside /etc/passwd file. For a full info, it is:

testo:x:1001:1001:Testo,0,012-3456789,03-45678912,supervisor floor B1:/home/testo:/bin/bash

This is interpreted as:

  • (disallowed for changing) username = testo
  • (disallowed for changing) password field = x
  • (disallowed for changing) user specific group ID = 1001
  • (disallowed for changing) user group ID = 1001
  • full name = Testo
  • room number = 0
  • work phone = 012-3456789
  • home phone = 03-45678912
  • Other = supervisor floor B1
  • (disallowed for changing) Home directory = /home/testo
  • (disallowed for changing) Login executable = /bin/bash

You should change the allowed fields them accordingly without removing any colon (:) or comma (,). Also, for obvious reasons, you can' t supply those symbols as values as well.

For those disallowed fields, there are other dedicated implementations for updating them. Hence, DO NOT mess with them.

That's all for updating user info.