Wednesday, 1 February 2012

Linux - Manually and automatically adding system users


Please view this link for an indepth guide on how to add system users to /etc/passwd
http://floppix.ccai.com/adduser.html

Please Note

[root@server seantest]# passwd seantest
Changing password for user seantest.
passwd: Authentication token manipulation error


If u are running shadowed passwords there might be no entry for this user.


1. Make a backup of /etc/shadow
Code Snippet
  1. cp /etc/shadow /etc/shadow.backup
End of Code Snippet

2. Delete /etc/shadow
Code Snippet
  1. rm /etc/shadow
End of Code Snippet

3. Convert /etc/passwd using password convert
Code Snippet
  1. pwconv
End of Code Snippet


And the same for groups...

1. Make a backup of /etc/gshadow
Code Snippet
  1. cp /etc/gshadow /etc/gshadow.backup
End of Code Snippet

2. Delete /etc/gshadow
Code Snippet
  1. rm /etc/gshadow
End of Code Snippet

3. Convert /etc/group using group convert
Code Snippet
  1. grpconv
End of Code Snippet

No comments: