LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-06-2015, 11:20 AM   #1
s27
LQ Newbie
 
Registered: Jan 2015
Location: Tehran - Iran
Distribution: Slackware 14.1
Posts: 29

Rep: Reputation: Disabled
best group for 2nd user after root ?


hi
can tell me what's the best group for 2nd user after root ?
please tell me with commend example

i want to use because this
Quote:
Originally Posted by bassmadrigal View Post
Glad you got your wireless up and running Are you still wanting further assistance getting your wired connection working?



However, this is a bit worrisome. Most Linux distributions are different than Ubuntu and derivatives. root is an administrative account only and should be used sparingly (ie. when doing administrative tasks that require escalated privileges). Ubuntu doesn't ship with a usable root account, but gives the users root-like access with the sudo command. With most Linux distributions, you're highly encouraged to create a user account and then use su to temporarily log into root when needed. But it is common advice to not run X as root. The reason behind this is every single program you start up will then have root privileges. A bug or security hole is much more exploitable when you're root than when you're a regular user.

So, I'd recommend running the adduser script to create your own user (make sure you press the up arrow when it gets to the part about groups) and then use that as your primary account. Then, when you're doing things that require escalated privileges, you can use su to temporarily log into the root account, perform the task, then logout and bring you back to your standard user.

Similar reasons are why you are required to use sudo on Ubuntu and why Microsoft introduced UAC and will now ask to run certain things in administrative mode. It's a way to lock down the computer to protect you and your system from bad things (whether it's bad people, code, or a mix of the two).
 
Old 01-06-2015, 11:27 AM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
http://docs.slackware.com/slackbook:users
 
Old 01-06-2015, 11:30 AM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Just run the adduser command and accept the proposed value [users] just pressing [Enter], that will be fine. When suggested, press the up arrow to display proposed additional groups then [Enter] to accept them.
 
Old 01-06-2015, 11:44 AM   #4
s27
LQ Newbie
 
Registered: Jan 2015
Location: Tehran - Iran
Distribution: Slackware 14.1
Posts: 29

Original Poster
Rep: Reputation: Disabled
please tell me about this

user ID ('UID') [defaults to next available]:

what is the right answer ?
 
Old 01-06-2015, 11:47 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Press [Enter].
 
1 members found this post helpful.
Old 01-06-2015, 11:56 AM   #6
s27
LQ Newbie
 
Registered: Jan 2015
Location: Tehran - Iran
Distribution: Slackware 14.1
Posts: 29

Original Poster
Rep: Reputation: Disabled
i make test user
and i push the enter for everything
so what is different between test and root user ?
how can i see how many user do i have and which one is root ? something look like computer management in windows os
 
Old 01-06-2015, 12:06 PM   #7
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
root is the name of the system administrator user. There is only one and no other user is root.

Assuming you use the defaults when using adduser then you end up with "regular users". They will each have their own directory in /home. They cannot administer the computer, eg. install or remove programs, and are for the most part limited to being able to work in their own /home directory.

If you are logged in as a regular user, you can do administrative tasks by opening a terminal and typing "su -" and entering the root password. su is switch user. Normally you would enter the name of the user that you want to switch to but if you do not specify then the system switches to the root user. So "su -" is an abbreviation of "su - root".

Brian
 
1 members found this post helpful.
Old 01-06-2015, 12:23 PM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by s27 View Post
so what is different between test and root user ?
As bcarey said, and as I mentioned earlier, root should only be used for administrative tasks when a normal user can't perform it. Typically any programs that reside in /sbin require root. A regular user is still able to use almost all the programs on the system, but without the risks of running them with elevated privileges.

Quote:
Originally Posted by s27 View Post
how can i see how many user do i have and which one is root ? something look like computer management in windows os
You can view your users in the /etc/passwd file. Any uid (3rd field) from 1000 and up are normally considered regular users in Slackware. The rest of the users in there are various system-only users that do stuff behind the scenes. They are limited in permissions to what they need to do and normally can't be used when trying to log in. The root user will have a uid of 0.

