shutdown - possible from login screen?

Hi,

I'm a total newbie to Solaris and Sun hardware, so forgive me if this a very stupid question...... [you know it's going to be when someone says that, right?! :) ]

Is it possible to have the option to 'shutdown' the workstation listed on the login screen?

At the moment, the only way i've found of shutting down the computer is to login as root (using Java Desktop Environment) and then choose logout, which gives you the option to turn off the machine. Or to hold in the power button, but i guess that isn't adviseable?

SunBlade2500 running Solaris 10.

Thanks,

mark.

[619 byte] By [mark-w] at [2007-11-26 8:44:49]
# 1
Anyone?
markw at 2007-7-6 22:27:57 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2

Hmm, you could probably edit the login menus somehow, or add a usernamed called "shutdown", with UID 0 and a script as shell which calls "init 5" or similar.

An alternative is also to switch to gdm login, i think that gdm has a "shutdown" feature:

/usr/dt/bin/dtconfig -kill

/usr/dt/bin/dtconfig -d

svcadm enable -s gdm2-login

Cheers!

7/M.

mAbrante at 2007-7-6 22:27:57 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 3
mAbrante thanks for replying.I didn't realise it'd need a 'hack' - i thought i was just missing something obvious where i could turn various login screen options on or off.(Is there any reason why nobody but root can turn off the machine?)Nevermind. Thanks anyway.
markw at 2007-7-6 22:27:58 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 4

Solaris is built to be a multi user environment.

In this environment it is not advisable to allow a secretary shutting down the company main sun ray server.

Anyway, you can always add a role to shutdown the machine to all users. You can also (and this is a bit dirty solution) make a setuid script for shutdown.

Read the following article for better understanding of system shutdown:

http://www.examcram2.com/articles/article.asp?p=440286&seqNum=15&rl=1

For the login screen, gdm is the simplest solution.

If you wish auto login (don't know but maybe) look at:

http://mail.cc.umanitoba.ca/dtautologin/

Kuon at 2007-7-6 22:27:58 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 5
> In this environment it is not advisable to allow a> secretary shutting down the company main sun ray> server.:) Indeed not, but i thought there may be an option to enable it for workstations.Thanks for your response anyway.
markw at 2007-7-6 22:27:58 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 6

> > In this environment it is not advisable to allow a

> > secretary shutting down the company main sun ray

> > server.

>

> :) Indeed not, but i thought there may be an option

> to enable it for workstations.

>

> Thanks for your response anyway.

You can use sudo.

You can create a role for that.

You can create a setuid script.

Kuon at 2007-7-6 22:27:58 > top of Java-index,Solaris Operating System,Solaris 10 Features...