LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-14-2001, 12:03 PM   #1
^KC^
LQ Newbie
 
Registered: Jun 2001
Location: Earth... Where else?
Distribution: RedHat v7.1
Posts: 3

Rep: Reputation: 0
Exclamation


Hello... Hope no one has answered this question recently. I am very new to Linux, and had a question.

When I set up a NEW User on my box, I want them to be organized into a Specific Group (ie: Users) instead of the default username:username (UID:GID).

Can someone please help me figure out how to set this up? I really appreciate it. :-)

Thanks

Kasey
 
Old 06-14-2001, 12:29 PM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
You can define groups by editing /etc/group - just choose a GID that isn't in use and give the group a name. Then when you create a user you can assign your new group to be their default group.

Easy eh?

HTH

Jamie...
 
Old 06-14-2001, 12:58 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
usually you can use the command groupadd as well.

Code:
# groupadd  groupname
and this is usually quicker than editing the file by hand. but of course, by hand, you can pick your own unique GID for the group. but you can do that as well once created by the command too.....whatever floats your boat.
 
Old 07-03-2001, 12:41 PM   #4
^KC^
LQ Newbie
 
Registered: Jun 2001
Location: Earth... Where else?
Distribution: RedHat v7.1
Posts: 3

Original Poster
Rep: Reputation: 0
Cool Thanks

Thanks for your help...

But unfortunately, this past weekend I losed my HDD. It just all of a sudden died. I think it was the motor that gave out.

So I have sent it back to the Manufacturer for repair. But since I did NOT Back anything up (ya ya ya... I know!) I have to start from scratch again!.

Well... I'm back to the drawing board!

Over and Out...

Kasey
 
Old 07-04-2001, 06:12 AM   #5
cinnix
Member
 
Registered: Jun 2001
Location: Northern Ohio
Distribution: RedHat, Engarde and LFS
Posts: 237

Rep: Reputation: 30
I just wanted to say that I would not reccommend a newbie editing the /etc/group or /etc/passwd files by hand. A simple mistake could lead to an unusable system. Use the following utilities...

useradd
userdel
groupadd
groupdel
 
Old 07-04-2001, 07:26 AM   #6
^KC^
LQ Newbie
 
Registered: Jun 2001
Location: Earth... Where else?
Distribution: RedHat v7.1
Posts: 3

Original Poster
Rep: Reputation: 0
Yes, I totally agree with that. Editing things by hand is a bit scarry, and since the first post, I have learned quite a bit.

Getting into linux, can be a little overwhelming, especially comming from a Winblows environment. I am liking the *nix way of things more and more each day! It is a great OS, but it definately is NOT like the Ol' Point-and-Click environment, where all the actions happen behind the scenes, and ya have no idea what's happening. In *nix, "I" get to control what goes where, when, how, etc.. etc.... And I like having that control. Makes ya use your brain again, which is a good thing, especially after the "Brainless world of Winblows!"

Anyway.....

I agree that using those util's, are a bit more user friendly than editing by hand. In fact, I have found the 'linuxconf' a great util for setting up alot of things.

I appreciate everyone's help, and will be posting again, if I need some more help.

Thanks everyone!

(Please DO NOT Post REPLIES to this TOPIC, as I have found the answer that I needed )
.
 
Old 07-29-2001, 11:11 AM   #7
jfd118
LQ Newbie
 
Registered: Jul 2001
Location: Charlottesville, Va
Distribution: Red Hat
Posts: 8

Rep: Reputation: 0
Exclamation can't login after editing /etc/passwd and /etc/group

Hi,

I have two machines
one runs RH6.2 and the other
RH7.1 (which was recently installed)

This morning I set out to change the /etc/passwd
and /etc/group files on the RH7.1 machine
to be the same as on the RH6.2 machine. When I mount dirs from the RH6.2 machine the the ownerships are all messed up.

Anyway, on the RH7.1 machine I made a modfication to /etc/passwd(changed the uid) and /etc/groups.

I executed chown -R user1 /home/user1/
then I did a chgrp -R group1 /home/user1/

and should now be ready to roll.

I can get past the login page and GNOME starts up
but I end up with only blank blue screen.

Interestingly, I can login in as user1
in "failsafe" mode. This suggests the
ownership of a GNOME file needs to be changed.

Any ideas?

Thanks,

jfd
 
Old 07-29-2001, 11:22 AM   #8
jfd118
LQ Newbie
 
Registered: Jul 2001
Location: Charlottesville, Va
Distribution: Red Hat
Posts: 8

Rep: Reputation: 0
Update

Hi,

A little more experimentation . . .


I can login using KDE, so it is definitely
a GNOME issue.

I created a new user and then
verified that there were no
./gnome files in the users /home dir.
I could log on as the new user in
GNOME.

I then removed all .gnome* files
from my /home dir. This did not solve
the problem.

Odd . . .


jfd
 
Old 07-29-2001, 12:38 PM   #9
jfd118
LQ Newbie
 
Registered: Jul 2001
Location: Charlottesville, Va
Distribution: Red Hat
Posts: 8

Rep: Reputation: 0
fixed it

O.K.

A little more messing around solved
the problem.

By removing all files owned
by user1 in /tmp

and .sawfish in home

GNOME started up without a
problem.

J
 
Old 07-29-2001, 05:35 PM   #10
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Re: can't login after editing /etc/passwd and /etc/group

Quote:
Originally posted by jfd118
I executed chown -R user1 /home/user1/
then I did a chgrp -R group1 /home/user1/
You can always do operations like this in one go by using
Code:
chown -R user1:group1 /home/user1
Glad to see you got it working, it would have made more sense to start a new thread - you'd of probably got some responses then!!

cheers

Jamie...
 
Old 07-29-2001, 06:02 PM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
usermod is another way to setup users.


# usermod
usage: usermod [-u uid [-o]] [-g group] [-G group,...]
[-d home [-m]] [-s shell] [-c comment] [-l new_name]
[-f inactive] [-e expire ] [-p passwd] [-L|-U] name
 
Old 07-29-2001, 06:11 PM   #12
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Quote:
Originally posted by DavidPhillips
usermod is another way to setup users.
Cool - they say you learn something new every day - this must be one such day.

Cheers

Jamie...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating groups, adding users, and setting permissions bowie101 Linux - Newbie 2 11-23-2005 12:42 PM
problems with setting permissions for groups of files liontamer13 Linux - Newbie 5 03-10-2005 12:16 AM
Setting up groups general theory plan9 Linux - General 2 06-09-2004 06:58 PM
setting up groups in sendmail adm1329 Linux - Newbie 2 03-09-2004 09:51 PM
winbind: wbinfo -g only lists global groups from PDC and not local groups saradiya Linux - Networking 0 12-01-2003 02:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration