We have several administrators on our Debian servers and one has left our company. In leaving, he removed his own account. He was the first user on a bunch of our systems, so now any files that he created that were not in his home directory are owned by user 1000
. I have several questions regarding this situation:
Question 1
Was he right to delete his account completely? In doing so, Git repositories, websites we serve, config files, shared scripts, etc. are now all owned by user 1000
. I understand that a username is just an alias for a UID
, but this seems like an ugly situation on a server.
Question 2
I recently ran adduser
to add a new user account on the system and this user was granted ID 1000
. This is clearly a problem because this non administrator was made the owner of the shared files that the former admin had created.
How does adduser
determine which UID
to use? I know you can specify the UID
on the adduser
command line. I'm just wondering why it would be set up to use the lowest UID
.
Question 3
In general, what is the best practice for removing an administrator account from a server? We only allow public key ssh access to our server, so I thought it would be sufficient to remove the user's .ssh
directory and remove the user from any groups s/he belongs to. But, if you could provide me with the best practice for removing a former administrator's access to a server, that would be really great.
Question 4
What should we do now, given that the administrator has removed his account? Should I make his account again and assign it UID 1000
?