Index: [Article Count Order] [Thread]

Date:  Sun, 22 Apr 2007 03:18:37 -0400
From:  MuntadaNet Webmaster <webmaster (at mark) muntada.com>
Subject:  [coba-e:09654] Re: How to Clean Up Ghost Users
To:  coba-e (at mark) bluequartz.org
Message-Id:  <200704220721.l3M7LqeB003524 (at mark) huda.muntadanet.com>
In-Reply-To:  <1486c6440704212230w10c81631na4d7dd05a8364990 (at mark) mail.gmail.co m>
References:  <200704212327.l3LNRsPl026653 (at mark) huda.muntadanet.com> <1486c6440704212230w10c81631na4d7dd05a8364990 (at mark) mail.gmail.com>
X-Mail-Count: 09654

There is one user still showing up in that output that was deleted 
from the UI.  I am asking this because I am getting an error every 15 
minutes from the am_disk.pl job.  The line is pointing to $uid in my 
opinion although according to a forum post by Brian back in April of 
last year it is due to a bug and it is the $dev.  The error is:

Use of uninitialized value in subroutine entry at 
/usr/sausalito/swatch/bin/am_disk.pl line 348, <GEN1> line 27.

My thought was that if I could manually remove this user, perhaps 
this error message would go away finally.

After reading your thoughts below, I decided then what if I tried to 
recereate the three users I saw coming up in the output of the getent 
passwd that were supposed to be gone.  So I recreated the same exact 
site name, and then proceeded to recreate the users.  It should be 
noted that when I tried to create the users, it would take each user 
and then give me another add user screen and when that completed it 
gave me a listing of all of the users on the system but it still 
showed that I was in the same virtual site.  And when I went out and 
came back in, none of the users that I had created for the site were 
still there.  However, when I removed the site, the output from 
getent passwd still showed the users but when I ran am_disk.pl, the 
errors went away.  There were three errors and there were three users.

I am relating all of this so that hopefully someone who understands 
the system better can work the "bugs" out of this.

Thanks for the tip Adam, it seems to be the lead I needed to finally 
fixing this issue.

-Rashid

At 01:30 AM 4/22/2007, you wrote:
>You do not need to.  The db library will automatically overwrite the
>old/not used data as needed.  The users that were removed were removed
>form the index, and the actual underlying data is not removed.  As
>more records are added, they the internal structure of the DB file
>will overwrite the areas with the old data as needed.  This is similar
>to how a normal file system works.  When you delete a file, the
>reference to that file is removed from the file table, but the
>underlying data is not actually purged from the disk (unless you are
>using special file systems or other data scrubbing software).
>
>You can verify that the users are remove from the index by doing a
>'getent passwd' and looking at the list that is returned.
>
>-Adam
>
>On 4/21/07, MuntadaNet Webmaster <webmaster (at mark) muntada.com> wrote:
>>
>>  I did a:
>>
>>  strings /var/db/passwd.db
>>
>>  It returned users that were deleted.
>>
>>  How can I safely remove these users from the passwd.db?
>>
>>  -Rashid
>>
>>
>>*****************************************************************
>>  MuntadaNet Web Hosting and Web Design Services
>>  http://www.muntada.com
>>
>>  Sales - sales (at mark) muntada.com
>>  Support - support (at mark) muntada.com
>>  Billing - billing (at mark) muntada.com
>>
>>  Main Office - 808-689-6092
>>  Fax - (808) 356-0279
>>*****************************************************************
>>
>>
>>
>>*****************************************************************
>>MuntadaNet Web Hosting and Web Design Services
>>  http://www.muntada.com
>>
>>Sales - sales (at mark) muntada.com
>>Support - support (at mark) muntada.com
>>Billing - billing (at mark) muntada.com
>>
>>Main Office - 808-689-6092
>>Fax - (808) 356-0279
>>*****************************************************************
>
>
>--
>-----------------------------------------------------------------
>Shroom.net Donation Based Web Hosting
>http://www.shroom.net/
>-----------------------------------------------------------------

*****************************************************************
MuntadaNet Web Hosting and Web Design Services
http://www.muntada.com

Sales - sales (at mark) muntada.com
Support - support (at mark) muntada.com
Billing - billing (at mark) muntada.com

Main Office - 808-689-6092
Fax - (808) 356-0279
*****************************************************************