removing mysql with apt doesn't delete user mysql

Bug #753605 reported by Enrique
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.1 (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

 I installed mysql-5.1 and later on I wanted to remove it. When I purged it, the mysql user is still in my /etc/passwd. I think that the user has to be removed, to leave the system in the same status as before.

 It can be reproduced with the following commands:
apt-get install mysql-server
apt-get purge libdbd-mysql-perl libdbi-perl libhtml-template-perl libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-server mysql-server-5.1

 After that, the user mysql appears at the end of /etc/passwd, which shouldn't.
 Also, the group mysql should be removed, if contains no other users.
I am using Ubuntu 10.04 TLS

 Regards

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

From a security point of vue, removing a user isn't a good idea. There could be files in the filesystem that are leftover with the mysql user UID, and if the mysql user is deleted, the UID may be reassigned, rendering those files visible to the new user.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Enrique, Marc is correct, removing the user is not necessarily a good idea.

The requirements of a "purge" of the package don't actually necessitate this, we just need to clean up the files that were added. Users and groups are a special case where we're even allowed to modify the system state, and likewise, allowed to not return it to before.

I'm going to mark this bug as Opinion, in hopes that those with differeing opinions might see it and comment.

Changed in mysql-5.1 (Ubuntu):
status: New → Opinion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.