LinuxQuestions.org
Visit Jeremy's Blog.
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, 08:40 PM   #1
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Rep: Reputation: 164Reputation: 164
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-18-2007, 11:24 PM   #2
fukawi2
Member
 
Registered: Oct 2006
Location: Melbourne, Australia
Distribution: ArchLinux, ArchServer, Fedora, CentOS
Posts: 449

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, 02:39 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,119

Rep: Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044Reputation: 8044
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, 05:30 PM   #4
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400

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

Code:
sudo -i
Just thought I'd add my 2 bits.
 
Old 02-19-2007, 08:03 PM   #5
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Original Poster
Rep: Reputation: 164Reputation: 164
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 10:24 PM
1:root vncserver: The USER environment variable is not set. Niceman2005 Linux - Software 1 05-24-2006 10:13 PM
set up access to host a website per user bjs Linux - Newbie 1 01-10-2006 11:08 AM
set up root access [DvS]deadman Linux - Networking 4 04-26-2004 12:25 PM
How to set tcsh prompt: # for root and % for user? robson Linux - Newbie 1 10-12-2003 03:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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