LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-07-2007, 03:33 PM   #1
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Rep: Reputation: 41
How to assign user groups properly?


I just installed Ubuntu 7.10 server (no GUI). I created one user. What do I do next? If this was Windows, I might make the user a member of the admin group or power users group, tweak the profile settings, and that kind of stuff.

What do I do on Linux to make this user account usable for completing the setup and installation tasks I'll need to do?

Thanks.

Last edited by Mountain; 11-07-2007 at 03:34 PM. Reason: typo
 
Old 11-07-2007, 04:05 PM   #2
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 17
on ubuntu, your first user should already be a member of the group "admin", which grants you sudo access.

To perform a task you'd normally need to do as root, you'll just want to prefix it "sudo ls" instead of "ls".

You can also use "sudo -s" or "sudo su - " to obtain a shell either as a privileged version of you, or as the actual user root.

You can add a user to given groups using gpasswd (eg: gpasswd -a username groupname).

You may also want to check out the man pages for aptitude, to get updates and install software.
 
Old 11-07-2007, 05:22 PM   #3
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 41
Quote:
Originally Posted by complich8 View Post
on ubuntu, your first user should already be a member of the group "admin", which grants you sudo access.

To perform a task you'd normally need to do as root, you'll just want to prefix it "sudo ls" instead of "ls".

You can also use "sudo -s" or "sudo su - " to obtain a shell either as a privileged version of you, or as the actual user root.

You can add a user to given groups using gpasswd (eg: gpasswd -a username groupname).

You may also want to check out the man pages for aptitude, to get updates and install software.
Initially my only user was "root". I created one more user with 'adduser'. But I suspected I should set permissions and group membership next... still not sure how to do that.

Where do I find info about which user accounts and groups exist? I learned about the user command for printing who is logged in, but I want to see which accounts exist.

Is aptitude related to apt-get? Looks like it is... Thanks.
 
Old 11-07-2007, 06:03 PM   #4
inspiron_Droid
Member
 
Registered: Dec 2006
Distribution: Debian (Wheeze)
Posts: 391

Rep: Reputation: Disabled
In ubuntu tou would typ usermod - g group name [username]
 
Old 11-07-2007, 06:17 PM   #5
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 41
maybe these are the wrong questions... am I thinking too much like a Windows admin?

which group(s) should I add my user to?
how do I list the existing groups?
where do I learn more about user management?

I'm using Ubuntu 7.10, but the help at this link assumes there is a GUI:
https://help.ubuntu.com/7.04/keeping...l#users-groups

Last edited by Mountain; 11-07-2007 at 10:45 PM. Reason: correction
 
Old 11-07-2007, 11:42 PM   #6
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 17
"usermod -g" sets a user's primary group. gpasswd is good for adding a user to additional groups.

For starters, I suggest "man 5 passwd", "man 5 shadow" and "man 5 group" to get the most basic info. The "whatis" and "apropos" commands are pretty handy, and if you're new to linux in general you should get comfortable with them and the man pages.

For a quick summary, user credentials are stored in /etc/passwd (world-readable, defines login, userid, primary group membership, shell, some other meta-info, but unintuitively doesn't include password hashes despite the name), /etc/shadow (stores just username, uid, password hash and some other password meta-info you probably don't care about right now, definitely should be readable only by root), and /etc/group (defines what groups exist, and what additional groups the users are in). You should probably be somewhat familiar with the contents of all three files.

As far as learning a lot about a lot, honestly I'd recommend either O'reilley's "Essential System Administration" ... or if you're feeling in more of a "free as in beer" mood, consider reading over the linux documentation project's sysadmin guide.
 
Old 11-08-2007, 12:22 AM   #7
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 41
Thank you. That's very helpful.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't assign password to user corbis_demon Linux - General 2 02-22-2005 07:46 AM
assign a file/folder two groups? student04 Linux - General 2 12-19-2004 10:47 PM
how can you assign a password to a new user want2learn Linux - Security 2 09-30-2004 07:50 AM
How to assign a user to the particular partition ? sachinh Red Hat 3 07-26-2004 01:28 AM
How to assign directory access to a user linuxfans Linux - General 7 04-16-2003 12:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:54 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