Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Adding users
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dave
n00b
n00b


Joined: 13 Apr 2002
Posts: 16
Location: Illinois

PostPosted: Sat Apr 13, 2002 2:13 pm    Post subject: Adding users Reply with quote

Hi all. Have gentoo installed no problem, and have been running around as root for a bit. Tried adduser myusername, but was given warnings about templates, etc. What do I need to do to add a user and give them everything they need, assign them to proper groups (ie, add them to the wheel group if they need to su, etc)?

Thanks a ton!
Back to top
View user's profile Send private message
gschneider
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2002
Posts: 81
Location: Darmstadt, Germany

PostPosted: Sat Apr 13, 2002 3:04 pm    Post subject: Reply with quote

man username

for starters:

Code:
adduser -g users -G wheel -d /home/username -s /bin/bash -c "Full Name" -m username

param -m is important, it creates the home directory (given with -d) and copies all files from /et/skel.

then run
Code:
passwd username
and enter a password for the user.

Regards,
Gerald
_________________
/(bb|[^b]{2})/


Last edited by gschneider on Sat Apr 13, 2002 3:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Sat Apr 13, 2002 3:06 pm    Post subject: Reply with quote

I suggest that you look at
Code:
man useradd
it will show you all kinds of information about how to use the command.

Is the error you are getting:
Code:
useradd: warning: CREATE_HOME not supported, please use -m instead.

The CREATE_HOME is little feature of the useradd used on RedHat and Mandrake. It doesn't work in Gentoo. For somereason; however, it is include in the config file and generates an error. To get rid of the error edit /etc/login.defs and on (or near) line 10 you will find: 'CREATE_HOME no' simply put a comment at the beginning of the line.

Some other things you can do are:
Code:
useradd username   # should run without error now
useradd -m username   # will create the users homedirectory in /home
useradd -g wheel username  # will add a user and set their primary group to wheel (defaults to users)
useradd -G group1,group2  # sets the seconday groups
passwd username   # will set a password for username, this is needed to actually login


And, if you wish to modify a user after adding them, use the usermod command, you can read more about that in
Code:
man usermod

_________________
- Kyle Manna

Please, please SEARCH before posting.

There are three kinds of people in the world: those who can count, and those who can't.
Back to top
View user's profile Send private message
dave
n00b
n00b


Joined: 13 Apr 2002
Posts: 16
Location: Illinois

PostPosted: Sat Apr 13, 2002 6:40 pm    Post subject: Thanks everyone! Reply with quote

I appreciate all of the help, and have to admit this is a great community (and so far a killer distro)! :)
Back to top
View user's profile Send private message
danielrm26
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2002
Posts: 92

PostPosted: Thu Apr 18, 2002 8:03 am    Post subject: Superadduser... Reply with quote

One of the guys in #gentoo hooked me up so I am passing it along to you guys.

emerge superadduser

That is a user adding script that will prompt you for most of the important paramaters. Then just make an alias to adduser or whatevery you want to type to execute it.

:)
_________________
dmiessler.com -- grep understanding knowledge
Back to top
View user's profile Send private message
freefall
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2002
Posts: 89

PostPosted: Thu Apr 18, 2002 10:31 am    Post subject: Reply with quote

emerge superadduser actually works now. It didn't last week and now I have begun to like useradd.
Back to top
View user's profile Send private message
static
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2002
Posts: 141
Location: Canada

PostPosted: Tue Apr 23, 2002 3:14 pm    Post subject: Reply with quote

What is this wheel group? static will need to be part of group wheel to be able to su to root?
_________________
Gentoo and Doom III. 'Nuff Said.
_______________________________________
Back to top
View user's profile Send private message
klieber
Administrator
Administrator


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Tue Apr 23, 2002 3:33 pm    Post subject: Reply with quote

static wrote:
What is this wheel group? static will need to be part of group wheel to be able to su to root?


My understanding is that membership in the wheel group gives you the ability to su. I'm sure it has other uses, but I believe that's the primary one.

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
Lemma
Guru
Guru


Joined: 19 Apr 2002
Posts: 416
Location: Uppsala, Sweden

PostPosted: Sun May 05, 2002 4:25 pm    Post subject: Reply with quote

The different user-groups that there are in this dist, how do i track them down? (So I can use them, ex wheel, cdrw and audio, what do?)
/Lemma
_________________
Always make it as simple as possible, but no simpler
/Einstein
Back to top
View user's profile Send private message
klieber
Administrator
Administrator


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Sun May 05, 2002 4:30 pm    Post subject: Reply with quote

