Article ID: 121516, created on May 9, 2014, last review on May 10, 2014

  • Applies to:
  • H-Sphere 3.6.3

Symptoms

Logical Web Server can not be deleted due to the fact that in the "Usage" section "User accounts" are counted and it is > 0 notwithstanding the fact that all accounts have been deleted from this server.

Cause

Redundant records still present in DB.

Resolution

H-sphere makes the following request to count users on the server:

SELECT count(*) FROM unix_user  WHERE hostid = <l.server ID>;   

Make sure no accounts still exist from the list of the request above.

hsphere=# SELECT * FROM unix_user  WHERE hostid = 23;
  id  |  login   | group_name |  password  | user_id |             dir
------+----------+------------+------------+---------+--------------------------
 1940 | destroy  | destroy    | ********** |     505 | /hsphere/local/home/destr
 1835 | resell   | resell     | ********** |     504 | /hsphere/local/home/resel
 1801 | resuser  | resuser    | ********** |     503 | /hsphere/local/home/resus
 1520 | wwwuser  | wwwuser    | ********** |     502 | /hsphere/local/home/wwwus
(4 rows)


hsphere=# select * from users where id IN (505, 504, 503, 502);
 id | username | password | reseller_id
----+----------+----------+-------------
(0 rows)

Make H-shpere DB backup:

-bash-3.2$ pg_dump hsphere > hsphere.sql

Delete redundant records from unix_user table:

hsphere=# DELETE FROM unix_user WHERE hostid = <l.server ID>;   

Restart H-sphere service:

service httpdcp restart   

Search Words

User accounts

Usage

6b908665c0d1eca5bdd0141a32fd712a 6311ae17c1ee52b36e68aaf4ad066387 f213b9fa8759d57bee5d547445806fe7 2e39a5e5b1423cc126cf735bac076008

Email subscription for changes to this article
Save as PDF