Friday, July 8, 2011

How to change MAC address in fedora

1. First step is to find the current MAC address and take a backup copy in a safe place.

To know your current MAC type:
$ ifconfig | grep HWaddr
eth0 Link encap:Ethernet HWaddr 00:19:48:2E:D1:27

The above hexadecimal numbers 00:19:48:2E:D1:27 is your MAC address for device eth0.
Simply copy and paste it in a file.

2. Now, time to change the MAC address this requires you to work as root user.
Take the network interface down
# ifdown eth0

Now, lets change the current MAC address to 00:E0:81:5C:B4:0F
# ifconfig eth0 hw ether 00:E0:81:5C:B4:0F

Take the network interface up again
# ifconfig eth0 up

Check if your MAC address is changed:
# ifconfig eth0 | grep HWaddr

Note:
Changing MAC address is only temporary. Once you reboot your machine, the operating system will reflect the physical MAC address burnt in your network card and not the MAC address you set.

Thursday, July 7, 2011

Default Permission

Default Permission:
For Normal Users:-
1. On File:
-rw-rw-r-- or 664
2. On Directory:
drwxrwxr-x or 775

For users with root permissions:-
1. On File:
-rw-r--r-- or 644
2. On Directory:
drwxr-xr-x or 655

File and Directory Permissions

File Permissions:
1. -r--
content of the file can be read using command such as cat, less or more.
2. -rw-
Note: read permission is required to write into any file.
file can be edited and saved
3. -r-x
Note: read permission is required to execute any file.
shell (bash or sh, etc) will attempt to execute the file when file's name is entered as a command.

Directory Permissions:
1. dr--
content of directory can be read as ls.
Few examples:
$ ls testing/
ls: cannot access testing/file2: Permission denied
ls: cannot access testing/file1: Permission denied
file1 file2

Note: long listing requires execute permission.
Few examples:
$ ll testing/
ls: cannot access testing/file2: Permission denied
ls: cannot access testing/file1: Permission denied
total 0
-????????? ? ? ? ? ? file1
-????????? ? ? ? ? ? file2

2. d-wx
files may be created or delected in the directory.
Note:
a). execute permission required.
b). A file can be deleted by anyone who has write permission to directory in which the file resides regardless of the ownership or permission for that file.
Few examples:
a). $ ls testing/ [Failed]
ls: cannot open directory .: Permission denied

3. d--x
enter into directory using command cd
Few examples:
a). $ ls testing/
ls: cannot open directory testing/: Permission denied
b). $ cd testing/ [Okay]

Tuesday, June 14, 2011

[Solved] Starting LSB: start and stop the WLM configuration [1;31mfailed [0m, see 'systemctl status cgconfig.service' for details.

Most simple solution:
# yum update libcgroup-0.37.1-3.fc15

My problem is solved after this update.

[Solved]- Starting /dev/disk/by-uuid/ad5290fc-d073-45db-bfaf-86f25f401a07 [1;31maborted [0m because a dependency failed.

If you got any error like this at f15 booting time:
Starting /dev/disk/by-uuid/ad5290fc-d073-45db-bfaf-86f25f401a07 [1;31maborted [0m because a dependency failed.
Case I:
First check your /etc/fstab,
if you got any line starting with
UUID=ad5290fc-d073-45db-bfaf-86f25f401a07
Note: In my case UUID=ad5290fc-d073-45db-bfaf-86f25f401a07. But in case UUID will be something else.

Reason:
Reason for this failed message can be due to change in the partition like partition recreated after delete or filesystem type change (say ext3 to ext4).

Solution:
If it is due to change in partition you can use any one of the two methods:
1. Use blkid to find the UUID of /dev/sda5 (say the partition which has been changed is /dev/sda5)
# blkid
copy the UUID value from the output of the above command for /dev/sda5 only and paste it in place of previous UUID in /etc/fstab

Note: If the changed partition is your root partition you must have to edit /etc/grub.conf file
root=UUID=^new UUID^

2. open /etc/fstab file as root.
Now, edit only first field.
for example:
if it is like:
UUID=ad5290fc-d073-45db-bfaf-86f25f401a07 swap swap defaults 0 0
Replace the first field with partition name /dev/sda5 (say the partition which has been changed is /dev/sda5)
/dev/sda5 swap swap defaults 0 0
Note: If the changed partition is your root partition you must have to edit /etc/grub.conf file
root=/dev/sda5 (say the partition which has been changed is /dev/sda5)

Monday, June 6, 2011

We configure DSL connection using Network Manager. I like to know which file does it edit??

Yesterday, I was searching for this file. Googled alot, asked on #fedora, even I have thrown this question on #nm but didn't find any answer.
After searching for one hours, I have found this of my own and like to share with you all.

When you create a new DSL Connection using Network Manager your configurations are saved at
# cd /etc/NetworkManager/system-connections
Inside this folder you can find all DSL Connection's configuration files.

Friday, June 3, 2011

How to Configure Network Connection in fedora 15

Now, a days most of end-users have a common question i.e., How to configure network connection for usb-modem, mobile phone and broadband etc.

Today, I will try to cover all different types of network setup in fedora 15.

First step
First step for network configuration is to open Network Manager where you have to enter LAN and Service Provider's Info.
You can open Network Manager by:

1. Right click on the icon of two Computer -> Edit Connections
2. Left click on the icon of two Computer -> VPN Connections -> Configure VPN
Or Using command:
3. $ nm-connection-editor

Now, after this you can find a small window something like this:



I. Router/modem in bridge mode.
Most of the bsnl users, use this mode of network setup.
Before you start your network setup you must need two things:
1. username provided by bsnl.
2. password provided by bsnl.

Now, click on the DSL tab of Network Manager -> Add/Edit


Enter you username and password provided by bsnl, and service can be any name. (better to use service provider's name)
At the end don't forget to "Save" your changes.

II. Router/modem in pppoe mode.
This mode of network setup is mostly used in Corporate sectors and sometime people having dual boot System.
Now, click on the Wired tab of Network Manager -> Add/Edit

Here, the IP, Netmask and other information may not be the same for your case.

Note: All the information which are entered here are similar to the information entered in case of "Network Places -> LAN Connection" in Windows XP.

III. Internet Connection on PC using Mobile Phone.
Here, mobile phone works as a modem and mobile phone is connected to PC using a data cable.
Now, click on the Wireless tab of Network Manager -> Add/Edit


From "Any Device" drop down select your device and simply follow the steps.
Note: At the end must check if APN Name is corret.

IV. For usb-modem.
For bsnl and other dial-up usb-modem, same as "I. Router/modem in bridge mode."
For other, "III. For Mobile Phone."

Tips:
1. At a time enable "Connect Automatically" for only one device.
2. There are other ways of network connection too available but all above steps are simple and less risky.