Skip to content

Instantly share code, notes, and snippets.

@eladc
eladc / chainload.conf
Last active December 25, 2022 11:48
[Linux] Chainload Windows in UEFI mode
menuentry "Windows custom" {
insmod part_gpt
insmod fat
insmod chain
search --no-floppy --fs-uuid --set={EFI partition UUID}
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
@eladc
eladc / RHEL upgrade.sh
Last active December 25, 2022 11:48
Upgrade RHEL6 to RHEL7
yum update
reboot
## Repos configuration
subscription-manager config --rhsm.manage_repos=1
subscription-manager repos --enable rhel-6-server-extras-rpms
echo “notify_only=0” >> /etc/yum/pluginconf.d/search-disabled-repos.conf
@eladc
eladc / krb5-keytab.sh
Last active December 25, 2022 11:49
[Linux] Create a keytab file for kerberos authentication
### Variables
UHOME=/home/$(logname)
GID=$(id -g $(basename $UHOME))
USRID=$(id -u $(basename $UHOME))
DOMAIN=YOUR-DOMAIN.ORG
## create keytab
function create_tkt {
ktutil > /dev/null <<INTER
add_entry -password -p $AUSER@$DOMAIN -k 0 -e aes256-sha1