Skip to content

Instantly share code, notes, and snippets.

prafulbagai

Block or report user

Report or block prafulbagai

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@prafulbagai
prafulbagai / secure.sh
Last active Mar 26, 2017
secure your CentOS machine
View secure.sh
#!/bin/bash
# Script to add a user to Linux system
if [ $(id -u) -eq 0 ]; then
# If user & pass not provided in command line arguments, then ask.
if [[ -z "$1" && -z "$2" ]]; then
read -p "Enter username : " username
read -s -p "Enter password : " password
else
username="$1"
View system_tuning.sh
#!/bin/bash
# file descriptor
# Change 400000 to increase or decrease number of file descriptor
echo "* soft nofile 400000" >> /etc/security/limits.conf
echo "* hard nofile 400000" >> /etc/security/limits.conf
# Changing kernal parameters (modify value if required)
You can’t perform that action at this time.