5.2. Querying Users

To display user information, use the command glsuser:

glsuser [-A | -I] [—show attribute_name[,attribute_name...]...] [—showHidden] [—showSpecial] [-l | —long] [-w | —wide] [—raw] [—debug] [-? | —help] [—man] [—quiet] [[-u] user_pattern]

Example 5-2. Listing all info about active users

$ glsuser -A

Name Active CommonName       PhoneNumber    EmailAddress     DefaultProject Description 
------ --------- ------------------------ --------------------- ------------------------ --------------------- ---------------- 
amy  True   Wilkes, Amy      (509) 555-8765 amy@western.edu                                          
bob  True   Smith, Robert F. (509) 555-1234 bob@western.edu        
        

Example 5-3. Displaying bob's phone number

$ glsuser —show PhoneNumber bob —quiet

(509) 555-1234
        

Example 5-4. Listing all user names without the header

$ glsuser —show Name —quiet

amy
bob
        

Example 5-5. Listing a user's projects

$ glsuser —show Projects amy -l

Projects  
------------- 
chemistry 
biology