Lock and Unlock user account in Sybase

What happens if account is locked?

1. User can not login.
2. If any schedule jobs with specified login.

When login can be locked.

1. When maximum failed login attempts reached.
2. If password expires
3. System Security Officer locks login
4. Accounts are locked due to account inacrivity.

How to know account is locked or not?
If we run the below query in the isql console, it will give status of login.

1> sp_displaylogin k2admin 2> go Suid: 3 Loginame: k2admin Fullname: k2admin Default Database: master Default Language: Auto Login Script: Configured Authorization: Locked: YES Date when locked: Sep 5 2016 6:45PM Reason: Account locked by ASE by manually executing sp_locklogin Locking suid: sa Date of Last Password Change: Sep 5 2016 6:27PM Password expiration interval: 0 Password expired: NO Minimum password length: 6 Maximum failed logins: 3 Current failed login attempts: 0 Authenticate with: AUTH_DEFAULT Login Password Encryption: SHA-256 Last login date: Exempt inactive lock: 0 (return status = 0)

Syntax to Lock and Unlock user account in Sybase:

sp_locklogin [loginame, "{lock | unlock}"]

Examples:

1. Lock the user account.

1> sp_locklogin k2admin,'lock' 2> go Account locked. (return status = 0)

2. Unlock user account.

1> sp_locklogin k2admin, 'unlock' 2> go Account unlocked. (return status = 0)

To check the status of account:

1> sp_displaylogin k2admin 2> go Suid: 3 Loginame: k2admin Fullname: k2admin Default Database: master Default Language: Auto Login Script: Configured Authorization: Locked: NO Date of Last Password Change: Sep 5 2016 6:27PM Password expiration interval: 0 Password expired: NO Minimum password length: 6 Maximum failed logins: 3 Current failed login attempts: 0 Authenticate with: AUTH_DEFAULT Login Password Encryption: SHA-256 Last login date: Exempt inactive lock: 0 (return status = 0)

CheapSexCams
Responses are currently closed, but you can trackback from your own site.

Comments are closed.

Powered by k2schools
%d bloggers like this: