LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-12-2014, 11:25 PM   #1
massy
Member
 
Registered: Nov 2013
Distribution: CentOS 6.4
Posts: 209
Blog Entries: 1

Rep: Reputation: Disabled
how to get permission for rebooting linux to a user


I try to do it via usermod command, but It didn't work.
I don't have sudoers file in the /etc.
I need to run reboot command by a user expect root!
 
Old 04-12-2014, 11:31 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
In that case
Code:
yum install sudo
Its definitely the tool to use for this job.

If you messed with usermod and/or the perms/ownership on the relevant cmds, please put them back .
 
1 members found this post helpful.
Old 04-14-2014, 04:59 AM   #3
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,672

Rep: Reputation: 486Reputation: 486Reputation: 486Reputation: 486Reputation: 486
Giving reboot/shutdown powers to a user is a BAD idea so you always need root privileges either by elevating your privilege by su or sudo dependant on which type of distro you're using.

Imagine giving a user these rights on a server running loads of virtual systems. Nightmare! So...
Quote:
I need to run reboot command by a user expect root!
Exactly! This is best practice so you should get used to it.

Play Bonny!

 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux user permission vidyasagar6 Linux - Server 3 11-29-2012 03:26 PM
Linux User Permission it_guy Red Hat 10 05-04-2011 08:39 PM
How to notify user about rebooting? KFC123 Linux - Newbie 5 08-19-2009 05:50 AM
Set the linux user permission beparas Linux - General 2 02-14-2009 05:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:22 AM.

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