LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-11-2013, 12:40 PM   #1
jayadhanesh
Member
 
Registered: Feb 2009
Location: Bangalore
Posts: 61

Rep: Reputation: 15
User with root privileges


Hi,

How can I give root permission to a user without using sudo?

Thanks,
Dhanesh.
 
Old 06-11-2013, 12:43 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,935

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Quote:
Originally Posted by jayadhanesh View Post
Hi,
How can I give root permission to a user without using sudo?
You can assign them to group 0, which will work for SOME things, but some commands REQUIRE you to be root. The longer answer is: you don't, and shouldn't. This is a VERY bad thing to do, and (since you have access to tools like sudo), pointless. Sudo exists for a reason.
 
Old 06-11-2013, 03:10 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Quote:
Originally Posted by jayadhanesh View Post
Hi,

How can I give root permission to a user without using sudo?

Thanks,
Dhanesh.
Simple: give him the root password. Keep in mind that you only should do this if you are sure that the user can handle root permissions and is trusted enough to do things as root on your system.
 
Old 06-11-2013, 03:29 PM   #4
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 647

Rep: Reputation: 52
If you're looking to make a user root for a series of commands (ie: you don't want to type `sudo command' a hundred times over you can always use ` sudo -s ' (without quotes).

But, I agree with everyone above--- making a user root by default is a very bad idea.
 
Old 06-11-2013, 03:55 PM   #5
mariose
Member
 
Registered: May 2013
Location: South Africa
Distribution: Debian
Posts: 176
Blog Entries: 1

Rep: Reputation: 7
Agreed. Giving users root access is an accident waiting to happen. Your problems will be become more frequent.
 
Old 06-11-2013, 04:35 PM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,096
Blog Entries: 10

Rep: Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522Reputation: 1522
Quote:
Originally Posted by jayadhanesh View Post
Hi,

How can I give root permission to a user without using sudo?

Thanks,
Dhanesh.
If your desire is to not give them the root password, then why do you want to do this?

Is the problem instead that someone needs root privileges to run a script and that's why this is being asked? You can configure the sudoers file so that someone does not need to use their password to execute sudo commands.

Quote:
ALL ALL=NOPASSWD: ALL
 
Old 06-11-2013, 05:57 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Quote:
Originally Posted by rtmistler View Post
If your desire is to not give them the root password, then why do you want to do this?

Is the problem instead that someone needs root privileges to run a script and that's why this is being asked? You can configure the sudoers file so that someone does not need to use their password to execute sudo commands.
Code:
 ALL ALL=NOPASSWD: ALL
If it is only one script that has to be run by root it would be a very bad idea to configure sudo like that, since this effectively makes all users root without having to use a password.
For only one command use it like that:
Code:
username ALL=NOPASSWD: /path/to/script
P.S.: Please use code-tags, not quote-tags for code.
 
  


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 to create a user without root privileges peace18 Linux - Newbie 4 04-09-2011 01:12 PM
How can I get root user privileges at startup? lyberrian Linux - Newbie 3 05-19-2007 04:13 PM
Linux - How to add a new user with the same root/super-user's privileges? asgarcymed Linux - General 8 12-23-2006 08:45 PM
Root privileges for user ar1 Linux - Security 2 01-07-2005 10:33 PM
User with root privileges ShakyJake Linux - Newbie 2 06-18-2004 01:12 PM


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