April 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

Categories

April 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

Setup Umask

The default umask for Solaris 10 and Ubuntu normal useris 0022, however default umask for CentOS normal user account is 0002. Hence default directory permissions are 775 and file permission are 664.

The umask creation of new executable file is calculated as follows:

Default permissions 777 subtract umask value 022 Allowed permissions 755

The umask […]

Red Hat Enterprise Linux 6 Security TIPS and Hardening

 

Rules In Pre-release Final STIG for Red Hat Enterprise Linux 6

 

V-ID CCI CAT Title Description Check Procedures Fixtext RHEL-06-000001 CCI-000366 low The system must use a separate file system for /tmp. The /tmp partition is used as temporary storage by many programs. Placing /tmp in its own partition enables the setting of […]

Puppet 3.7.1 on CentOS 6.5

Puppet 3.7.1 on CentOS 6.5 quick start – I

All below doc is from or based on https://docs.puppetlabs.com/

1. Basic Install

1.1 install OS and prepare the node

1.1.1 Network Layout and install OS

Name IP OS Desc puppet01 192.168.1.10 CentOS 6.5 puppet master puppet02 192.168.1.20 CentOS 6.5 puppet client puppet03 192.168.1.30 CentOS 5.10 puppet […]

BIND CHROOT CENTOS 7

BIND (Berkeley Internet Name Daemon) also known as NAMED is the most widely used DNS server in the internet. This tutorial will descibes how we can run BIND in a chroot jail, the process is simply unable to see any part of the filesystem outside the jail. For example, in this post, i will setting […]

VSFTP CENTOS 7

mkdir -p /ftpserver/open mkdir -p /ftpserver/private

yum -y install ftp vsftpd

[root@keeplive ~]# rpm -qf /usr/bin/db_load libdb-utils-5.3.21-17.el7_0.1.x86_64

echo opentest > /ftpserver/open/open.txt

echo ftptest > /tmp/ftptest1.txt

touch /ftpserver/open/webapp.txt

[root@keeplive ~]# rpm -qc vsftpd /etc/logrotate.d/vsftpd /etc/pam.d/vsftpd /etc/vsftpd/ftpusers /etc/vsftpd/user_list /etc/vsftpd/vsftpd.conf [root@keeplive ~]#

vi /etc/vsftpd/vftpuser.txt alice P@ssw0rd jack P@ssw0rd tom P@ssw0rd

db_load -T -t hash -f /etc/vsftpd/vftpuser.txt /etc/vsftpd/vftpuser.db

[root@keeplive […]

hostnamectl and timedatectl and date and HWCLOCK

Modify CentOS 7 hostname

In CentOS, there are three definitions hostname: static (static), transient (transient), and flexible (pretty). “Static” host name is also called kernel hostname, is the system at boot time from /etc/hostname automatic initialization of the host name. “Transient” host name is in the system is running temporarily assigned host name, for example, […]

MBR vs GPT

MBR is the standard partitioning scheme that’s been used on hard disks since the PC first came out. It supports 4 primary partitions per hard drive, and a maximum partition size of 2TB.

GPT disks are new, and are readable only by Windows Server 2003 SP1, Windows Vista (all versions), and Windows XP x64 Edition. […]

Removing Linux BASH SHELLSHOCKER MALWARE

unknow processes dsfref, gfhddsfew, dsfref etc are starting automatically in centos 6.5

Virus mainly present in /etc/init.d/. Virus will run automatic on the time system start, so remove entry from /etc/init.d. These are virus and its locations

/etc/dsfref,

/etc/gfhddsfew

/etc/dsfref

To Remove Virus from linux

Note: I used chattr -i to change permissions and deleted […]

Centos 7 SYSTEMCTL && Run level && hostname

Centos 7 SYSTEMCTL && Run level && hostname

Centos 7 SYSTEMCTL && Run level && hostname

systemctl start httpd.service (service httpd start)

systemctl stop httpd.service ( service httpd stop)

systemctl restart httpd.service ( service httpd stop)

systemctl status httpd.service ( service httpd status)

systemctl enable httpd.service (chkconfig httpd on)

systemctl disable httpd.service (chkconfig httpd […]

Centos 7 Samba

Centos 7 Samba

FILEDOC /samba/docs LEARDOCS /samba/tech

rpm -qi samba

mkdir -p /samba/docs mkdir -p /samba/tech

ulimit -n 16384

vi /etc/security/limits.conf * – nofile 16384

cd /etc/samba/

cp smb.conf smb.conf.origin

[global] workgroup=FILESERVER netbios name=SERVER1 server string=Samba Server #security=share security=user map to guest = Bad User [SHAREDOCS] path=/samba/tech readonly=yes browseable=yes guest ok=yes [TECHDOCS] path =/samba/tech public […]