Home / Archive by category Linux Archive by category 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
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
I installed a new verison of Ubuntu Lucid Lynx the other day on a brand new formatted hard drive. ?Installation went smoothly as you’d expect, but when I rebooted the server I was stuck on GRUB menu (my worst nightmare). ?The server just wouldn’t load the operating system and typing ‘boot’ in GRUB gave me […]
Read More
This is a useful tip for my reference.? I’ve been creating some startup scripts on my Ubuntu server lately and her are a couple of steps required to get this working. Write your startup script and place it in /etc/init.d/ directory. Let’s say you called your startup script – myScript.? You then install your script […]
Read More