View previous topic :: View next topic |
Author |
Message |
dave n00b
Joined: 13 Apr 2002 Posts: 16 Location: Illinois
|
Posted: Sat Apr 13, 2002 2:13 pm Post subject: Adding users |
|
|
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 |
|
|
gschneider Tux's lil' helper
Joined: 10 Apr 2002 Posts: 81 Location: Rostock, Germany
|
Posted: Sat Apr 13, 2002 3:04 pm Post subject: |
|
|
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 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 |
|
|
Nitro Bodhisattva
Joined: 08 Apr 2002 Posts: 661 Location: San Francisco
|
Posted: Sat Apr 13, 2002 3:06 pm Post subject: |
|
|
I suggest that you look at 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 _________________ - 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 |
|
|
dave n00b
Joined: 13 Apr 2002 Posts: 16 Location: Illinois
|
Posted: Sat Apr 13, 2002 6:40 pm Post subject: Thanks everyone! |
|
|
I appreciate all of the help, and have to admit this is a great community (and so far a killer distro)! |
|
Back to top |
|
|
danielrm26 Tux's lil' helper
Joined: 18 Apr 2002 Posts: 92
|
Posted: Thu Apr 18, 2002 8:03 am Post subject: Superadduser... |
|
|
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 |
|
|
freefall Tux's lil' helper
Joined: 13 Apr 2002 Posts: 89
|
Posted: Thu Apr 18, 2002 10:31 am Post subject: |
|
|
emerge superadduser actually works now. It didn't last week and now I have begun to like useradd. |
|
Back to top |
|
|
static Tux's lil' helper
Joined: 18 Apr 2002 Posts: 141 Location: Canada
|
Posted: Tue Apr 23, 2002 3:14 pm Post subject: |
|
|
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 |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Tue Apr 23, 2002 3:33 pm Post subject: |
|
|
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 |
|
|
Lemma Guru
Joined: 19 Apr 2002 Posts: 416 Location: Uppsala, Sweden
|
Posted: Sun May 05, 2002 4:25 pm Post subject: |
|
|
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 |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Sun May 05, 2002 4:30 pm Post subject: |
|
|
Lemma wrote: | The different user-groups that there are in this dist, how do i track them down? |
(or replace "cat" with your favorite pager)
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
LosD n00b
Joined: 12 Jun 2002 Posts: 61 Location: Taastrup, Denmark
|
Posted: Wed Feb 05, 2003 4:55 am Post subject: |
|
|
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 |
|
|
papaC n00b
Joined: 25 Apr 2002 Posts: 19 Location: Florida
|
Posted: Tue Feb 18, 2003 9:00 pm Post subject: |
|
|
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 |
|
|
sarnold Developer
Joined: 28 Nov 2002 Posts: 115 Location: California
|
Posted: Mon Feb 24, 2003 8:09 pm Post subject: |
|
|
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 |
|
|
ollie n00b
Joined: 24 Nov 2002 Posts: 35
|
Posted: Wed Feb 26, 2003 9:12 pm Post subject: |
|
|
Code: | emerge superadduser | |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20485
|
Posted: Wed Feb 26, 2003 9:28 pm Post subject: |
|
|
emerge superadduser had already been suggested. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
MacMasta Guru
Joined: 18 Apr 2002 Posts: 545 Location: Anchorage, AK
|
Posted: Wed Feb 26, 2003 10:33 pm Post subject: |
|
|
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 |
|
|
modal Apprentice
Joined: 02 Oct 2002 Posts: 277
|
Posted: Wed Feb 26, 2003 11:41 pm Post subject: |
|
|
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 |
|
|
golemB n00b
Joined: 07 Mar 2003 Posts: 18 Location: New York, NY
|
Posted: Wed Apr 16, 2003 4:42 pm Post subject: still not a player |
|
|
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 |
|
|
golemB n00b
Joined: 07 Mar 2003 Posts: 18 Location: New York, NY
|
Posted: Wed Apr 16, 2003 5:44 pm Post subject: chown saves the day! |
|
|
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 |
|
|
|