Modifying file permissions with chmod command in GNU/Linux


In any multi-user operating system the files have a series of features that allow us to see them, modify them or execute them for users that we define. Although there are several alternatives for achieving this, GNU/Linux uses the traditional users and groups system, allowing us to configure the file permission in various ways. By executing ls -l we can list the permissions over the various files inside the directory we are in. Look at the folowing example line displayed on executing ls -l

-rwxr-xr-x 1 user1 group1 128931 Feb 19 2000 test.txt

From the above line, first 10 characters corresponds to file permissions and we concentrate on them for the same reason.
Character 1        : It tells us whether it is a file or a directory. ‘-‘ for file and ‘d’ for directory.
Characters 2,3,4: These are the so called rwx permissions i.e, read,write and execute permissions. And 2,3 and 4 characters include the Read More »

Creating a wireless Ad-hoc network in GNU/Linux for sharing files

Screenshot from 2013-05-15 12:03:12

Here I explain what I did in Ubuntu 12.04 LTS. And will probably be similar in most of the GNU/Linux distros. This method requires a network manager for managing the different networks. First of all you need to ensure that your wireless interface card supports Ad-hoc networking. Because there are some which doesn’t support wireless Ad-hoc networks. Know your network controller by running lspci | grep -i network. Given below is a list containing some of the network controllers that supports Ad-hoc and there may be more in the list.


Step 1: Right click on the network manager icon->Edit connections. Now you will get a window similar to one displayed above.
If not try the Network Connections from the Preferences section.
Step 2: Click on the tab Wireless->Add.
Step 3: Enter the SSID as the name that should be displayed as the network name.
Step 4: Click on the Mode drop-down list to select Ad-hoc. Leave the remaining fields as it is.
Step 5: Click on the Wireless Security tab for adding a password and select one of the Security types listed.
Step 6: Type a password->Save.
If you need a static ip address then follow the sub-steps before saving
Step 6.a) Click the tab IPv4 settings and select the method as Manual.
Step 6.b) Click on add and then type a valid ip in Address section, as Netmask and as Gateway then Save.
Step 7: Click on the network icon again-> Connect to a hidden wireless network.
Step 8: Select the newly created network->Connect.

That’s all. Now this network will be shown in nearby computer’s network list.

Add users to sudo to “root” account

“george is not in the sudoers file. This incident will be reported.”

Some of you may have encountered an error similar to one listed above. Most of us then switches to root account and perform the requires operations. But it is possible for users to take up the root privileges through the sudo command by editing the sudo configuration file. If you want to make, for example, the user ‘george’ be able to sudo to “root”, use the following command:

su (and enter the root password)
nano /etc/sudoers

Move to the section where the following is written

# User privilege specification
root    ALL=(ALL:ALL) ALL

Edit the file to look like

# User privilege specification
root    ALL=(ALL:ALL) ALL
george  ALL=(ALL:ALL) ALL

Save the file. Now ‘george’ can use the sudo command without any error.