New User

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

New User

Postby dobby9 » Thu Jul 09, 2009 19:48

How can I safely add a new user.
I use the option user and groups and still when I add one new user the system refused to boot in GUI mode
It leaves me with a Cli
And as a newby I reinstall it.
Can somebody tell how to do it safely ?

regards
dobby9
dobby9
Baby Hen
 
Posts: 10
Joined: Fri Jun 19, 2009 12:13

Re: New User

Postby micia » Thu Jul 09, 2009 20:20

You should try with the good old command line :D

try the useradd command.
Code: Select all
useradd username

where username is the new user.
Refer to the man page to know more about this command,
I highly suggest you to read it before proceeding.
Code: Select all
man useradd
User avatar
micia
Sagely Hen
 
Posts: 2710
Joined: Wed Nov 26, 2008 16:41

Re: New User

Postby Fitzcarraldo » Thu Jul 09, 2009 21:30

In the example below I had logged-in under my username fitzcarraldo, opened a Terminal/Konsole window and used the groups command to list which groups I am a member of. Then I used the id command to find the gid for my account. Then I switched to the root user and used the useradd command to add a new user herzog with the same gid and in the same groups as me. At the end I used the id command for the new user account in order to compare the output with that for my account.

Code: Select all
fitzcarraldo@acertm8215 ~ $ groups
root wheel audio cdrom video games cdrw usb users portage clamav messagebus haldaemon plugdev scanner entropy pulse-access pulse-rt pulse kvm vboxusers polkituser
fitzcarraldo@acertm8215 ~ $ id
uid=1000(fitzcarraldo) gid=0(root)
groups=0(root),10(wheel),18(audio),19(cdrom),27(video),35(games),80(cdrw),85(usb),100(users),250(portage),409(clamav),410(messagebus),411(haldaemon),441(plugdev),442(scanner),1000(entropy),1003(pulse-access),1004(pulse-rt),1005(pulse),1007(kvm),1009(vboxusers),1016(polkituser)
fitzcarraldo@acertm8215 ~ $ su
Password:
acertm8215 fitzcarraldo # useradd -d /home/herzog -s /bin/bash -m -g root -G wheel,audio,cdrom,video,games,cdrw,usb,users,portage,clamav,messagebus,haldaemon,plugdev,scanner,entropy,pulse-access,pulse-rt,pulse,kvm,vboxusers,polkituser herzog
acertm8215 fitzcarraldo # passwd herzog
New UNIX password:
Retype new UNIX password:
passwd: password updated successfully
acertm8215 fitzcarraldo # exit
exit
fitzcarraldo@acertm8215 ~ $ su - herzog
Password:
herzog@acertm8215 ~ $ id
uid=1001(herzog) gid=0(root)
groups=0(root),10(wheel),18(audio),19(cdrom),27(video),35(games),80(cdrw),85(usb),100(users),250(portage),409(clamav),410(messagebus),411(haldaemon),441(plugdev),442(scanner),1000(entropy),1003(pulse-access),1004(pulse-rt),1005(pulse),1007(kvm),1009(vboxusers),1016(polkituser)
herzog@acertm8215 ~ $ exit
logout
fitzcarraldo@acertm8215 ~ $


Instead of using the useradd command you can install via Portage the script superadduser and use that. It's a front-end to useradd and is independent of the desktop environment and can be used in any terminal window or even on a TTY console. To install it you would type, as root user, the following command:

Code: Select all
emerge -1v superadduser

For details of how to use it see Superadduser and this screenshot.

N.B. If, like me, you are one of the unlucky people who cannot use Compiz-Fusion (e.g. your GPU driver does not support it) then log-in as the new user via a TTY console (or log-in via your existing account, open a Terminal/Konsole window and use the command "su <new user's username>" to log-in as the new user) and edit the file /home/<new user's username>/.config/compiz/fusion-icon as explained in the post Re: Compiz White Screen. Otherwise when the new user logs-in (s)he could end up staring at the WSOD (white screen of death).
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7335
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: uzsolt and 1 guest