Logs in a user and returns a SessionID that can be used for authentication. To send the session ID to a file, the arguments -o and -of must be specified before the username and password. The usage of -o and -of options is shown inTable 1–1
Table 14–25 Result of the udb.login Command| 
 Argument  | 
 Syntax  | 
 Description  | 
|
|---|---|---|---|
| 
 u  | 
 Required  | 
 String  | 
 The username  | 
| 
 p  | 
 [O/R]  | 
 String  | 
 The plaintext user password; required if the encoded password is not available or supplied.  | 
| 
 ep  | 
 [O/R]  | 
 String  | 
 The encoded user password; required if the plaintext password is not available or supplied.  | 
| 
 result  | 
 SessionID  | 
 The session ID  | 
|
This example demonstrates how to save a session ID for reuse.
serialized
sessionid
# cr_cli -cmd udb.login -o serialized -of sessionid -u admin -p admin  | 
This command logs out the user who runs it. To logout from a session using the CLI command cr_cli, the —s (session id) argument needs to be specified. The session id is returned after a successful execution of udb.login command. Please refer to the udb.login command on how to save a session id to a file.
# cr_cli -cmd udb.logout -s session_id  | 
The —s parameter is not required if the command is run inside a Jython shell (clij).
This command returns the owner of the current session.
Table 14–26 Result of the udb.whoami Command| 
 Result  | 
 Syntax  | 
 Description  | 
|---|---|---|
| 
 result  | 
 UserID  | 
 The current user ID  |