Go Back   The UNIX and Linux Forums > Operating Systems > Solaris
.
google site



Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-07-2005
Registered User
 

Join Date: Nov 2005
Posts: 35
shutting down by non-root users

I was asked to create a special user that is capable of shutting down our Sun servers in case of emergency (such as power outage). As far as I know, only a root user can run the "sutdown" script. Is there a way to enable a regular user to run the shutdown command? I don't want to give out the root password, so they can't su as root. Any advice will be appreciated!
Sponsored Links
  #2 (permalink)  
Old 12-07-2005
Registered User
 

Join Date: Nov 2003
Location: Minnesota
Posts: 428
You will want to use the tool "sudo" for that. You can give accounts rights to run specific commands with it. Tons of info online about using sudo, just try google and I'm sure you'll be able to find all you need.
  #3 (permalink)  
Old 12-07-2005
Registered User
 

Join Date: Nov 2005
Posts: 35
thanx, I'll give it a try.
  #4 (permalink)  
Old 12-09-2005
Just Ice's Avatar
Lights on, brain off.
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 637
or you can create a root user called "shutdown" with it's own password but only has the required shutdown commands in it's $HOME/.profile ... you still have to protect the password from regular users but at least you get to do what you were asked )
  #5 (permalink)  
Old 12-11-2005
reborg's Avatar
reborg reborg is online now Forum Staff  
Administrator
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,350
The shutdown user is a simple way of doing this, and works quite well.
  #6 (permalink)  
Old 12-12-2005
Registered User
 

Join Date: Nov 2005
Posts: 35
Thanks everyone for help! I set up a shutdown user and gave him sudo rights to the shutdown script. I also created $HOME/.profile file that calls shutdown upon user login, and it works fine. I decided no to create a root user for this purpose.

I discovered a strange anomaly though. First I was trying to set up /etc/passwd to call a script with the shutdown command instead of a shell for the shutdown user, but for some weird reason it doesn't work on Solaris 9 box. The runlevel changes to whatever I tell it to (such as 6), but the system remains up and running. Really weird. It worked on a Solaris 8 box, though. So instead, I opted for the $HOME/.profile script, it works fine on a Solaris 9 box.
  #7 (permalink)  
Old 04-12-2008
yatmianto's Avatar
Registered User
 

Join Date: Apr 2008
Posts: 5
i a beginner sun user, would u give me a complate step to create that....
thx
Sponsored Links
Closed Thread

Bookmarks

Tags
solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Prevent users logging in as root Sepia Solaris 3 06-05-2008 02:45 PM
EUID set for all non-root users chrisanto_2000 Solaris 1 08-21-2007 02:28 PM
Non-Root Users Unable to Print cfshd SCO 1 07-09-2007 10:58 PM
Root ENV is different from users', how to change? alanlh Solaris 4 06-06-2007 11:47 PM
root and all but 2 users locked out kymberm Linux 7 02-26-2005 06:52 PM



All times are GMT -4. The time now is 05:22 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0