Creating a New Session#

$ keyctl new_session

Displaying Session Keyring#

$ keyctl show
Session Keyring
 995212359 --alswrv      0     0  keyring: _ses
 869008619 --alswrv      0     0   \_ user: testuser

Displaying User Keyring#

$ keyctl show @u
Keyring
 853797413 --alswrv      0 65534  keyring: _uid.0
 718614445 --alswrv      0     0   \_ user: testuser

Getting Key ID#

$ keyctl request user testuser
869008619

Storing a Password into Session Keyring#

$ keyctl add user testuser Secret.123 @s

Storing a Password into User Keyring#

$ keyctl add user testuser Secret.123 @u

Retrieving a Password#

$ keyctl print %user:testuser
Secret.123
$ keyctl print 869008619
Secret.123

Clearing User Keyring#

$ keyctl clear @u

See Also#