I am new to Raspberry PI. I need to create new user in Raspberry PI in Raspbian distro, but I would like to have different username but with equal or same level of privileges? How could I do it?
closed as off-topic by Ghanima♦, mpromonet, Jacobm001♦, Steve Robillard Sep 10 '15 at 5:12
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question does not appear to be specific to the Raspberry Pi within the scope defined in the help center." – Ghanima, mpromonet, Jacobm001, Steve Robillard
If you run
adduser with the same group as
pi this should work (I haven't tried this).
As per the comments above this is the hard way to solve your problem. Just give each Pi an unique
hostname and they should be easy to distinguish.
It is preferable to have the same username on each machine if you want to move files around.
Assuming a new name of username:
To create a new user account:
sudo addduser username Follow the prompts, being sure to set a good password when prompted.
You also want to add the new user to the same groups that the pi user belongs to. You can view the groups the pi users belongs to with
groups pi pi : pi adm dialout cdrom sudo audio video plugdev games users netdev input spi i2c gpio
Note that your new user will automatically have a group created matching their username. You do not need to add your new user to the
You can add your new user to each group individually using
sudo adduser username groupname. For example:
sudo adduser username sudo
sudo adduser username audio
If you want your new user to have the exact same rights as the pi user, add the new username to all of the groups except the
pi group that the pi user belongs to. You can save some typing by doing this in one pass:
for GROUP in adm dialout cdrom sudo audio video plugdev games users netdev input spi i2c gpio; do sudo adduser username $GROUP; done
Be sure to add your new user to the
sudo group since that is what allows the use of the
sudo command by the new user.
netdev can be important for configuring network devices.
As others have noted, you're probably better off simply changing your hostname (can be done with
sudo raspi-config under
Advanced->Hostname) to accomplish what you're after. Also, don't forget the old pi account still exists, and possibly with a default password, so be sure to at least change the password for the pi user for security reasons.