AIX:
pwdadm -f ADMCHG <username>
HP-UX, Solaris:
passwd -f <username>
RHEL 6:
passwd -e <username>
RHEL 5:
usermod -L <username> # lock user
chage -d 0            # set password expired
usermod -U <username> # unlock user

('chage' - change adge)


Check TZ 2014f patch installation

Mon 29 September 2014 by Mikhail Basov en ru 

Oct 26, 2014 in the Russian Federation time zone switching to whinter time will happiened.

The following command help to check is correct time zone patch installed:

# perl -e 'print scalar(localtime(1414305000))."\n"'

If patch is installed:

Sun Oct 26 09:30:00 2014

If not:

Sun Oct 26 ...
read more

Selectively set 'execute' permission for directories.

Mon 02 June 2014 by Mikhail Basov

Task:

Recursively change permissions:
user:
rwx - for directories
rw - for files
group:
rx - for directories
r - for files
other:
rx - for directories
r - for files

Solution:

chmod -R u+rwX,go+rX,go-w /directory

Explanation:

Quote from HP-UX chmod man page about 'X' (capital X) option:

X    Conditionally add or ...
read more

Copy directory tree with access rights but without files

Tue 15 April 2014 by Mikhail Basov

To copy only directory structure with access rights from current directory (./) to target directory (../test1) issue the following command:

read more