Archive for the ‘Operating System’ Category.

Cannot open shared object file

I get the following error when executing a binary file:
error while loading shared libraries: libcrypto.so.4: cannot open shared object file: No such file or directory

This error is likely to occur either because you have not properly defined your $LD_LIBRARY_PATH or the file is simply missing.

To debug try the following:

ldd {binary_file}

or to get more verbose information:

export LD_DEBUG=libs;{binary_file}

for more options:

export LD_DEBUG=help;{binary_file}

usermod, groupadd

Add group with specfic id:
# groupadd -g {gid} {group}

Add existing user to existing group:
# usermod -G {group} {username}

Check to which group a user belong:

# id -nG {username}

Remove existing user to existing groups (group1,group2,group3.group4), e.g remove it from group3:

# usermod -G {group1,group2,group4} {username}

Monitoring system using sar

The sar command writes to standard output the contents of selected cumulative activity counters in the operating system, e.g:

nohup sar -A -o /tmp/activity 60 0 1>/dev/null 2>&1 &