rc.local in Fedora 16 onwards

Fedora 16 brought with itself many new features and changes from its previous versions. Fedora 16 takes advantage of several new technologies to improve the speed, security and efficiency of the boot process. The prominent changes in the boot system are:

  1. introduction of Grub2
  2. porting of SysVinit scripts to systemd
  3. rc.local is no longer  present by default

Though etc/rc.d/rc.local is no longer available by default, but it still works fine once you set it up correctly. rc.local is a file that contains commands user would like to run while booting fedora. Here in this post i will show you how to set it up in Fedora 16 and higher version of Fedora.

  • Step1: Open the Terminal
  • Step2: Type the following command to create the file, type the user password when asked for(for this you must have your username added to the sudoers list, else you may follow this tutorial to add to sudoers list) 
    $sudo vi /etc/rc.d/rc.local


    you may also do this without using sudo, in that case type this

    $su -c "vi /etc/rc.d/rc.local"

    Type the root password in when asked for.

  • Step3: Press “I” to turn on INSERT mode. Add the following to the top
  • Step4: Now you may add your personal commands if any. and press Esc, to exit INSERT mode. Then type “:wq” to save and close the file
  • Step5: Now to make the file executable type the following in your bash terminal
    $chmod 755 /etc/rc.d/rc.local

Once you do these steps, systemd will see the file exists, is executable and is a shell script, and will run it. No further action needed.
I hope the newer versions of Fedora keep this functionality of rc.local active as it’s sometimes handy to run things in a simple script rather than create a new unit file for it.

rc.local in Fedora 16 onwards

Adding Users to Sudoers List

“How to add an user to the Sudoers list?”, a quite common question asked by many. So here in this post i am writing the most convenient method to do it. 🙂

But before i start with the process to add an user to the sudoer list, let me tell you why we do this.

On adding a new user to the sudoers list that user will be able to run commands and open files with root user privilege.

Process to add an user to the sudoers list:

  1. Open terminal.
  2. Type the following command
    $su -c visudo

    Enter the root password.when asked.

  3. You can move the cursor using up/down arrow key. Move down to the line containing
    root ALL=(ALL) ALL
  4. press “i” to activate insert mode then add the following code just after the above line 
    <new username>  ALL=(ALL) ALL

    . So now it looks something like this

    ## Allow root to run any commands anywhere
    root ALL=(ALL) ALL
    <username> ALL=(ALL) ALL
  5. You might need to remove the # infront of the line %wheel ALL=(ALL) ALL, mine was already done so i didn’t have to remove it. So now it looks like
    ## Allows people in group wheel to run all commands
    %wheel ALL=(ALL) ALL
  6. Press Esc to come out of insert mode, then type “:wq” in the command line and press enter to save and quit from vi. And that’s it you have done it. 😀

But here in this step number 4 you assign a root privilege to the user which again compromises your security. Once added to the sudoers list the user can change the password for other users, hence it is quite not advisable if your machine got multiple users logging in as your security might get compromised.

Instead of giving root privilege to for all the commands you can specify the commands with root privilege that the user might use.

For example:

<new username>  ALL=/usr/bin/yum

If your machine is common to many users i would suggest you to allow only particular command to be executed with root privilege else if you are the sole user then like me you may allow all commands to be executed by the user with root privilege.

Here is a slideshow to show how my sudoers file is:

Adding Users to Sudoers List


Few weeks ago i got the opportunity to attend the mozilla workshop #mozcafe@bcrec held in our college. It was basically about the mozilla community and their unique products. During the workshop I was made familiar with the Webmaker Tools by Mozilla like Popkorn Maker, Thimble and X-Ray Goggles.

  • Popcorn Maker : Its a handy online video editing tool. You can add popups, text tags, twitter feeds and many other elements to the video.
  • Thimble : This tool helps in testing your html codes and sharing it. You can write your html codes there and check its output webpage beside. You may even publish your webpage and forward the link to your page to your friends. 😀
  • X-ray Goggles : This was something i really loved. Its works just like its name says. It simply x-rays a webpage and unveils its html codes. You can copy the codes remix/modify the codes and make your own webpage easily. Ain’t it a smart tool?? 😉

Alright that was all about Webmaker Tools.

Next we were told about designing Mozilla logos and T-shirt. We were asked to try our skill in painting using mouse and MS-Paint(mine was a disaster). 😛

We were also told about localization of  mozilla products i.e. translating the language script of the software to your local language. This would help common people to access mozilla products easily. Also, it would save the local cultures and languages from getting extinct.  I really liked the idea behind mozilla localization.

All in all i would have missed a big opportunity if i had missed it.