[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] RaQ4-View all site usernames/passwords



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Is there a way to view all site usernames and passwords on a RaQ4?
> Similiar to Plesk where you issue mySQL a command as root to select
> certain database tables and it spits back all the usernames and
> passwords formatted in a nice table? There has to be a way to do
> this with PostgreSQL.

The passwords are only stored (encrypted) in /etc/passwd- (shadow 
file), so you'd have to parse that with a root-permission script, but 
you wouldn't get any meaningful passwords that way...

PostgreSQL has all the username info ('full' name and 'login name'), 
by site, in the 'users' table of the 'cobalt' database though. The 
'users' table schema is:

cobalt=# \d users
          Table "users"
 Attribute |   Type    | Modifier
- -----------+-----------+----------
 name      | text      | not null
 type      | text      |
 vsite     | text      |
 fullname  | text      |
 altname   | text      |
 aliases   | text      |
 forward   | text      |
 quota     | integer   |
 uid       | integer   |
 admin     | boolean   |
 apop      | boolean   |
 fpx       | boolean   |
 shell     | boolean   |
 suspend   | boolean   |
 vacation  | boolean   |
 modify    | timestamp |
Index: users_pkey

You'd have to connect to 'cobalt', then do a

SELECT vsite, name, fullname FROM users ORDER BY vsite, name;

- -- 
Bruce Timberlake

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+FiEpvLA2hUZ9kgwRAjB4AJ49SPmwWhQjHk1bOJCzP9JvbEDJ/ACZAXP4
g5iWQkqfCYruQ0QsfuxF+X4=
=4YBB
-----END PGP SIGNATURE-----