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-07-2006, 05:08 PM   #1
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Rep: Reputation: 30
Red face making another root account


So i wanted to amke another account that would be just like root

So i made the user and made its GID="root" and its GROUPS="root"

I made its home = "/root"

I made its shell "/bin/bash"

now when i try to LS in my home i get permission denied...

In X i have no admin privledges and always have to sudo

WTF?!?!

please help
 
Old 01-07-2006, 05:21 PM   #2
theoffset
Member
 
Registered: Aug 2005
Location: Guadalajara, Jal, Mexico
Distribution: Slackware Linux
Posts: 211

Rep: Reputation: 31
I think you have to set its UID=0 too (making that account just an alias for root), but it may bring you some trouble around.

You could also either give more permissions to the "root" group (like +xw on several files) and use it to give some admins privileges for some users, or create a group just for this.

Anyway, it sounds like a dangerous thing to do, specially since the root thing is one of the most criticized things of Unix because is too powerful, why would you like to have 2 of such god-like monsters!
 
Old 01-07-2006, 05:22 PM   #3
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
id rather be admin all the time but not be logged in as root

and u cannot have two users with the sane UID
 
Old 01-07-2006, 05:38 PM   #4
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
scrupul0us,

When switching to *nix operating systems you really need to drop the Windows mentality where you're always administrator by default. Search the board for "linux and viruses" and you will discover long, long threads covering the multitude of reasons.

Here I will list a few of the more basic reasons (the polite method):

1. If you accidentally type the wrong command with root privvies (like rm -rf [foo] , you can toast your machine and any mounted filesystems

2. more and more *nix apps are refusing to run when they detect root privileges (quite the opposite of many Windows apps) due to the developers' acknowledgement of the security risks

3. If you happen to encounter one of the very few Linux viruses, or one of the many trojan horses, running it as root will pretty much guarantee that you will have to wipe the filesystem and reinstall the OS. Firefox and konqueror may be less prone to exploits, but they are not inpenetrable and if you run as a normal user, such exploits will be confined to $HOME, causing you to have to rename that directory and move documents over as needed, but running it as root, again, makes your entire system and all mounted filesystems vulnerable.

In short (the blunt but 100% truthful method): it's a stupid idea.

However if your computer is not going to be networked (this means not connected to other computers, not connected to the Internet, not connected to a cellular phone, no bluetooth, etc.) at ALL and you know for absolute certain that all of the programs you are going to be running are clean, then sure, aside from reasons #1 (a d'oh moment) and #2 (programs checking for root), running as root all the time will be perfectly okay.
 
Old 01-07-2006, 05:41 PM   #5
theoffset
Member
 
Registered: Aug 2005
Location: Guadalajara, Jal, Mexico
Distribution: Slackware Linux
Posts: 211

Rep: Reputation: 31
Well, you actually CAN have to users with the same UID (check the man page of useradd, specially the "-o" switch which affects the -u switch which sets the UID), but as I said it will just become another login name for root (well, I called it an "alias", so is not quite what I said, but it was what I wanted to say).

If you do want to have another dangerous admin account, I guess you should go the group way (In that way you can limit that account a little).
 
Old 01-07-2006, 09:39 PM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
I have noticed a lot of these threads lately and I am not sure if its because more people are switching to Linux from Windows. If you are going to create another account with all root privileges, I'd say its a waste of time because its not different from running as root directly. To protect your system from intruders and yourself, its essential that you only use admin privileges only when necessary. There are commands that help you to temporarily get root privileges whilst logged in as a normal user, so take a look at their manual pages. The commands are "su", "sudo" and if you use KDE, you can use "kdesu".
 
Old 01-07-2006, 09:56 PM   #7
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
i guess ill just have to visudo my desired name and go from there as needed... i guess why im asking is b/c right now my WWW root (htdocs) is owner=root and group=root and the user i log into samba with is in the root group, but im still not able to write to the dir EVENTHOUGH ive given the user admin privledges for the samba share ::Sighs::

ficed the samba issue

Last edited by scrupul0us; 01-07-2006 at 10:20 PM.
 
Old 01-07-2006, 10:31 PM   #8
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally Posted by scrupul0us
i guess ill just have to visudo my desired name and go from there as needed... i guess why im asking is b/c right now my WWW root (htdocs) is owner=root and group=root and the user i log into samba with is in the root group, but im still not able to write to the dir EVENTHOUGH ive given the user admin privledges for the samba share ::Sighs::

ficed the samba issue
So why not create a group e.g. www, change group ownership of htdocs and all its files to www. Make sure the www group can read and write to htdocs and put any users you want to read and write to htdocs in that group. I am not sure about samba because I have never used it before.
 
Old 01-07-2006, 10:34 PM   #9
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
well i fixed the samba issue but just making the htdocs and all subs owner = the name and group=users

now i have full access... now i just need to get php working... but thats in another thread
 
  


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
Making an account an admin? sleepykit Mandriva 9 11-23-2005 05:51 PM
How do I retain the PATH in the root account even when I switch to root using su? thearchitect Linux - Newbie 1 08-13-2005 12:02 AM
Can't get root account ssimontis Ubuntu 6 07-05-2005 07:07 PM
Using root account mfo6463 Linux - Newbie 12 03-27-2004 11:41 PM
Root Account???????? Silverado2000 Linux - General 5 02-01-2002 12:55 PM

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

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