1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Proper way to shut down a Sunblade 150 if not super user?

Discussion in 'Sun Hardware' started by Barry OGrady, Jan 30, 2009.

  1. Barry OGrady

    Barry OGrady Guest

    What is the proper way to shut down a Sunblade 150 if logged
    on as an ordinary user?
    I was thinking of using sudo from a shortcut on the desktop.
    Could that work?
    There must be a standard procedure though.

    Barry
    =====
    Home page
    http://members.iinet.net.au/~barry.og
     
    Barry OGrady, Jan 30, 2009
    #1
    1. Advertising

  2. Barry OGrady

    Paul Gress Guest

    Barry OGrady wrote:
    > What is the proper way to shut down a Sunblade 150 if logged
    > on as an ordinary user?
    > I was thinking of using sudo from a shortcut on the desktop.
    > Could that work?
    > There must be a standard procedure though.
    >
    > Barry
    > =====
    > Home page
    > http://members.iinet.net.au/~barry.og



    This is what I do.

    /opt/csw/bin/sudo /sbin/init 5

    Also, if I recall correctly, on my Blade 100 (when I used it), if you
    double click the power button it initiates a powerdown.

    Paul
     
    Paul Gress, Jan 30, 2009
    #2
    1. Advertising

  3. Paul Gress <> wrote:
    > Barry OGrady wrote:
    >> What is the proper way to shut down a Sunblade 150 if logged
    >> on as an ordinary user?
    >> I was thinking of using sudo from a shortcut on the desktop.
    >> Could that work?
    >> There must be a standard procedure though.
    >>
    >> Barry
    >> =====
    >> Home page
    >> http://members.iinet.net.au/~barry.og

    >
    >
    > This is what I do.
    >
    > /opt/csw/bin/sudo /sbin/init 5
    >
    > Also, if I recall correctly, on my Blade 100 (when I used it), if you
    > double click the power button it initiates a powerdown.
    >
    > Paul


    setting a correct path would make this command far easier.
     
    Cydrome Leader, Jan 30, 2009
    #3
  4. Barry OGrady

    David Wilson Guest

    On Jan 30, 10:26 pm, Barry OGrady <> wrote:
    > What is the proper way to shut down a Sunblade 150 if logged
    > on as an ordinary user?
    > There must be a standard procedure though.


    Are you sitting in front of it or remotely logged in? If the former,
    press and release the power button. This will invoke the "powerfail"
    entry in /etc/inittab which invokes /usr/bin/shutdown (as root).

    This was an annoying feature when I ran a lab of 36x Ultra5 (then
    replaced by SunBlade 150 computers) as the students would arrive, see
    a black screen (screen saver after last user logged out), push the
    power button to turn the system on causing the system to shutdown
    which resulted in rather short up times...

    If the power button is held in for >5 seconds the system will power
    off without doing a clean shutdown.
     
    David Wilson, Jan 31, 2009
    #4
  5. rkiesling <> writes:

    > Cydrome Leader <> writes:
    >
    >> Paul Gress <> wrote:
    >>> Barry OGrady wrote:
    >>>> What is the proper way to shut down a Sunblade 150 if logged
    >>>> on as an ordinary user?
    >>>> I was thinking of using sudo from a shortcut on the desktop.
    >>>> Could that work?
    >>>> There must be a standard procedure though.
    >>>>
    >>>> Barry
    >>>> =====
    >>>> Home page
    >>>> http://members.iinet.net.au/~barry.og
    >>>
    >>>
    >>> This is what I do.
    >>>
    >>> /opt/csw/bin/sudo /sbin/init 5
    >>>
    >>> Also, if I recall correctly, on my Blade 100 (when I used it), if you
    >>> double click the power button it initiates a powerdown.
    >>>
    >>> Paul

    >>
    >> setting a correct path would make this command far easier.

    >
    > ln -s is your friend. Sudo as most admins know it is not
    > standard equipment after Solaris 9 or so. Some of the
    > aftermarket sudo's install in /usr/local/bin.
    >
    > --
    > Ctalk Home Page: http://www.ctalklang.org


    spiff:/etc/opt/SUNWut (220)> which sudo
    /usr/bin/sudo

    spiff:/etc/opt/SUNWut (221)> pkgchk -l -p /usr/bin/sudo
    Pathname: /usr/bin/sudo
    Type: regular file
    Expected mode: 4511
    Expected owner: root
    Expected group: bin
    Expected file size (bytes): 181792
    Expected sum(1) of contents: 2495
    Expected last modification: Jan 23 05:02:24 2009
    Referenced by the following packages:
    SUNWsudou
    Current status: installed

    spiff:/etc/opt/SUNWut (222)> uname -a
    SunOS spiff 5.11 snv_107 i86pc i386 i86pc

    spiff:/etc/opt/SUNWut (223)> pkginfo -l SUNWsudou
    PKGINST: SUNWsudou
    NAME: sudo (usr)
    CATEGORY: system
    ARCH: i386
    VERSION: 11.11.0,REV=2009.01.21.04.18
    BASEDIR: /
    VENDOR: Sun Microsystems, Inc.
    DESC: sudo (usr)
    PSTAMP: sfwnv-x20090121055858
    INSTDATE: jan 30 2009 21:25
    HOTLINE: Please contact your local service provider
    STATUS: completely installed
    FILES: 23 installed pathnames
    11 shared pathnames
    1 linked files
    11 directories
    4 executables
    1 setuid/setgid executables
    880 blocks used (approx)
     
    Thomas Tornblom, Jan 31, 2009
    #5
  6. Barry OGrady

    Paul Gress Guest

    Thomas Tornblom wrote:

    > spiff:/etc/opt/SUNWut (220)> which sudo
    > /usr/bin/sudo
    >
    > spiff:/etc/opt/SUNWut (221)> pkgchk -l -p /usr/bin/sudo
    > Pathname: /usr/bin/sudo


    > Current status: installed
    >


    Ok, I originally came from Solaris 10 which didn't have sudo. Never
    expected Opensolaris to have it. Thanks for pointing that out.

    Paul
     
    Paul Gress, Feb 1, 2009
    #6
  7. Barry OGrady

    DoN. Nichols Guest

    On 2009-02-01, Paul Gress <> wrote:
    > Thomas Tornblom wrote:
    >
    >> spiff:/etc/opt/SUNWut (220)> which sudo
    >> /usr/bin/sudo
    >>
    >> spiff:/etc/opt/SUNWut (221)> pkgchk -l -p /usr/bin/sudo
    >> Pathname: /usr/bin/sudo

    >
    >> Current status: installed
    >>

    >
    > Ok, I originally came from Solaris 10 which didn't have sudo. Never
    > expected Opensolaris to have it. Thanks for pointing that out.


    Depends on whether you have installed the Software_Companion CD.
    I have Solaris 10 on this system, and:

    ======================================================================
    Katana:dnichols 21:14:24 > which sudo
    /opt/sfw/bin/sudo

    Katana:dnichols 21:23:47 > uname -a
    SunOS Katana 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Blade-1000
    ======================================================================

    Enjoy,
    DoN.

    --
    Email: <> | Voice (all times): (703) 938-4564
    (too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html
    --- Black Holes are where God is dividing by zero ---
     
    DoN. Nichols, Feb 2, 2009
    #7
  8. Barry OGrady

    Barry OGrady Guest

    On Fri, 30 Jan 2009 10:50:08 -0500, Paul Gress <> wrote:

    >Barry OGrady wrote:
    >> What is the proper way to shut down a Sunblade 150 if logged
    >> on as an ordinary user?
    >> I was thinking of using sudo from a shortcut on the desktop.
    >> Could that work?
    >> There must be a standard procedure though.
    >>
    >> Barry
    >> =====
    >> Home page
    >> http://members.iinet.net.au/~barry.og

    >
    >
    >This is what I do.
    >
    >/opt/csw/bin/sudo /sbin/init 5


    I don't have sudo install being it Solaris 10.
    I have a small script that runs shutdown but it needs super user.
    I know the root password so I just use su then run the script.

    >Also, if I recall correctly, on my Blade 100 (when I used it), if you
    >double click the power button it initiates a powerdown.


    That does nothing on my 150.

    >Paul


    Barry
    =====
    Home page
    http://members.iinet.net.au/~barry.og
     
    Barry OGrady, Feb 17, 2009
    #8
  9. Barry OGrady

    Barry OGrady Guest

    On Fri, 30 Jan 2009 20:11:49 -0800 (PST), David Wilson <> wrote:

    >On Jan 30, 10:26 pm, Barry OGrady <> wrote:
    >> What is the proper way to shut down a Sunblade 150 if logged
    >> on as an ordinary user?
    >> There must be a standard procedure though.

    >
    >Are you sitting in front of it or remotely logged in? If the former,
    >press and release the power button. This will invoke the "powerfail"
    >entry in /etc/inittab which invokes /usr/bin/shutdown (as root).


    Pressing the power button <3 seconds does nothing.

    >This was an annoying feature when I ran a lab of 36x Ultra5 (then
    >replaced by SunBlade 150 computers) as the students would arrive, see
    >a black screen (screen saver after last user logged out), push the
    >power button to turn the system on causing the system to shutdown
    >which resulted in rather short up times...
    >
    >If the power button is held in for >5 seconds the system will power
    >off without doing a clean shutdown.


    It does do that.

    Given that the Sunblade 150 is a desktop machine I would expect
    most users would not know the root password.
    Thus I figure they must have a way of shutting down properly.

    Barry
    =====
    Home page
    http://members.iinet.net.au/~barry.og
     
    Barry OGrady, Feb 17, 2009
    #9
  10. Barry OGrady

    Gert Doering Guest

    Barry OGrady <> writes:

    >Given that the Sunblade 150 is a desktop machine I would expect
    >most users would not know the root password.
    >Thus I figure they must have a way of shutting down properly.


    "Unix machines are not for rebooting".

    gert
    --
    Yield to temptation ... it may not pass your way again! -- Lazarus Long
    //www.muc.de/~gert
    Gert Doering - Munich, Germany
    fax: +49-89-3243328 -muenchen.de
     
    Gert Doering, Feb 17, 2009
    #10
  11. Barry OGrady

    Barry OGrady Guest

    On Tue, 17 Feb 2009 08:44:45 -0500, rkiesling <> wrote:

    >Barry OGrady <> writes:
    >
    >> On Fri, 30 Jan 2009 20:11:49 -0800 (PST), David Wilson <> wrote:
    >>
    >>>On Jan 30, 10:26 pm, Barry OGrady <> wrote:
    >>>> What is the proper way to shut down a Sunblade 150 if logged
    >>>> on as an ordinary user?
    >>>> There must be a standard procedure though.
    >>>
    >>>Are you sitting in front of it or remotely logged in? If the former,
    >>>press and release the power button. This will invoke the "powerfail"
    >>>entry in /etc/inittab which invokes /usr/bin/shutdown (as root).

    >>
    >> Pressing the power button <3 seconds does nothing.
    >>
    >>>This was an annoying feature when I ran a lab of 36x Ultra5 (then
    >>>replaced by SunBlade 150 computers) as the students would arrive, see
    >>>a black screen (screen saver after last user logged out), push the
    >>>power button to turn the system on causing the system to shutdown
    >>>which resulted in rather short up times...
    >>>
    >>>If the power button is held in for >5 seconds the system will power
    >>>off without doing a clean shutdown.

    >>
    >> It does do that.
    >>
    >> Given that the Sunblade 150 is a desktop machine I would expect
    >> most users would not know the root password.
    >> Thus I figure they must have a way of shutting down properly.

    >
    >DONK! (slaps forehead with hand, 10 times) Does pressing the
    >the power button on the upper right-hand corner of the
    >keyboard pop up a dialog?


    If I am logged in as root it brings up a choice of
    low power, shutdown, or cancel.
    If logged in as an ordinary user I get
    "User does not have permission to use gnome-sys-suspend command."

    >--
    >Ctalk Home Page: http://www.ctalklang.org


    Barry
    =====
    Home page
    http://members.iinet.net.au/~barry.og
     
    Barry OGrady, Feb 17, 2009
    #11
  12. Barry OGrady

    DoN. Nichols Guest

    On 2009-02-17, Barry OGrady <> wrote:
    > On Fri, 30 Jan 2009 10:50:08 -0500, Paul Gress <> wrote:
    >
    >>Barry OGrady wrote:
    >>> What is the proper way to shut down a Sunblade 150 if logged
    >>> on as an ordinary user?
    >>> I was thinking of using sudo from a shortcut on the desktop.
    >>> Could that work?
    >>> There must be a standard procedure though.


    [ ... ]

    >>This is what I do.
    >>
    >>/opt/csw/bin/sudo /sbin/init 5

    >
    > I don't have sudo install being it Solaris 10.


    I have sudo -- and I'm running Solaris 10. Check the following
    path:

    /opt/sfw/bin/sudo

    which sounds almost like what was above -- except for the spelling of
    the first level subdirectory in /opt.

    Granted, since it is in /opt/sfw, you need to have installed it
    from the Software Companion CD-ROM. But it *does* come with Solaris 10.

    > I have a small script that runs shutdown but it needs super user.
    > I know the root password so I just use su then run the script.


    You can do this with sudo, and only need to type in your own
    password, once /opt/sfw/etc/sudoers is configured for that. You can
    edit it to allow *anyone* to run shutdown as root, while not allowing
    them to run anything else as root.

    >>Also, if I recall correctly, on my Blade 100 (when I used it), if you
    >>double click the power button it initiates a powerdown.

    >
    > That does nothing on my 150.


    Download from Sun the document: 816-4379-10.pdf

    Go to page 5-4 and start at the bottom:


    ======================================================================
    5.5 Powering Off the System
    Caution ­ Exit from the operating system before turning off
    system power. Failure
    to do so may result in data loss.
    1. Back up system files and data.
    If Solaris is running in a windowing environment
    ======================================================================

    then continue on page 5.6:

    ======================================================================
    Momentarily press and release the front panel power switch (FIGURE 5-1) to
    automatically shut down all programs, the operating system, and power off the
    system.

    From the system shutdown menu displayed on the monitor, select "Shutdown."

    If Solaris is not running in a windowing environment:
    I
    Press and hold the front panel power switch (FIGURE 5-1) for four seconds to
    power off the system.
    Caution ­ This action forces an immediate power off of the system and unsaved
    data is lost.
    ======================================================================

    So -- if the momentary operation of the power switch does not
    bring you to the shutdown menu while running Solaris 10, then the system
    is broken.

    If you *don't* have the system booted, then you hold it in for
    four seconds to power it off.

    Go ahead -- download the manual and take the time to *read* it.

    Good Luck,
    DoN.

    --
    Email: <> | Voice (all times): (703) 938-4564
    (too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html
    --- Black Holes are where God is dividing by zero ---
     
    DoN. Nichols, Feb 18, 2009
    #12
  13. Barry OGrady

    DoN. Nichols Guest

    On 2009-02-17, Barry OGrady <> wrote:
    > On Fri, 30 Jan 2009 20:11:49 -0800 (PST), David Wilson <> wrote:
    >
    >>On Jan 30, 10:26 pm, Barry OGrady <> wrote:
    >>> What is the proper way to shut down a Sunblade 150 if logged
    >>> on as an ordinary user?
    >>> There must be a standard procedure though.

    >>
    >>Are you sitting in front of it or remotely logged in? If the former,
    >>press and release the power button. This will invoke the "powerfail"
    >>entry in /etc/inittab which invokes /usr/bin/shutdown (as root).

    >
    > Pressing the power button <3 seconds does nothing.


    Then the machine is broken.

    [ ... ]

    > Given that the Sunblade 150 is a desktop machine I would expect
    > most users would not know the root password.
    > Thus I figure they must have a way of shutting down properly.


    What keyboard do you have? If it has a white key at the upper
    right, pressing that should also initiate a shutdown.

    If it does not, perhaps someone figured out how to disable it in
    software. I suspect that the same software handles both the power
    button blip and the keyboard shutdown key press. (If the system uses
    USB keyboards, then the keytop has a crescent moon on it -- to indicate
    "go to sleep", since it can't power it back up the way the older DIN
    connector Sun keyboards could do.

    If you don't have a Sun keyboard, that might be part of your
    problem. The "sleep" key even works on an Intel-based Mac Mini, FWIW.
    I keep being tempted to add a stiffer spring under that key, because it
    gets brushed by my shirt cuff while working the trackball. (I use
    LogiTech trackballs on both the Suns and the Mac Mini in preference to
    standard ball based rodents. :)

    Enjoy,
    DoN.

    --
    Email: <> | Voice (all times): (703) 938-4564
    (too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html
    --- Black Holes are where God is dividing by zero ---
     
    DoN. Nichols, Feb 18, 2009
    #13
  14. Barry OGrady

    Barry OGrady Guest

    On 18 Feb 2009 05:04:27 GMT, "DoN. Nichols" <> wrote:

    >On 2009-02-17, Barry OGrady <> wrote:
    >> On Fri, 30 Jan 2009 20:11:49 -0800 (PST), David Wilson <> wrote:
    >>
    >>>On Jan 30, 10:26 pm, Barry OGrady <> wrote:
    >>>> What is the proper way to shut down a Sunblade 150 if logged
    >>>> on as an ordinary user?
    >>>> There must be a standard procedure though.
    >>>
    >>>Are you sitting in front of it or remotely logged in? If the former,
    >>>press and release the power button. This will invoke the "powerfail"
    >>>entry in /etc/inittab which invokes /usr/bin/shutdown (as root).

    >>
    >> Pressing the power button <3 seconds does nothing.

    >
    > Then the machine is broken.


    Possibly, though it works otherwise.

    > [ ... ]
    >
    >> Given that the Sunblade 150 is a desktop machine I would expect
    >> most users would not know the root password.
    >> Thus I figure they must have a way of shutting down properly.

    >
    > What keyboard do you have? If it has a white key at the upper
    >right, pressing that should also initiate a shutdown.


    Its a Sun type 6, with a moon icon on the upper right.
    Pressing that lets me log off only if logged on as root.

    > If it does not, perhaps someone figured out how to disable it in
    >software. I suspect that the same software handles both the power
    >button blip and the keyboard shutdown key press. (If the system uses
    >USB keyboards, then the keytop has a crescent moon on it -- to indicate
    >"go to sleep", since it can't power it back up the way the older DIN
    >connector Sun keyboards could do.
    >
    > If you don't have a Sun keyboard, that might be part of your
    >problem. The "sleep" key even works on an Intel-based Mac Mini, FWIW.
    >I keep being tempted to add a stiffer spring under that key, because it
    >gets brushed by my shirt cuff while working the trackball. (I use
    >LogiTech trackballs on both the Suns and the Mac Mini in preference to
    >standard ball based rodents. :)


    Am I wrong in thinking there must be a simple standard way for a non
    superuser to shut down?

    > Enjoy,
    > DoN.
    >
    >--


    Barry
    =====
    Home page
    http://members.iinet.net.au/~barry.og
     
    Barry OGrady, Feb 20, 2009
    #14
  15. Barry OGrady

    DoN. Nichols Guest

    On 2009-02-20, Barry OGrady <> wrote:
    > On 18 Feb 2009 05:04:27 GMT, "DoN. Nichols" <> wrote:
    >
    >>On 2009-02-17, Barry OGrady <> wrote:
    >>> On Fri, 30 Jan 2009 20:11:49 -0800 (PST), David Wilson <> wrote:
    >>>
    >>>>On Jan 30, 10:26 pm, Barry OGrady <> wrote:
    >>>>> What is the proper way to shut down a Sunblade 150 if logged
    >>>>> on as an ordinary user?
    >>>>> There must be a standard procedure though.
    >>>>
    >>>>Are you sitting in front of it or remotely logged in? If the former,
    >>>>press and release the power button. This will invoke the "powerfail"
    >>>>entry in /etc/inittab which invokes /usr/bin/shutdown (as root).
    >>>
    >>> Pressing the power button <3 seconds does nothing.

    >>
    >> Then the machine is broken.

    >
    > Possibly, though it works otherwise.


    The configuration appears to be broken. You use Gnome, I use
    CDE. I have no problems with CDE using either approach.

    >> [ ... ]
    >>
    >>> Given that the Sunblade 150 is a desktop machine I would expect
    >>> most users would not know the root password.
    >>> Thus I figure they must have a way of shutting down properly.

    >>
    >> What keyboard do you have? If it has a white key at the upper
    >>right, pressing that should also initiate a shutdown.

    >
    > Its a Sun type 6, with a moon icon on the upper right.
    > Pressing that lets me log off only if logged on as root.


    Which means that something which should be configured SUID root
    is not. Or perhaps the permissions on /dev/console are wrong.

    O.K. /dev/console is a symlink, and its target is:

    crw--w---- 1 dnichols tty 0, 0 Feb 20 21:10 /devices/pseudo/cn@0:console

    note the write permission for group tty. That might be part of it.

    I'm not going to bother logging out of my forty windows to
    change my window manager to Gnome, log back in, and see whether I can
    suspend my system as a plain user from the keyboard. (I'll bet that the
    power button has the same problem -- permissions on the program which
    monitors it.

    Do you have powerd in the list of processes running? It runs
    under UID 0 (root), and it pays attention to /etc/power.conf. Here is
    what mine looks like:


    ======================================================================
    #
    # Copyright 1996-2002 Sun Microsystems, Inc. All rights reserved.
    # Use is subject to license terms.
    #
    #pragma ident "@(#)power.conf 2.1 02/03/04 SMI"
    #
    # Power Management Configuration File
    #

    device-dependency-property removable-media /dev/fb
    autopm disable
    system-threshold always-on
    # Auto-Shutdown Idle(min) Start/Finish(hh:mm) Behavior
    autoshutdown 30 9:00 9:00 noshutdown
    # Statefile Path
    statefile /usr/.CPR
    ======================================================================

    Did you (or someone else after installation of the Solaris 10)
    go through and turn off the SUID bit on programs which were found with
    it turned on?. This might be the problem.

    IIRC -- there was a configuration for the behavior of shutdown
    in the CDE system -- and presumably there is one in your Gnome as well.
    O.K. In CDE, go into the "Applications Manager -- Desktop Controls" and
    double-click on "Power Manager" which shows mine as "Customized".

    O.K. That fired up "dtpower", so I did the following:

    ======================================================================
    man -k power | grep -i gnome
    ======================================================================

    and found:
    ======================================================================
    gnome-sys-suspend
    ======================================================================

    and the man page says (in part):

    ======================================================================
    NAME
    gnome-sys-suspend - suspend or shut down the system and
    power off

    SYNOPSIS
    gnome-sys-suspend [-fnxh] [-d displayname]

    DESCRIPTION
    gnome-sys-suspend provides options to suspend or shut down
    the whole system.

    A system may be suspended to conserve power or to prepare
    the system for transport. Do not use the suspend operation
    when performing any hardware reconfiguration or replacement.
    ======================================================================

    I'll let you figure out how to invoke it from your Gnome desktop
    environment.

    >> If it does not, perhaps someone figured out how to disable it in
    >>software. I suspect that the same software handles both the power
    >>button blip and the keyboard shutdown key press. (If the system uses
    >>USB keyboards, then the keytop has a crescent moon on it -- to indicate
    >>"go to sleep", since it can't power it back up the way the older DIN
    >>connector Sun keyboards could do.
    >>
    >> If you don't have a Sun keyboard, that might be part of your
    >>problem. The "sleep" key even works on an Intel-based Mac Mini, FWIW.
    >>I keep being tempted to add a stiffer spring under that key, because it
    >>gets brushed by my shirt cuff while working the trackball. (I use
    >>LogiTech trackballs on both the Suns and the Mac Mini in preference to
    >>standard ball based rodents. :)

    >
    > Am I wrong in thinking there must be a simple standard way for a non
    > superuser to shut down?


    No -- there is -- but you have either disabled it somehow, or
    you've got to find how to invoke it from within Gnome.

    It does say (in a rather strangely formatted bit of text in the
    man page):

    ======================================================================
    console-owner A
    user
    who
    owns
    the
    sys-
    tem
    con-
    sole
    dev-
    ice
    node,
    and
    superuser,
    can
    use
    the
    com-
    mand.
    This
    is
    the
    default
    value.
    ======================================================================

    so -- check who owns the console. This appears to be important to the
    operation of this program.

    Good Luck,
    DoN.

    --
    Email: <> | Voice (all times): (703) 938-4564
    (too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html
    --- Black Holes are where God is dividing by zero ---
     
    DoN. Nichols, Feb 21, 2009
    #15
  16. On 02/20/09 21:37, DoN. Nichols wrote:
    > On 2009-02-20, Barry OGrady<> wrote:
    >> On 18 Feb 2009 05:04:27 GMT, "DoN. Nichols"<> wrote:
    >>
    >>> On 2009-02-17, Barry OGrady<> wrote:
    >>>> On Fri, 30 Jan 2009 20:11:49 -0800 (PST), David Wilson<> wrote:
    >>>>
    >>>>> On Jan 30, 10:26 pm, Barry OGrady<> wrote:
    >>>>>> What is the proper way to shut down a Sunblade 150 if logged
    >>>>>> on as an ordinary user?
    >>>>>> There must be a standard procedure though.
    >>>>> Are you sitting in front of it or remotely logged in? If the former,
    >>>>> press and release the power button. This will invoke the "powerfail"
    >>>>> entry in /etc/inittab which invokes /usr/bin/shutdown (as root).
    >>>> Pressing the power button<3 seconds does nothing.
    >>> Then the machine is broken.

    >> Possibly, though it works otherwise.

    >
    > The configuration appears to be broken. You use Gnome, I use
    > CDE. I have no problems with CDE using either approach.
    >
    >>> [ ... ]
    >>>
    >>>> Given that the Sunblade 150 is a desktop machine I would expect
    >>>> most users would not know the root password.
    >>>> Thus I figure they must have a way of shutting down properly.
    >>> What keyboard do you have? If it has a white key at the upper
    >>> right, pressing that should also initiate a shutdown.

    >> Its a Sun type 6, with a moon icon on the upper right.
    >> Pressing that lets me log off only if logged on as root.

    >
    > Which means that something which should be configured SUID root
    > is not. Or perhaps the permissions on /dev/console are wrong.
    >
    > O.K. /dev/console is a symlink, and its target is:
    >
    > crw--w---- 1 dnichols tty 0, 0 Feb 20 21:10 /devices/pseudo/cn@0:console
    >
    > note the write permission for group tty. That might be part of it.
    >
    > I'm not going to bother logging out of my forty windows to
    > change my window manager to Gnome, log back in, and see whether I can
    > suspend my system as a plain user from the keyboard. (I'll bet that the
    > power button has the same problem -- permissions on the program which
    > monitors it.
    >
    > Do you have powerd in the list of processes running? It runs
    > under UID 0 (root), and it pays attention to /etc/power.conf. Here is
    > what mine looks like:
    >
    >
    > ======================================================================
    > #
    > # Copyright 1996-2002 Sun Microsystems, Inc. All rights reserved.
    > # Use is subject to license terms.
    > #
    > #pragma ident "@(#)power.conf 2.1 02/03/04 SMI"
    > #
    > # Power Management Configuration File
    > #
    >
    > device-dependency-property removable-media /dev/fb
    > autopm disable
    > system-threshold always-on
    > # Auto-Shutdown Idle(min) Start/Finish(hh:mm) Behavior
    > autoshutdown 30 9:00 9:00 noshutdown
    > # Statefile Path
    > statefile /usr/.CPR
    > ======================================================================
    >
    > Did you (or someone else after installation of the Solaris 10)
    > go through and turn off the SUID bit on programs which were found with
    > it turned on?. This might be the problem.
    >
    > IIRC -- there was a configuration for the behavior of shutdown
    > in the CDE system -- and presumably there is one in your Gnome as well.
    > O.K. In CDE, go into the "Applications Manager -- Desktop Controls" and
    > double-click on "Power Manager" which shows mine as "Customized".
    >
    > O.K. That fired up "dtpower", so I did the following:
    >
    > ======================================================================
    > man -k power | grep -i gnome
    > ======================================================================
    >
    > and found:
    > ======================================================================
    > gnome-sys-suspend
    > ======================================================================
    >
    > and the man page says (in part):
    >
    > ======================================================================
    > NAME
    > gnome-sys-suspend - suspend or shut down the system and
    > power off
    >
    > SYNOPSIS
    > gnome-sys-suspend [-fnxh] [-d displayname]
    >
    > DESCRIPTION
    > gnome-sys-suspend provides options to suspend or shut down
    > the whole system.
    >
    > A system may be suspended to conserve power or to prepare
    > the system for transport. Do not use the suspend operation
    > when performing any hardware reconfiguration or replacement.
    > ======================================================================
    >
    > I'll let you figure out how to invoke it from your Gnome desktop
    > environment.
    >
    >>> If it does not, perhaps someone figured out how to disable it in
    >>> software. I suspect that the same software handles both the power
    >>> button blip and the keyboard shutdown key press. (If the system uses
    >>> USB keyboards, then the keytop has a crescent moon on it -- to indicate
    >>> "go to sleep", since it can't power it back up the way the older DIN
    >>> connector Sun keyboards could do.
    >>>
    >>> If you don't have a Sun keyboard, that might be part of your
    >>> problem. The "sleep" key even works on an Intel-based Mac Mini, FWIW.
    >>> I keep being tempted to add a stiffer spring under that key, because it
    >>> gets brushed by my shirt cuff while working the trackball. (I use
    >>> LogiTech trackballs on both the Suns and the Mac Mini in preference to
    >>> standard ball based rodents. :)

    >> Am I wrong in thinking there must be a simple standard way for a non
    >> superuser to shut down?

    >
    > No -- there is -- but you have either disabled it somehow, or
    > you've got to find how to invoke it from within Gnome.
    >
    > It does say (in a rather strangely formatted bit of text in the
    > man page):
    >
    > ======================================================================
    > console-owner A
    > user
    > who
    > owns
    > the
    > sys-
    > tem
    > con-
    > sole
    > dev-
    > ice
    > node,
    > and
    > superuser,
    > can
    > use
    > the
    > com-
    > mand.
    > This
    > is
    > the
    > default
    > value.
    > ======================================================================
    >
    > so -- check who owns the console. This appears to be important to the
    > operation of this program.
    >
    > Good Luck,
    > DoN.#


    Check /etc/default/sys-suspend


    This file contains user(s) with permission to
    # execute sys-suspend(1M).
    #
    # The following settings are recognized:
    #
    # all any user can use this command
    #
    # - nobody except super-user can
    # use this command
    #
    # <user1, user2, etc.> a user in this user list or
    # super-user can use this command.
    # The list of user is a space and/or
    # comma (,) separated list enclosed
    # in < and > characters.
    #
    # console-owner a user who owns the system
    # console device node or super-user
    # can use this command
    # (default)
    #
    #
    PERMS=console-owner

    Bill
    >
     
    Bill Goodridge, Feb 21, 2009
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ns
    Replies:
    0
    Views:
    394
  2. EW
    Replies:
    1
    Views:
    457
    Greg Andrews
    Jul 12, 2003
  3. Paul (Jimbo) Duncan G7KES

    Maxtor Firewire Drive + Sunblade 150

    Paul (Jimbo) Duncan G7KES, Feb 3, 2004, in forum: Sun Hardware
    Replies:
    2
    Views:
    231
    sun1394guy
    Feb 6, 2004
  4. Mike Palamarek

    Mounting Sunblade 150 on side?

    Mike Palamarek, Feb 18, 2004, in forum: Sun Hardware
    Replies:
    8
    Views:
    259
    Richard L. Hamilton
    Feb 22, 2004
  5. David Gerard
    Replies:
    2
    Views:
    420
    Chris Morgan
    Jul 26, 2004
Loading...

Share This Page