![]() The bash shell is an improvement on that allowing the user of the arrow keys on the command line and autocompletion. To logout and now login under the new username to check that it is working correctly.īy default the shell for the new user is the bourne shell. Of course if you want to add a different user and don’t want to give them admin access then you don’t need to make any updates to the /etc/group file. The most important is the adm and sudo entries as without those the user will not be able to run sudo and hence perform any system administration. Use CTRL-O to save and CTRL-X to quit after editing the file. Go through the file adding ,user1 to the end of all of the groups that pi is in. If you are familiar with vi then replace nano with vi for the rest of this guide. The nano editor is the easiest for new users (so that’s what I’ve referred to below), but I do recommend learning the vi text editor as it is useful tool that is installed on all linux systems. Please be aware that when editing files like these a mistake can result in not being able to login. I’ve done the following by editing the file so that you can see the file (it’s also arguably a little quicker as you can make multiple changes whilst editing the file). You can add the new user to the groups using the usermod command or you can edit the file directly. The new user will need to be added to certain groups to allow the same privileges that the pi user had. This is a security feature that protects the system from other users, but also limits the amount of damage that a user can do by mistake (although if prefixed with the sudo command it will not help against accidents). Without using the sudo command this would fail as regular users are not allowed to create other users. As used above the sudo command allows the user to issue a command as the superuser. Here you will see the first use of the sudo command which we will be using a lot. ![]() This will add a new user and change their password. You can skip this and go straight to the performance / networking steps if this is not required. I have used user1 as the username, but typically this will be a persons name. You may also want to add your own username. To change the password for the pi user after logging in issueĪnd follow the prompts for changing the password. The image includes a default username and password, which once connected to the Internet would allow anyone to login and have free roam of the device. The first priority is to make the Raspberry Pi a little more secure. These instructions assume that it is physically connected to a home router. To follow this then the Raspberry Pi will need to have an Internet connection. This is based on the Raspbian Raspberry Pi NOOBS image from Raspberry Pi download page. You could use it as a dedicated network service for the home. A web server can be a good way of making that information available, perhaps via the Internet of Things (IoT). The Raspberry Pi is useful as a device for collecting information from various sensors. The Raspberry Pi is a low power computer and so is useful to use in place of a more power hungry computer it's a great way to learn Linux through practical application and a good way to learn web programming. ![]() It also means that the computer can spend more of it’s time server up web pages and less processor time drawing a GUI, which is after all the whole point of a webserver. This may not be quite as easy as clicking a few icons, but it has many advantages, including the ability to remotely manage and install the server. In this guide the configuration is done at the command line. If you want a more basic (less resource intensive) version then try Running a lightweight webserver on the Raspberry Pi This setup is probably overkill for most uses of the Raspberry Pi, but it is the setup that most users will be familiar with and is a good way to learn about setting up a webserver. Mysql – database server (recently this is often replaced by Maria) It is termed a LAMP server which is one of the most common configuration for webservers which standard for: This is similar to the guide to using Ubuntu as a LAMP webserver, but adds some of the things that need to be handled differently for the Raspberry Pi. This provides details of how to configure a Raspberry Pi as a webserver. Creating a LAMP server (web server – Linux Apache Mysql PHP) with the Raspberry Pi
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |