The lazy programmer scripts
scripts that work

Overview for linux

Lazy create sudo user

Creating users on Linux is trivial, but creating a user with sudo rights and no password confirmation when using sudo is not.

The script must be run under user root.

Tested on Ubuntu, Debian, CentOS and RHEL.

Written by kami on Friday December 8, 2017
Permalink - Tags: bash, linux, ubuntu, rhel, centos

Lazy lsof for Windows

If you need the lsof functionality on a Windows system, you can check out this repo: https://github.com/cklutz/LockCheck

I have already built the project and you can download the `lsof.exe` binary from https://github.com/ader1990/LockCheck/blob/master/Binaries/lsof.exe.

This binary works on Windows and does not require any external dependency.

Tested on Windows 10 x64.

Written by kami on Friday September 1, 2017
Permalink - Tags: windows, linux, cmd, powershell, binary, visual-studio



Lazy set MTU on Linux

This script sets the MTU size on Linux.

Tested on Ubuntu, Red Hat and SuSE.

Default values:

INTERFACE_NAME=eth0;

MTU_VALUE=65000

Execution:
bash changemtu.sh $INTERFACE_NAME $MTU_VALUE

If parameters are not given, the script is running with the default values.

Written by Malware on Tuesday September 15, 2015
Permalink - Tags: mtu, linux, networking