With Slackware, afaik, there isn't anything included to manage users via a GUI. Many distros will create their own programs to manage things like that with a GUI. Slackware just packages up programs as the developer intends, which may initially seem to complicate things, but in actuality, they are removing something that could be problematic. You have the command-line tools available if you need to add users, change groups, etc, and once they're learned, they can be used in most distros.
 
1 members found this post helpful.
Old 01-06-2015, 04:17 PM   #9
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
It's going to depend in the user.

Adding the primary user, yourself, to the wheel group is often suggested, but any other regular users should be added to groups with care rather than just going after the defaults. Do your research first into which groups a user will need beforehand. The defaults are just a generalization. Never add a user to a group they don't need to belong to.
 
Old 01-06-2015, 07:58 PM   #10
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Rep: Reputation: 195Reputation: 195
I added a user part of just the group "users" and everything seems to be working fine.
 
Old 01-06-2015, 08:02 PM   #11
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
Just run the adduser command and accept the proposed value [users] just pressing [Enter], that will be fine. When suggested, press the up arrow to display proposed additional groups then [Enter] to accept them.
Just do what Didier says and accept the defaults (with the up arrow when proposed). You can do "research" later. If I understand correctly this is a single user system for a newbie. Don't get hung up on these initial installation decisions.

Brian
 
Old 01-06-2015, 08:04 PM   #12
maciuszek
Member
 
Registered: Nov 2010
Location: Toronto, Ontario
Distribution: Slackware + FreeBSD
Posts: 165

Rep: Reputation: 40
User info is stored is /etc/passwd as mentioned.

More user info (ex: password hashes +salt) can be found in /etc/shadow.

Information as the login shell, home path, etc can be found in these.
..a noticible difference with these 2 are their permission bits

/home is where users home directories will defaulted; as can be determined by the above files.

id -u can tell you a users id.

User permissions can be managed with with usermod (users can be assigned groups that correspond with files permission bits. ls -l will come in hand. group infomation is found in /etc/group)

su can be used to switch between users.

passwd can change a users password.

Tldr: man man . man hier . man 5 shadow . man 5 passwd . man 5 group . man adduser . man 1 passwd . man user[add,mod,del,s]+ . man groups . man id . man ls[attr]* . man ch[sh,grp,user,mod,attr]+ . man su . man sudo . man w/who . man whoami . man printenv (to explore related environment vairables)

You don't need any gui tools.

Edit: missed a few user related man pages please append if I missed others.

Last edited by maciuszek; 01-06-2015 at 08:13 PM.
 
Old 01-06-2015, 08:29 PM   #13
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by maciuszek View Post
User permissions can be managed with with usermod (users can be assigned groups that correspond with files permission bits. ls -l will come in hand. group infomation is found in /etc/group)
gpasswd is a better choice for group management. With usermod you need to list all the groups that the user is assigned to. With gpasswd you can simply state the group that you want to add the user to.

Brian
 
Old 01-06-2015, 11:47 PM   #14
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 288

Rep: Reputation: 155Reputation: 155
Quote:
Originally Posted by BCarey View Post
gpasswd is a better choice for group management. With usermod you need to list all the groups that the user is assigned to. With gpasswd you can simply state the group that you want to add the user to.
There is an append option for usermod:
Code:
usermod -a -G newgroup
 
1 members found this post helpful.
  


Reply



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
Non root user can create group? cdhar Linux - Newbie 8 07-04-2012 08:51 AM
Remove user from root group JJJCR Linux - Newbie 5 09-05-2011 08:36 PM
Does have a user in group 'root' all the rights as the user 'root'? thomas2004ch Linux - Newbie 4 08-12-2010 05:18 AM
trying to add a user to the root group dave247 Debian 12 10-09-2008 01:49 AM
Giving a user root permission via the root group louisb Linux - Security 6 07-23-2007 12:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:03 PM.

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