Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-25-2006, 09:12 PM
|
#1
|
|
LQ Newbie
Registered: Oct 2006
Posts: 1
Rep:
|
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 ;-)
[]'s
|
|
|
|
10-25-2006, 10:22 PM
|
#2
|
|
Member
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216
Rep:
|
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.
Regards.
|
|
|
|
10-25-2006, 10: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
Rep:
|
Or 'su' to root...
|
|
|
|
10-26-2006, 05:19 AM
|
#4
|
|
Member
Registered: Oct 2004
Distribution: slamd64-current, slackware-current, clfs 6.1, arch-current, ubuntu dapper
Posts: 144
Rep:
|
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
|
|
|
|
10-26-2006, 07:30 AM
|
#5
|
|
Senior Member
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507
Rep:
|
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.
|
|
|
|
10-26-2006, 10:25 AM
|
#6
|
|
Member
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 542
Rep:
|
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.
|
|
|
|
10-27-2006, 10:44 PM
|
#7
|
|
Member
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358
Rep:
|
root-# chown -R boss:root /
[where "root-#" means your logged in as root]
Probably doesn't work!?
|
|
|
|
10-28-2006, 12:09 AM
|
#8
|
|
Member
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796
Rep:
|
Quote:
|
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
|
|
|
|
10-29-2006, 05:48 AM
|
#9
|
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,592
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:02 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|