User Tools

Site Tools


add_new_raspbian_user

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
add_new_raspbian_user [2016/07/24 22:19] walkeradminadd_new_raspbian_user [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 9: Line 9:
 \\  \\ 
 \\  \\ 
-        THIS SECTION IS NOT YET FINISHED!!!!!!!!!!+If multiple people are using the same raspberry pi you may want to add new users so each person has their own user account.\\ 
 \\  \\ 
 +Adding a new user is simple enough, the following method was done whilst logged in as the default user 'pi' which has the root or 'sudo' privileges needed to add and modify user accounts.\\ 
 \\  \\ 
 +For this example we will create a new user called 'newuser', simply replace this with whatever name you want. To add the user 'newuser' use the following command:\\ 
 \\  \\ 
 +        sudo adduser newuser
 \\  \\ 
 +This will create a new user along with a group 'newuser' and  new home directory. You'll also be prompted to enter a password for the new user. If you ever need to change the password of the 'newuser' you can do so with the command:\\ 
 +\\ 
 +        sudo passwd newuser
 \\  \\ 
-If multiple people are using the same raspberry pi you may want to add new users so each person has their own user account. 
- 
-Adding a new user is simple enough, the following method was done whilst logged in as the default user 'pi' which has the root or 'sudo' privileges needed to add and modify user accounts. 
- 
-For this example we will create a new user called 'newuser', simply replace this with whatever name you want. To add the user 'newuser' use the following command: 
- 
-sudo adduser newuser 
- 
- 
- 
-This will create a new user along with a group 'newuser' and  new home directory. You'll also be prompted to enter a password for the new user. If you ever need to change the password of the 'newuser' you can do so with the command: 
- 
-sudo passwd newuser 
- 
 In order for the user to have the same privileges as the default account 'pi' we'll need to add the it to several user groups. To find out what groups the user 'pi' belongs to type the following command: In order for the user to have the same privileges as the default account 'pi' we'll need to add the it to several user groups. To find out what groups the user 'pi' belongs to type the following command:
- +\\  
-groups pi  +        groups pi  
- +\\  
- +You can see pi belongs to several groups such as 'audio' and 'video'\\  
- +\\  
-You can see pi belongs to several groups such as 'audio' and 'video' +Do the same for the 'newuser':\\  
- +\\  
-Do the same for the 'newuser': +        groups newuser 
- +\\  
-groups newuser +You'll see it only belongs to one group 'newuser'\\  
- +\\  
- +We need to add new user to the same groups as the user 'pi' to enable him to use audio, accelerated video, pluggable devices, etc\\  
- +\\  
-You'll see it only belongs to one group 'newuser' +To add a user to a group  we use the command:\\  
- +\\  
-We need to add new user to the same groups as the user 'pi' to enable him to use audio, accelerated video, pluggable devices, etc +        sudo adduser <username> <groupname>  
- +\\  
-To add a user to a group  we use the command: +So to add 'newuser' to the group 'dialout' type:\\  
- +\\  
-sudo adduser <username> <groupname>  +        sudo adduser newuser dialout 
- +\\  
-So to add 'newuser' to the group 'dialout' type: +Now repeat this step for all the remaining groups apart from the group 'pi'. If you don't want the new user to have admin or root ('sudo') privileges then don't add the user to the groups 'sudo' or 'adm'.\\  
- +\\  
-sudo adduser newuser dialout +You can check the user has been added to correct groups by using the command groups newuser again.\\  
- +\\  
- +\\  
- +        The information on this page originated from: 
-Now repeat this step for all the remaining groups apart from the group 'pi'. If you don't want the new user to have admin or root ('sudo') privileges then don't add the user to the groups 'sudo' or 'adm'+        [[http://www.modmypi.com/blog/how-to-add-new-users-and-add-users-to-groups]] 
- +\\  
-You can check the user has been added to correct groups by using the command groups newuser again. +\\ 
- +
- +
- +
-Deleting a user and removing a user from a group +
- +
-If you want to remove a user from a group you can use the following command+
- +
-sudo deluser <username> <groupname> +
- +
-So to remove user 'newuser' from the group 'adm' you would type: +
- +
-sudo deluser newuser adm +
- +
-A similar command can be used to delete an entire user along with it's home directory: +
- +
-sudo deluser <username> +
- +
- +
-[[http://www.modmypi.com/blog/how-to-add-new-users-and-add-users-to-groups]] +
- +
- alias userlist='cat /etc/passwd |grep "/bin/bash" |grep "[5-9][0-9][0-9]" |cut -d: -f1'+
  
add_new_raspbian_user.1469395173.txt.gz · Last modified: 2023/03/09 22:35 (external edit)