adding a 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

Post Reply
wintermute
Simple Hen
Posts: 40
Joined: Fri Aug 02, 2013 18:07

adding a user..

Post by wintermute » Tue Aug 20, 2013 7:45

i have attempted to add a regular user (for an actual frequent user of my machine, not that it matters :@: ) in my brand spanking new sabayon setup at home (which rocks in all it's weirdness btw, i absolutely love it so far) and have.. not succeeded.. :oops:
first i've tried the "usual" (or how i'm used to doing it in debian) "useradd blablabla, etc" that appeared to do what is expected, only that, when i've actually wanted to log in as it in gdm, it just bounced me off back to the user list..
hmm..
ok.. back in as my usual self i went to the (gnome) settings, system- users, deleted the newly added user, recreated it, logged out, tried to log back in (as the new user, obviously enough) and although not rejected instantly, i was "logged in" presented with a blank gray screen, no response whatsoever, not even alt f2.. at that point, shutting down my computer pressing and holding the power button, i've decided that the wisest is to leave it alone and whine about it here a little (and i need to go now) although i assume that it's just the (for me) different way that sabayon (gentoo) handles groups by default and "nothing out of the ordinary".. i'd prefer if someone here gave me some pointers on "how it's done" to trying to "hack it" myself..
my gratitude to the kind helper..
:arrow:

belcocco
Old Dear Hen
Posts: 459
Joined: Sat Nov 29, 2008 18:53
Location: Milan, Italy

Re: adding a user..

Post by belcocco » Tue Aug 20, 2013 19:36


wintermute
Simple Hen
Posts: 40
Joined: Fri Aug 02, 2013 18:07

Re: adding a user..

Post by wintermute » Tue Aug 20, 2013 23:37

@belcocco
thank you!! :)
that ought to do it..

svantoviit
Old Dear Hen
Posts: 723
Joined: Sun Feb 28, 2010 17:55
Contact:

Re: adding a user..

Post by svantoviit » Wed Aug 21, 2013 10:42

A handy tool for creating users is app-admin/superadduser.

wintermute
Simple Hen
Posts: 40
Joined: Fri Aug 02, 2013 18:07

Re: adding a user..

Post by wintermute » Sun Aug 25, 2013 10:43

when doing it "by the book" (wiki) it gives me:

Code: Select all

useradd: group '' does not exist
any ideas??
thank you..
:!: :?:

edit, new "thing" that i have tried since posting with, no luck (same result as above in the codebox).. :?
i have listed the groups that (me) the "primary" user logs into and have attempted to create the new user with those groups only, listing them, as instructed in the wiki, between -G and -m separated with commas.. leaving out the groups that are listed in the wiki but not there on my system under the user, like this:

Code: Select all

useradd -G audio, cdrom, video, games, cdrw, users, entropy, portage, plugdev, pulse -m
and, nothing changed.. wondering if it is a simple syntax error or something else.. have no deeper understanding of the group concept.. thanks for baring with me and for any possible solution, whether it is a link or a written reply..

:idea: :arrow: :@:

Cb7
Growing Hen
Posts: 104
Joined: Sun Apr 07, 2013 7:13

Re: adding a user..

Post by Cb7 » Sun Aug 25, 2013 12:15

Syntax error.
There should not be andy ' '. Commad should be like:

Code: Select all

useradd -G audio,cdrom,video,games,cdrw,users,entropy,portage,plugdev,pulse -m
Why, and how to add "[Solved]" to your post. Please read. ← credits to Fitzcarraldo

Kind regards
~Zetok Zalbavar

svantoviit
Old Dear Hen
Posts: 723
Joined: Sun Feb 28, 2010 17:55
Contact:

Re: adding a user..

Post by svantoviit » Mon Aug 26, 2013 8:29

wintermute wrote:wondering if it is a simple syntax error or something else
The syntax is as follows:

Code: Select all

useradd [options] LOGIN
User (login) must be given!

Options:

Code: Select all

-g, --gid GROUP
           The group name or number of the user's initial login group. The
           group name must exist. A group number must refer to an already
           existing group.
-G, --groups GROUP1[,GROUP2,...[,GROUPN]]]
           A list of supplementary groups which the user is also a member of.
           Each group is separated from the next by a comma, with no
           intervening whitespace. The groups are subject to the same
           restrictions as the group given with the -g option. The default is
           for the user to belong only to the initial group.
