Archive by category Linux

Sudo access to a user in Linux

Sudo access to a user in Linux

The following command will give sudo access to a user on a linux machine: sudo printf "myuser ALL = NOPASSWD: ALL\n# User rules for myuser\nmyuser ALL=(ALL) NOPASSWD:ALL\n" | sudo tee /etc/sudoers.d/myuser > /dev/null && sudo chmod 440 /etc/sudoers.d/myuser Where myuser is the username you are granting privileges to. The command will also apply the correct […]

Read More

bash script useful tips

I’ve spent last 2 days scripting virtual server deployment on Amazon cloud. For my reference, these are some useful commands I had to use to get the job done. 1. Hash “Hello World” string using SHA256 algorithm echo -n "Hello World" | shasum -a 256 You can also hash a file shasum -a 256 myfile.ext […]

Read More