Lemma wrote:
The different user-groups that there are in this dist, how do i track them down?


Code:
cat /etc/group


(or replace "cat" with your favorite pager)

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
LosD
n00b
n00b


Joined: 12 Jun 2002
Posts: 61
Location: Taastrup, Denmark

PostPosted: Wed Feb 05, 2003 4:55 am    Post subject: Reply with quote

static wrote:
What is this wheel group? static will need to be part of group wheel to be able to su to root?


wheel is a group used for people with administrator (or "semi-administrator") privileges...

Common uses are su, sudo, samba write access to some shares, and whatever else you want to use it for... (or, AFAIK, in the case of su and maybe some other commands, is forced to use it for).

I think the name is from the *BSD's...
Dennis
Back to top
View user's profile Send private message
papaC
n00b
n00b


Joined: 25 Apr 2002
Posts: 19
Location: Florida

PostPosted: Tue Feb 18, 2003 9:00 pm    Post subject: Reply with quote

And how to add a user that can only login if they are seated in front of the machine? I want to add some people to be able to login to my main box to use desktop apps, games, etc. But don't want them to be able to login over the network.
Back to top
View user's profile Send private message
sarnold
Developer
Developer


Joined: 28 Nov 2002
Posts: 115
Location: California

PostPosted: Mon Feb 24, 2003 8:09 pm    Post subject: Reply with quote

papaC wrote:
And how to add a user that can only login if they are seated in front of the machine? I want to add some people to be able to login to my main box to use desktop apps, games, etc. But don't want them to be able to login over the network.


Try /etc/login.access for that...
Back to top
View user's profile Send private message
ollie
n00b
n00b


Joined: 24 Nov 2002
Posts: 35

PostPosted: Wed Feb 26, 2003 9:12 pm    Post subject: Reply with quote

Code:
emerge superadduser
;)
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16113
Location: Colorado

PostPosted: Wed Feb 26, 2003 9:28 pm    Post subject: Reply with quote

emerge superadduser had already been suggested.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
MacMasta
Guru
Guru


Joined: 18 Apr 2002
Posts: 545
Location: Anchorage, AK

PostPosted: Wed Feb 26, 2003 10:33 pm    Post subject: Reply with quote

Actually BSDs (and Solaris) use the operator group, not wheel...


I always used:

Code:

#useradd -g wheel -G othergroup1, othergroup2 -d /home/user/ -s /bin/bash -c Name -m -k /etc/skel username

and then passwd username.

~Mac~
Back to top
View user's profile Send private message
modal
Apprentice
Apprentice


Joined: 02 Oct 2002
Posts: 277

PostPosted: Wed Feb 26, 2003 11:41 pm    Post subject: Reply with quote

I've always used superadduser with gentoo, it's been great. But, i've heard that it has quite a bit of functionality problems ie., pretending to accept certain information, when in fact it should spit out an error, and other things. (unfortunately i'm not sure about them, since i'm not the one who was talking about them on #gentoo)
Does anyone know of a port from BSD's user adding program that is much like superadduser?
Back to top
View user's profile Send private message
golemB
n00b
n00b


Joined: 07 Mar 2003
Posts: 18
Location: New York, NY

PostPosted: Wed Apr 16, 2003 4:42 pm    Post subject: still not a player Reply with quote

I tried out the helpful hints in this thread, and it worked fine - with a hitch.

I got my system up and running with Gentoo by preserving my /home filesystem (with just myself as the primary user) and wiping out the / and other filesystems. I got KDE up as root (took a lonnnng time) and then I tried to "useradd" myself in, using:

Code:
useradd -g wheel -G floppy,cdrw,audio -d /home/myusername -c "My Name" myusername


When I try to "su - myusername" it hangs indefinitely, and same problem with plain "su myusername". I tried the same thing (this time with the -m flag to actually create home dir) for "myusername2" and that worked fine, and I can become that user with no problem.
Back to top
View user's profile Send private message
golemB
n00b
n00b


Joined: 07 Mar 2003
Posts: 18
Location: New York, NY

PostPosted: Wed Apr 16, 2003 5:44 pm    Post subject: chown saves the day! Reply with quote

Never mind - I realized afterwards that I had to chown -R the /home/myusername directory. Odd that su dies without ownership of the home dir.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum