LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 02-18-2007, 09:40 PM   #1
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Proper way to set user as root access?


I would like to be able to set a user account to have the same privelages as root. I previously tried to set the GID in /etc/passwd to 0 (like root) for that user, but that didn't seem to work. Is there something else I need to do?
 
Old 02-19-2007, 12:24 AM   #2
fukawi2
Member
 
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 448

Rep: Reputation: 34
You can't set a user up identical to root - that would be pretty redundant as far as security is concerned.

Why do you need to have a user setup to emulate root?

It would be better to leave the user as a "normal" user, and setup sudo on your box. I usually add my "admin" users to the 'root' group, then add an entry in to sudoer's file that allow member of the root group to execute anything as root. Then all I have to do is just pre-pend "sudo" to all my commands that need root. It will effectively increase the verbosity of log detail so you can add accountability to root actions to a particular user if they do stuff something.
 
Old 02-19-2007, 03:39 PM   #3
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,078

Rep: Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713
You can set up a user as a group-0, which will have root privileges, but that's a VERY bad idea. I concur with the previous poster; install and set up SUDO. If you ABSOLUTELY need it, a user can run a SUDO shell, effectively giving them root-rights.

Root should be used sparingly, and with great caution.
 
Old 02-19-2007, 06:30 PM   #4
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: PCLinuxOS 2010.12, Debian Lenny
Posts: 387

Rep: Reputation: 38
A root shell using sudo can be had with:

Code:
sudo -i
Just thought I'd add my 2 bits.
 
Old 02-19-2007, 09:03 PM   #5
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Original Poster
Rep: Reputation: 38
Ok, I'll look into Sudo. Never done it. Thank you all for providing me with the info ... and for not chewing me a new one for asking the question ...
 
  


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
How can I set environmental variables of vi editor in ROOT user? sbnice Linux - General 2 12-18-2006 11:24 PM
1:root vncserver: The USER environment variable is not set. Niceman2005 Linux - Software 1 05-24-2006 11:13 PM
set up access to host a website per user bjs Linux - Newbie 1 01-10-2006 12:08 PM
set up root access [DvS]deadman Linux - Networking 4 04-26-2004 01:25 PM
How to set tcsh prompt: # for root and % for user? robson Linux - Newbie 1 10-12-2003 04:13 PM


All times are GMT -5. The time now is 05:58 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration