Add user or group to sudoers file

I had this issue for my Ubuntu and Pidora, so in this article you can have both solutions:

In Ubuntu

The problem I had was to add a user on an Ubuntu 14.04 at my work, so that someone else from the company can help me do some basic maintenance of the system (it was requested by my employee!), so this is how I did it after creating a user (new_user):

 gpasswd -a new_user sudo

This command will add the user new_user to the group sudo.

In Pidora

I was working with Pidora (which is a Fedora remix for Raspberry Pi) and I was about to run a command using sudo that I faced the following error:

[NixSOS@pidora ~]$ sudo iptables -L -n
[sudo] password for NixSOS:
NixSOS is not in the sudoers file. This incident will be reported.

and I was confused for a while and then I searched for a way to add my user in the “sudoers file” and I’m going to explain how to add a user or a group to sudoers file. This should work all major linux distributions.

Continue reading Add user or group to sudoers file

Map a network drive in Mac OSX

There are several places where you need to map a network drive to your computer, for example when you are in a company network and you want to have the shared network drive of your company domain on your computer. The term “mapping” is a technical term for mounting or loading a network drive to a computer.

For this purpose there are more than one way to do it and map the network drive to your Mac OSX and in this article I’m explaining two of those ways which are easier, faster and safer, one from Finder window and the other one from Terminal.

Continue reading Map a network drive in Mac OSX

Find MAC Address of your Mac or Linux

Sometimes when you want to connect your computer to a new network via ethernet cable, network administrators may ask for your ethernet port MAC address (a.k.a physical address). There are several ways to find this address which is basically a number in a specific format and I’m going to explain these ways for all Linux-based operating systems in this post.

Continue reading Find MAC Address of your Mac or Linux

Add custom icon in Ubuntu launcher

Ubuntu uses Unity GUI (Graphical User Interface) and it has a great feature which is handy for running the application which you frequently use. While working with Linux, you may want to run your scripts (shell, Perl, Python, etc.) and you want to add your script to your launcher menu.

There are two ways to add your own icon in Ubuntu launcher (sidebar), you can write the icon script your self or you can use wizard. In the following post I have described how to add your custom icon (to run your custom script) to your application list and also your launcher menu.

Continue reading Add custom icon in Ubuntu launcher

Generate & Compare MD5, SHA1 for Files and Strings in Terminal

Most of the times when you download a file from internet, you will see a checksum or MD5 hash tag beside the download link so you can compare the checksum of the downloaded file with the original file. There are several security reasons for that, but the most common one is to eliminate the possibility of a special type of hacking called “Man in the middle”. In this type of hacking, the hacker usually sniffs and listens to the requests goes from your computer and tries to compromise the packets, but the best thing you can do to help the hacker is to request a very popular application that he has already prepared an infected version, so when you want to download the file, he will send his own infected version toward your computer and you will install that application, thinking that it is the original malware-free application !! so after installing the application, the hacker can do variety of dangerous things to your computer such as creating a backdoor, key-logging, screen capturing, infecting the entire trusted network and etc.

The only way you can avoid this type of hack is by checking the checksums. there are few awesome, useful and easy commands that can do this checking for you and I’m going to describe them in this article:

Continue reading Generate & Compare MD5, SHA1 for Files and Strings in Terminal

Install KeePass on Mac OSX

Most professionals use multiple highly complex passwords for every purpose  so the only problem usually occurs is saving password somewhere safe and accessible. There are few good choices for storing passwords, some are online such as LastPass and some are off-line in which the passwords will be encrypted and stored in files. The best password manager application I know and ever tested is KeePass.

The main reason why KeePass 2.x  is not so popular in Linux base operating system community is because this software does not have Linux or Mac version, but it is easy to run it on Linux. Mind that there are some native Linux applications such as KeePassX that can handle .kdb files which is used for KeePass 1.x but the KeePass2.x uses another file format which is .kdbx

In this tutorial, I’m going to write the best way to install KeePass on Mac OSX. Also you can find how to install KeePass on Linux in this website.

Continue reading Install KeePass on Mac OSX

“ubi-partman failed with exit code 10” error during Ubuntu 12.04.* resolution

During installing Ubuntu 12.04.2 LTS on an Acer laptop I got the following error:

ubi-partman failed with exit code 10

the error message had three buttons and the “continue” button was letting me proceed the installation progress to select date and other stuff, but before selecting the partition I was stock ! After few hours searching and reading blogs I found a clue but there was no specific solution for it, so I decided to write this article.

The problem occurs when the Ubuntu installer wants to check the HDD (Hard Drive Disk) but it was failing each and every time. The solution I found was in configuring the live disk before loading. Follow the following steps:

Continue reading “ubi-partman failed with exit code 10” error during Ubuntu 12.04.* resolution

Thing Helped Me Through Linux OS