LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-20-2009, 02:38 PM   #1
scream
Member
 
Registered: Feb 2008
Distribution: Oracle Linux
Posts: 32

Rep: Reputation: 0
give same priviledge to another user like root


How can i give same priviledege to another user like root. i tried with root group but doesnt worked.
 
Old 02-20-2009, 02:40 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
man sudo
 
Old 02-20-2009, 02:48 PM   #3
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Depending on how you do this, you could be opening your system up to attacks. For instance, malware could take advantage of elevated user accounts if they are logged in, or an incorrectly written script or command could wipe out the entire system.

I'm trying to think why you would want to do this on a systemwide level and can't think of a good one. Mind explaining what you are trying to accomplish?
 
Old 02-20-2009, 02:49 PM   #4
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Quote:
Originally Posted by scream View Post
How can i give same priviledege to another user like root. i tried with root group but doesnt worked.
You need to be more specific about what you are asking -- but what you probably need is to learn how to use the "sudo" utility: http://www.chinalinuxpub.com/doc/www...ux-hn/sudo.htm
 
Old 02-20-2009, 02:50 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Remove the user from the root group. You can use "su" and "sudo" to run commands as root. Your distro probably has a number of GUI system configuration wizards. If you run them from the menu, you will be prompted for the root password. After that, you will be running that program as root.

Use:
su -
<password>
visudo

and delete the "# " at the front of the commented line for the "%wheel" group. You may also need to add yourself to the wheel group. Some distro's like Ubuntu add the first user to the %wheel group and have this group already configured to use sudo.

Please put your distro in your user profile. If you use Ubuntu, you already can use sudo, but we don't know this.
 
Old 02-20-2009, 02:56 PM   #6
gergely89
Member
 
Registered: Feb 2009
Posts: 100

Rep: Reputation: 21
Actually you can extend user privileges by adding them to the root group, but even in this case those users will only be able to read/write/execute files that belong to group root and have their group permissions set to rwx. Files that belong to root, but have all group permissions disabled, can not be accessed by the root group.
Depending on what you want to achieve, this can even be handy. You only have to enable/disable group permissions on root owned file to fine-tune access to them

linux

Last edited by gergely89; 02-27-2009 at 10:41 PM.
 
Old 02-21-2009, 12:15 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
No. Please stop thinking about using the root group. Bad Idea. All of your programs and processes will inherit your group membership. You don't want to be running a browser with the root group ownership permissions. Besides, having to change the permissions of a file to allow root group permissions, you would still need to use su or sudo.
 
Old 02-21-2009, 05:58 AM   #8
scream
Member
 
Registered: Feb 2008
Distribution: Oracle Linux
Posts: 32

Original Poster
Rep: Reputation: 0
thanks to all for help and suggestion. two of us maintaining the system and we agreed to use 2 account to keep accountability and dont want to use su every time. we can do this in windows system so we thought this can be done in linux also. i tried sudo but there is one problem sudo can not execute all the command like deluser, etc. i am using cent os 5.2. can anyone suggest any other option to do it.


thanks
 
Old 02-21-2009, 06:38 AM   #9
rich_c
Member
 
Registered: Apr 2008
Location: UK
Distribution: Mepis; Maemo; openSUSE
Posts: 384
Blog Entries: 74

Rep: Reputation: 81
Quote:
Originally Posted by scream View Post
we can do this in windows system so we thought this can be done in linux also.
Which is one of, if not the reason(s) why Linux is more secure than Windows. I'm not familiar with the finer details of system security, but to the best of my knowledge you are going to have to use su or sudo and do a bit of researching into how to log the level of info you want to maintain the accountability you need.
 
Old 02-21-2009, 06:57 AM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,354
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Quote:
Originally Posted by scream View Post
we can do this in windows system so we thought this can be done in linux also.
Just because Some Other OS allows you to dodge security Best Practices doesn't mean GNU/Linux should.


Quote:
Originally Posted by scream View Post
i tried sudo but there is one problem sudo can not execute all the command like deluser, etc.
Yes it can. Please learn how to configure Sudo properly.


Quote:
Originally Posted by scream View Post
i am using cent os 5.2. can anyone suggest any other option to do it.
No. You clearly need to be protected from infecting GNU/Linux with whatever misconceptions you carry.
 
Old 02-21-2009, 07:19 AM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,560

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
Just wondering...

If you trust each other enough, why not log in both as root

Or, as stated, use sudo properly configured.
 
Old 02-21-2009, 08:11 AM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,354
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Quote:
Originally Posted by Didier Spaier View Post
If you trust each other enough, why not log in both as root
IMNSHO "trust" has nothing to do with it nor should it. If you want accountability then just configure auditing and ensure logging can't be tampered with: use kernel logging with like GRSecurity or Auditd, 'rootsh' to do userland logging of shell history, transmitting log lines to a remote syslog server and possibly parsing those there in real time could provide you with a good audit trail.


Quote:
Originally Posted by Didier Spaier View Post
use sudo properly configured.
...is the only right answer.
 
Old 02-21-2009, 08:39 AM   #13
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Yes, Users by standard use bin directories instead of sbin directories because of the different configuration of $PATH so try "sudo /usr/sbin/userdel <username>" and I bet it works . Reconfigure sudo as said above, reconfigure sudo...
 
Old 02-22-2009, 11:39 AM   #14
scream
Member
 
Registered: Feb 2008
Distribution: Oracle Linux
Posts: 32

Original Poster
Rep: Reputation: 0
thanks. can anyone provide me a good help file on sudo configuration?
 
Old 02-22-2009, 11:58 AM   #15
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,560

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
As already said: man sudo

Sudo main page:
http://sudo.ws/sudo/sudo.html
 
  


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
Give user root priviledges tekmann33 Linux - General 13 08-01-2011 08:28 PM
User priviledge???? Iptables_NEWBIE Linux - Newbie 3 09-09-2005 04:27 AM
How can I give myself root priv's as a user? Mr. Hill Linux - Newbie 9 06-12-2005 02:19 PM
My processes with root priviledge SiLiCoN Linux - General 2 10-04-2004 04:57 AM
Give root priviligies to an user Skululu Red Hat 7 03-06-2004 08:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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