Ubuntu can be shutdown from lock screen without password

Petter Adsen petter at synth.no
Wed Jul 29 06:47:52 UTC 2015


On Wed, 29 Jul 2015 10:53:27 +0530
Jatin khatri <khatri.jatin at gmail.com> wrote:

> On Monday 27 July 2015 04:06 PM, somebody.mozfr wrote:
> > Le 27/07/2015 12:28, Jatin khatri a écrit :
> >> On Monday 27 July 2015 03:33 PM, somebody.mozfr wrote:
> >>> If someone has access to your laptop, he can shut it down by 
> >>> pressing the power button or removing the battery anyway.
> >>>
> >>> I think that's why it's not protected : it would not prevent anyone 
> >>> from shutting it down. And this shutdown is less dangerous for your 
> >>> data than a "hard reboot" with the power button.
> >>>
> >>> Le 27/07/2015 11:37, Jatin khatri a écrit :
> >>>>
> >>
> >> thanks for your reply
> >>
> >> but it is strange ... it should not allow shutdown using soft button 
> >> ( top right corner) ..at least it should ask for password before 
> >> shutdown
> >>
> >> I'm totally agreed that it can be shutdown using power button without 
> >> any authentication ...that the different story
> >>
> >
> 
> any solution to this...??

The reason that nobody has offered a solution to this is that it
doesn't really exist. If anyone can physically get to your machine they
can power it off anyway, and you would actually *want* them to do it
this way, rather than holding the power button down or pulling the plug.

You could take a look at the man page for systemd-inihibit(1) if you
are running 15.04, and launch a program with that before leaving the
machine, but it wouldn't prevent anyone with physical access to shut
the machine down anyway. It would only prevent them from shutting down
in an orderly fashion for a set period of time, and that isn't really a
benefit for your purpose. If you still want to do it (and you
shouldn't), try something like this:

systemd-inhibit --what=shutdown --mode=block /bin/sleep 3600

But no, there is really no solution to this other than keeping the
machine in a physically secure location.

Petter

-- 
"I'm ionized"
"Are you sure?"
"I'm positive."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20150729/6cf93ba9/attachment.sig>


More information about the ubuntu-users mailing list