-m, --create-home
           Create the user's home directory if it does not exist. The files
           and directories contained in the skeleton directory (which can be
           defined with the -k option) will be copied to the home directory.

           By default, if this option is not specified and CREATE_HOME is not
           enabled, no home directories are created.
Caveats:

Code: Select all

       You may not add a user to a NIS or LDAP group. This must be performed
       on the corresponding server.

       Similarly, if the username already exists in an external user database
       such as NIS or LDAP, useradd will deny the user account creation
       request.

       Usernames must start with a lower case letter or an underscore,
       followed by lower case letters, digits, underscores, or dashes. They
       can end with a dollar sign. In regular expression terms:
       [a-z_][a-z0-9_-]*[$]?

       Usernames may only be up to 32 characters long.
A concise walk through of the use: Howto: Linux Add User To Group

elias-train
Baby Hen
Posts: 2
Joined: Fri Nov 25, 2011 10:35

Re: adding a user..

Post by elias-train » Sat Aug 31, 2013 11:56

svantoviit wrote:A handy tool for creating users is app-admin/superadduser.
I'm trying some days ago to oparate "users and groups" application as normal user that belongs to administrator group + as root. the only I get is a grey GUI that not functions at all, or (USING TERMINAL) the system can't find the source to download/install the "app" you sujest. The system (distro) is Sabayon 13.08_x86_gnome installed on an MSI VR220 using all HDD and a second system (asus P5Q-EM E6500 dual-core GRAF G45) with the sabayon 13.08_amd64_gnome (using the all HDD also) .
Any idea ?
Thanks in advance
Elias

User avatar
linuxfluesterer
Old Dear Hen
Posts: 855
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: adding a user..

Post by linuxfluesterer » Sat Aug 31, 2013 15:19

Dear Elias.
Maybe I don't see your point, then really sorry. The best way to add/modify a user seems to me to use a (root) console.
This example shows you, how to add "John Doe", working as clerk. You must be root to execute this command:

Code: Select all

useradd -G users,audio,video -d /home/john john -m -c "John Doe - Clerk"
Where is:
useradd = command (not adduser!), followed by options -G, -d, -m and -c
-G member of the groups users,audio,video ->add more, seperated by comma but NO space
-d /home/john is dedicated (home) directory
-m creates the directory, if not existing
-c "John Doe - Clerk" comment to user
Then you will have added a new user with name john. The home directory is copied from /etc/skel, which should contain basics for Gnome.
Now you'll need a password. You can create a password for joe with:

Code: Select all

passwd joe
You will be asked twice to enter a new password then. This password is valid for joe for login.
With next login you can login as user joe.

To add user joe to more groups (e.g. vboxusers from Virtualbox) you can do with:

Code: Select all

usermod -a -G vboxusers john
If you want to delete a user, here joe, you can do with:

Code: Select all

userdel joe
But the home directory will not be deleted by this command. You must do then manually.
On the other hand, the password will be deleted. When adding the same user joe again, you'll need to execute 'passwd joe' again.

Hope to help you.

-Linuxfluesterer (I love KDE ...)
Take away Facebook from me and let there be real people again...

svantoviit
Old Dear Hen
Posts: 723
Joined: Sun Feb 28, 2010 17:55
Contact:

Re: adding a user..

Post by svantoviit » Sun Sep 01, 2013 8:20

elias-train wrote:the system can't find the source to download/install the "app" you sujest
You are doing something wrong

Code: Select all

$ equo s superadduser
>>  @@ Searching...
>>      @@ Package: app-admin/superadduser-1.0.9 branch: 5, [sabayon-weekly] 
>>         Available:     version: 1.0.9 ~ tag: NoTag ~ revision: 0
>>         Installed:     version: 1.0.9 ~ tag: NoTag ~ revision: 0
>>         Slot:          0
>>         Homepage:      http://www.interlude.org.uk/unix/slackware/ 
>>         Description:   Interactive adduser script from 
>>                        Slackware 
>>         License:       BSD
>>  Keywords:  superadduser
>>  Found:     1 entry
Superadduser is a console application, which has to be run as root.
elias-train wrote:I'm trying some days ago to oparate "users and groups" application…
Not a nice practice to capture other peoples threads. If you have a problem with this Gnome application, ask for advice in a separate thread/forums entry.

Post Reply