Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Shutdown Solaris 2.6?

Status
Not open for further replies.

stuhmer

Programmer
Jun 7, 2001
3
US

I have a system that needs to be powered
down each night. I'd like a way for the
users to be able to use shutdown to turn
off power in a nice way. The way we used
to do this with SunOS 4.1.x was to put
a user called 'shutdown' in the /etc/passwd
file with the same uid and group as root,
and instead of a login shell it called
/etc/halt or /etc/shutdown. This doesn't
seem to work on Solaris 2.6. I've tried
writing a setuid shell script but that
doesn't work because only the euid is set.
Any ideas?
 
Unfortuneately, there isn't a definate
time that we could shut the system down.
It has to be at a variable time of day.
Perhaps an 'at' job might work, though.
I'll have to investigate that. Another
option I've heard is the sudo command,
but that isn't installed on the machines.
And I'm not sure if sudo will work with
shell scripts, but that's what I'm looking
into right now. If you have any other
thoughts, I'd appreciate it.
 
I use sudo for scripts on a nightly basis. It works wonderfully.

BV :)
 
Thanks.

Our regular sysadmin and I just got a copy
of sudo from another machine. I'll try
that. I'm pretty sure that this will
solve my problem. (If it doesn't, I
know where to ask. :)

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top