This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |