I always use superadduser. It's DE-independent and works a treat. Coincidentally, I used it the other day to add a user in Xfce.
To install it:
- Code: Select all
equo install superadduser
Here's an actual example when I added a user (who I named "mediacentre") to my nettop media centre a while back:
1. Find out which groups I belong to:
- Code: Select all
$ groups
disk wheel floppy uucp cron audio cdrom dialout video games cdrw usb users haldaemon scanner plugdev entropy pulse-access pulse-rt pulse vboxusers crontab polkituser
2. Now log in as root user and run superadduser:
- Code: Select all
$ su
Password:
# superadduser
Login name for new user []: mediacentre
User ID ('UID') [ defaults to next available ]:
Initial group [ users ]:
Additional groups (comma separated) []: disk,wheel,floppy,uucp,cron,audio,cdrom,dialout,video,games,cdrw,usb,haldaemon,scanner,plugdev,entropy,pulse-access,pulse-rt,pulse,vboxusers,crontab,polkituser
Home directory [ /home/mediacentre ]
Shell [ /bin/bash ]
Expiry date (YYYY-MM-DD) []:
New account will be created as follows:
---------------------------------------
Login name.......: mediacentre
UID..............: [ Next available ]
Initial group....: users
Additional groups: disk,wheel,floppy,uucp,cron,audio,cdrom,dialout,video,games,cdrw,usb,haldaemon,scanner,plugdev,entropy,pulse-access,pulse-rt,pulse,vboxusers,crontab,polkituser
Home directory...: /home/mediacentre
Shell............: /bin/bash
Expiry date......: [ Never ]
This is it... if you want to bail out, hit Control-C. Otherwise, press
ENTER to go ahead and make the account.
Creating new account...
Changing the user information for mediacentre
Enter the new value, or press ENTER for the default
Full Name []: mediacentre
Room Number []:
Work Phone []:
Home Phone []:
Other []:
New password:
Retype new password:
BAD PASSWORD: it is based on a dictionary word
passwd: password updated successfully
Account setup complete.
3. Now check if the new user was set up correctly by comparing the details with mine:
- Code: Select all
# id mediacentre
uid=1001(mediacentre) gid=100(users) groups=100(users),6(disk),10(wheel),11(floppy),14(uucp),16(cron),18(audio),19(cdrom),20(dialout),27(video),35(games),80(cdrw),85(usb),411(haldaemon),441(scanner),442(plugdev),1003(pulse-access),1004(pulse-rt),1005(pulse),1009(vboxusers),1010(crontab),1000(entropy),1019(polkituser)
# id fitzcarraldo
uid=1000(fitzcarraldo) gid=100(users) groups=100(users),6(disk),10(wheel),11(floppy),14(uucp),16(cron),18(audio),19(cdrom),20(dialout),27(video),35(games),80(cdrw),85(usb),411(haldaemon),441(scanner),442(plugdev),1003(pulse-access),1004(pulse-rt),1005(pulse),1009(vboxusers),1010(crontab),1000(entropy),1019(polkituser)
#
All good.