LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 08-31-2013, 10:41 AM   #1
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 291

Rep: Reputation: Disabled
How to add a new user in sudoers file?


I created a new user which i want to add in sudoers file.

Please see the part of sudoers file below:
Code:
## Allow root to run any commands anywhere 
root	ALL=(ALL) 	ALL

## Allows members of the 'sys' group to run networking, software, 
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS

## Allows people in group wheel to run all commands
# %wheel	ALL=(ALL)	ALL

## Same thing without a password
# %wheel	ALL=(ALL)	NOPASSWD: ALL

## Allows members of the users group to mount and unmount the 
## cdrom as root
# %users  ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom

## Allows members of the users group to shutdown this system
# %users  localhost=/sbin/shutdown -h now
Shall I add a line below the above blue italisized line
which is the same as the blue line except the name,ie in place
of root, I w'd use the user newly added.
 
Old 08-31-2013, 10:43 AM   #2
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Changes to the sudoers file should be done by using visudo. You can get details via "man visudo".
 
1 members found this post helpful.
Old 08-31-2013, 01:52 PM   #3
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Quote:
# %wheel ALL=(ALL) ALL
If the new user has all things similar to that of "line in blue".. why dont you uncomment the line i quoted above and add the new user to group Wheel. There is no need to enter an extra line to the sudoers for the same thing that is already there.
 
1 members found this post helpful.
Old 08-31-2013, 02:01 PM   #4
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 291

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SAbhi View Post
If the new user has all things similar to that of "line in blue".. why dont you uncomment the line i quoted above and add the new user to group Wheel. There is no need to enter an extra line to the sudoers for the same thing that is already there.
Oh Really great!!!!!!!!!!
Thank you very much for giving such a great method.
By adding the new user to the group wheel, it w'd be easy to manage and very clear. Likewise whenever I need any new person to give sudo permission , I only need to add him in the group without touching sudoers file.

Great!!!!!!!!
Thanks a lot!!!
Marking this thread solved.
 
Old 08-31-2013, 02:06 PM   #5
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 291

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SAbhi View Post
Perfection doesn't comes with doing your work; It comes with Knowing your work -- Abhi Tamrakar
The above line in your signature panel really inspires me.
Thanks for this quote even.

Best Regards,
Ravi Singh
 
Old 09-01-2013, 02:11 AM   #6
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Yeah and it personally belongs to me...
 
Old 09-01-2013, 02:30 AM   #7
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 291

Original Poster
Rep: Reputation: Disabled
Lightbulb

Quote:
Originally Posted by SAbhi View Post
Yeah and it personally belongs to me...
That's why perfection reflected in your solution.

We had heard of the quote :" practise makes a man perfect"
But the one you had quoted has overshadowed the older one.

Great!
 
Old 09-01-2013, 05:02 AM   #8
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Ofcourse it should... thats been written by me ...
 
  


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
[SOLVED] User not in sudoers: How to add user? Permtion Denied for sudoers file esgol Linux - Newbie 3 07-13-2012 07:44 AM
[SOLVED] User is not in the sudoers file khinch Debian 5 03-28-2012 12:27 PM
add user to sudoers zimbot Linux - General 3 12-15-2011 08:36 AM
'user' not in the sudoers file thomas2004ch Linux - Software 6 05-24-2011 10:20 AM
User not in the sudoers file ersek Linux - Newbie 10 06-09-2009 12:35 PM

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

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