Tuesday, October 21, 2008

Printers Config File and Status check in Sun Solaris

How to Check the printers that are configured in the server (O.S. - Sun Solaris)

$ cat /etc/printers.conf|grep printer_name


To check the status of the printer

$lpstat -p printer_name

Wednesday, October 8, 2008

Oracle user account LOCKED(TIMED)

If you are on Oracle 10g and frequently facing the issue "Oracle user account LOCKED(TIMED)" with any user account then.

You need to observe the profile assigned to the particular user

select username,profile from dba_profiles where username='MYLOGIN';

If you find that the profile is DEFAULT then you have to observe one thing

SELECT resource_name, resource_type, limit FROM dba_profiles WHERE profile='DEFAULT';

COMPOSITE_LIMIT KERNEL UNLIMITED
SESSIONS_PER_USER KERNEL UNLIMITED
CPU_PER_SESSION KERNEL UNLIMITED
CPU_PER_CALL KERNEL UNLIMITED
LOGICAL_READS_PER_SESSION KERNEL UNLIMITED
LOGICAL_READS_PER_CALL KERNEL UNLIMITED
IDLE_TIME KERNEL UNLIMITED
CONNECT_TIME KERNEL UNLIMITED
PRIVATE_SGA KERNEL UNLIMITED
FAILED_LOGIN_ATTEMPTS PASSWORD 10
PASSWORD_LIFE_TIME PASSWORD UNLIMITED
PASSWORD_REUSE_TIME PASSWORD UNLIMITED
PASSWORD_REUSE_MAX PASSWORD UNLIMITED
PASSWORD_VERIFY_FUNCTION PASSWORD NULL
PASSWORD_LOCK_TIME PASSWORD UNLIMITED
PASSWORD_GRACE_TIME PASSWORD UNLIMITED

The FAILED_LOGIN_ATTEMPTS PASSWORD is 10 in the previous versions it used to be UNLIMITED.

If you like to change the profile option edit the default profile, but its not suggested for security reasons.

You can create a new profile with options of that in the default profile and change the FAILED_LOGIN_ATTEMPTS PASSWORD to UNLIMITED.

CREATE PROFILE DEFAULT_NEW LIMIT
COMPOSITE_LIMIT KERNEL UNLIMITED
SESSIONS_PER_USER KERNEL UNLIMITED
CPU_PER_SESSION KERNEL UNLIMITED
CPU_PER_CALL KERNEL UNLIMITED
LOGICAL_READS_PER_SESSION KERNEL UNLIMITED
LOGICAL_READS_PER_CALL KERNEL UNLIMITED
IDLE_TIME KERNEL UNLIMITED
CONNECT_TIME KERNEL UNLIMITED
PRIVATE_SGA KERNEL UNLIMITED
FAILED_LOGIN_ATTEMPTS PASSWORD UNLIMITED
PASSWORD_LIFE_TIME PASSWORD UNLIMITED
PASSWORD_REUSE_TIME PASSWORD UNLIMITED
PASSWORD_REUSE_MAX PASSWORD UNLIMITED
PASSWORD_VERIFY_FUNCTION PASSWORD NULL
PASSWORD_LOCK_TIME PASSWORD UNLIMITED
PASSWORD_GRACE_TIME PASSWORD UNLIMITED;

Assign this profile to the user


ALTER USER mylogin PROFILE DEFAULT_NEW;

Now you would not face the issue of user account locking frequently.