If you have been following these lessons by this time you should be fairly comfortable with the Linux operating system, and you should know enough commands to do what you need to from the terminal window and command line. We now want to move forward to actually start doing things with the Pi. In order to do this, we will be using the Python programming language.
In this lesson we look at changing file and folder permissions. In the earlier lessons we learned that we can view the file and folder permissions by navigating to the folder of interest, and then giving the ls -l command. In order to change the permissions, we will use the chmod command. This video explains how to use the chmod command to control who has what permissions.
In this lesson we get into the concepts of Linux permissions. We explore what can be done who whom to files and folders. In future lessons we will look at changing permissions, but in this video we just explain the concepts.
In LESSON 19 we showed how to add users to the Pi with limited permissions. In this lesson we show how to add a user with Admin privileges just like the default “Pi” user.
Fist you will want to log on as the default “pi” user. After logging on, you can add another user with the command:
$sudo adduser paul
once the user is added, you can then give them admin privileges like the pi user my modifying the account with the command:
$sudo usermod-a-Gadm,dialout,cdrom,sudo,audio,video,plugdev,games,users,netdev,input,indiecity paul
Now your user “paul” has the same admin privileges as “pi”. However if “paul” tries to execute a sudo command it will ask for his password. If you want “paul” to be able to execute sudo without entering password, you need to do the following:
NOTE: Messing up this file will corrupt your operating system. I suggest STRONGLY making a backup of your system before moving forward. Or, you could just leave things as they are, and “paul” will have to enter password when doing a sudo command
and then you will be nano-editing a file. Add the following to the last line of the file:
paul ALL=(ALL) NOPASSWD: ALL
Then Control o and enter to save the file, and then control x to exit.
It is fairly easy to corrupt your SD card or your operating system on the Raspberry Pi. If this happens, and you do not have a backup, you will likely have to rebuild your system from scratch. Hence, it is important to be diligent in keeping your Pi backed up. In this lesson we show how you can back it up using Windisk32Manager, a free and simple program that will do the trick.
Please note that you can not back the card up by simply using a windows drag and drop of the contents. You actually have to make the disk image as shown in this video.
Making The World a Better Place One High Tech Project at a Time. Enjoy!