Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-25-2006, 10:12 PM   #1
LQ Newbie
Registered: Oct 2006
Posts: 1

Rep: Reputation: 0
Lightbulb Why i cannot creat a new user with the same permissons of ROOT user

Always when i install Slackware i use ROOT user for everything
But i know that is not correct. The correct it's create a new user.

And now i try to do this. I use "adduser" to create a new user called M3T4L with primary group USERS and pid 1000.
At this moment all is fine.

But some time later i resolved to create a new user called BOSS, and i create with "adduser". My idea for BOOS is set for it same priveleges from ROOT, for not login anymore with the ROOT user. I added BOSS to primary group ROOT, and adtional grpups: BIN, DAEMON, SYS, ADM, DISK, WHEEL, FLOPPY, same grops of ROOT user.
When i make the first login with BOOS i tryed delete a doc file from /ROOT, but i give "permission denied".
Later i try to modify the "PASSWD" file from /ETC folder, but i give "permission denied".
For last i try to create a new folder on / and i give "permission denied".

I make one shot, and try modify the pid from BOSS to 0.
And whem login all my needs works. But the prompt have the # symbol (from ROOT user) and not the $ symbol from conventional users. In my idea this not correct, and i roll back.

My question: What's wrong? My idea make sense? I can do create a user with the ROOT permissions? How?

I need some tips.

Thanks ;-)

Old 10-25-2006, 11:22 PM   #2
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216

Rep: Reputation: 31
The root user (UID 0) is special in Unix and therefore Linux. This is what is known as the "superuser" account and has permission to do anything pretty much by default. Because users are unique (i.e. only one user can be UID 0), there can be only one root user.

You can give regular users (such as your BOSS) elevated rights on the system by adding them to the group root (GID 0), but it does not make the user a "superuser". Just because they belong to the root group does not mean they do eveything. They are still limited by group permissions.

For example, /etc/passwd is owned by user root and group root, but the permissions are set to -rw-r--r--, meaning that only user root can edit the file. Group root has the same permissions as everyone else, read-only. And for /etc/shadow, the permissions are -rw-------, so even though the file is owned by group root, only user root has permissions to even read the file.

You cannot create a second user with full root permissions. However, by using the sudo command, you can grant ordinary users the abilitity to do root things. This is the accepted practice to give root privledges to ordinary users.

Old 10-25-2006, 11:51 PM   #3
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 66
Or 'su' to root...
Old 10-26-2006, 06:19 AM   #4
Registered: Oct 2004
Distribution: slamd64-current, slackware-current, clfs 6.1, arch-current, ubuntu dapper
Posts: 144

Rep: Reputation: 15
just use a regular user to do anything you want and as soon as you get an permission denied use the sudo (or the su) command to execute the command as root (after you checked that what you try to do is of no danger to the system). thats the simpliest rule to minimize the danger of fucking up the system
Old 10-26-2006, 08:30 AM   #5
Senior Member
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
It makes no sense not to use 'root' and at the same time use a user 'boss' with the same powers as root. That's exactly the same as using root itself. It's not the name "root" that is the security problem.

sudo is the best solution.
Old 10-26-2006, 11:25 AM   #6
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 545

Rep: Reputation: 33
Like others said it is the uid 0 (zero) that makes all the difference. If you were wanting to make BOSS the real root user you could do that by changing the BOSS uid to zero. Then you could change the uid of root to something higher than 500 to be safe.
Then if anyone got on as root they would not really be a superuser.
However, this is not as effective as it once was. I see users trying to get into my system without using any id, they just call for UID=0 That defeats changing root to some other name.

Hope this helps.
Old 10-27-2006, 11:44 PM   #7
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358

Rep: Reputation: 31
root-# chown -R boss:root /

[where "root-#" means your logged in as root]

Probably doesn't work!?
Old 10-28-2006, 01:09 AM   #8
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
Originally Posted by pbhj
root-# chown -R boss:root /

[where "root-#" means your logged in as root]

Probably doesn't work!?
that's not funny.

as said before, it isn't the name of root
that is the problem logging in as root
log in as user and su or sudo as needed
Old 10-29-2006, 06:48 AM   #9
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,880

Rep: Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563
I usually create a 'poweruser' account for myself by adding it to the group 'wheel' and using the NOPASSOWD option. That way you can run all commands without messing up ownerships. You still have to give the full path to priviledged programs.


access, login, permission, permissions, rights, root, user, users

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
creat MySQL database for each user ? Data-Base SUSE / openSUSE 3 03-07-2005 03:42 PM
root permissons to user command line chaitu_iiit Linux - Software 7 11-09-2004 07:54 AM
creating a user with few permissons evilchild Linux - General 2 12-01-2003 06:31 AM
Kppp user permissons config Ando Linux - Software 1 06-10-2003 05:43 PM
how to Creat a User cerberus Slackware 4 05-14-2003 11:00 PM > Forums > Linux Forums > Linux - Distributions > Slackware

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

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