How to look for dsabled user in the database

Hi All

I know how to look for disabed user in the RT gui. But how do I look for the
same in the rt3 database ? What flag should I look for ?

I dod a select * from Users where name=‘testuser’ \G but did not see anything
different with this disable user from a user with privilege rights to access
webrt.

I am trying to compile a mailing list of valid users who have access to the
webrt

Please help

Thanks

Asif Iqbal
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x8B686E08
There’s no place like 127.0.0.1

Asif Iqbal wrote:

Hi All

I know how to look for disabed user in the RT gui. But how do I look for the
same in the rt3 database ? What flag should I look for ?
select u.Name from Users u, Principals p where u.id = p.id and
p.Disabled = 1 and p.PrincipalType = ‘User’;

Asif Iqbal wrote:

Hi All

I know how to look for disabed user in the RT gui. But how do I look for the
same in the rt3 database ? What flag should I look for ?
select u.Name from Users u, Principals p where u.id = p.id and
p.Disabled = 1 and p.PrincipalType = ‘User’;

Excellent !! Thank you so much

Asif Iqbal wrote:

Hi All

I know how to look for disabed user in the RT gui. But how do I look for the
same in the rt3 database ? What flag should I look for ?
select u.Name from Users u, Principals p where u.id = p.id and
p.Disabled = 1 and p.PrincipalType = ‘User’;

I noticed if I choose p.Disabled = 0 it actually picks up the users whose
account has “Let this user be granted rights” unchecked. Is there anyway to
avoid that ?

I like to grep only the users whose account in Access control box has both of
the follwoing options must be checked

“Let this user access RT”
“Let this user be granted rights”

Something like this:

select EmailAddress from Users where “Let this user access RT” = 1 and “Let this
user be granted rights” = 1

Would you et al. know what mysql statement(s) would accomplish that ?

Thanks a lot

  • Asif

Asif Iqbal wrote:> On Fri, 24 Oct 2003, Asif Iqbal wrote:

On Thu, 23 Oct 2003, Ruslan U. Zakirov wrote:

Asif Iqbal wrote:

Hi All

I know how to look for disabed user in the RT gui. But how do I look for the
same in the rt3 database ? What flag should I look for ?

select u.Name from Users u, Principals p where u.id = p.id and
p.Disabled = 1 and p.PrincipalType = ‘User’;

I noticed if I choose p.Disabled = 0 it actually picks up the users whose
account has “Let this user be granted rights” unchecked. Is there anyway to
avoid that ?

I like to grep only the users whose account in Access control box has both of
the follwoing options must be checked

“Let this user access RT”
“Let this user be granted rights”

Something like this:

select EmailAddress from Users where “Let this user access RT” = 1 and “Let this
user be granted rights” = 1

Would you et al. know what mysql statement(s) would accomplish that ?

Thanks a lot

  • Asif

Slightly harder:

select distinct u.* from Users u, Principals p, Principals p1, Groups g,
CachedGroupMembers cm where u.id = p.id and p.Disabled = 0 and
p.PrincipalType = ‘User’ and g.Domain = ‘SystemInternal’ and g.Instance
= ‘’ and g.Name = ‘’ and g.Type = ‘Privileged’ and p1.id = g.id and
cm.MemberId = p.id and p1.id = cm.GroupId;

:slight_smile:

Something like this:

select EmailAddress from Users where “Let this user access RT” = 1 and “Let this
user be granted rights” = 1

Would you et al. know what mysql statement(s) would accomplish that ?

Thanks a lot

  • Asif

Slightly harder:

select distinct u.* from Users u, Principals p, Principals p1, Groups g,
CachedGroupMembers cm where u.id = p.id and p.Disabled = 0 and
p.PrincipalType = ‘User’ and g.Domain = ‘SystemInternal’ and g.Instance
= ‘’ and g.Name = ‘’ and g.Type = ‘Privileged’ and p1.id = g.id and
cm.MemberId = p.id and p1.id = cm.GroupId;

:slight_smile:

Thats perfect. Thanks a million