SAMBA 4.5 // Gentoo Linux Domain Member // File Server

krb5 pidSources: Strategy This machine file server (domain member server). It will serve domain users profiles, homes and other file stuff. ADDC’s IP is This machines IP is, host name is F4 Principles Users on a domain member will be authenticated by the domain controller. This process uses […]

BASH | detect text files charset and convert to …

MOD_INTRO_FILE_CHARSET=”$(file -bi “$MOD_INTRO_FILE” | grep charset | sed “s|.*\=||” | awk ‘{print $1}’)” if [ “x$MOD_INTRO_FILE_CHARSET” != “x” ]; then $(which iconv) -l | grep -wi $MOD_INTRO_FILE_CHARSET > /dev/null if [ $? -eq 0 ]; then MOD_INTRO=”$(cat “$MOD_INTRO_FILE” | $(which iconv) -cs -f $MOD_INTRO_FILE_CHARSET -t $CHARSET_TEXTFILE)” else MOD_INTRO=”$(cat “$MOD_INTRO_FILE”)” fi else MOD_INTRO=”$(cat “$MOD_INTRO_FILE”)” fi

cleanup config file

while read LINE; do echo “$LINE” | grep ‘^#’ > /dev/null && continue echo “$LINE” | grep ‘^\s*$’ > /dev/null && continue STRG=”$(echo “$LINE” | sed ‘s|\#.*$||’ | awk ‘{gsub(/^ +| +$/,””)} {print $0}’)” echo “x${STRG}x” done < $A_FILE