Probably an OT Linux question, but:

53 views
Skip to first unread message

Steve2Q

unread,
May 22, 2019, 12:20:16 PM5/22/19
to weewx-user
I SSH'd into my Pi to do a weewx restart;

I used to type /etc/init.d/weewx restart and the command just worked

Now it says the following: 

pi@raspberrypi:~ $ /etc/init.d/weewx restart
[....] Restarting weewx (via systemctl): weewx.service==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'weewx.service'.
Multiple identities can be used for authentication:
 1.  ,,, (pi)
 2.  root
Choose identity to authenticate as (1-2): 1
Password:

when I choose #1 and type my password the command  executes

This just suddenly started with no changes that I made.

I know this may be way OT, but I have looked and could not find an answer elsewhere.

Thanks

vince

unread,
May 22, 2019, 1:21:08 PM5/22/19
to weewx-user
On Wednesday, May 22, 2019 at 9:20:16 AM UTC-7, Steve2Q wrote:
I know this may be way OT, but I have looked and could not find an answer elsewhere.



Try googling for your exact message:
"Authentication is required to restart 'weewx.service'. Multiple identities can be used for authentication:"

There are lots of descriptions in the top hits Google returns.

(hint - 'always' google for an unexpected message, you'll almost never be the first person who saw it)

Steve2Q

unread,
May 22, 2019, 2:13:00 PM5/22/19
to weewx-user
Thanks, Vince...lost an old friend this past weekend...not thinking straight.

Just needed to put sudo in front of the command

Leon Shaner

unread,
May 22, 2019, 2:51:30 PM5/22/19
to weewx...@googlegroups.com
Hey, Steve,

You're logged in as user pi.
When (re)starting weewx via a system service, such as "/etc/init.d/weewx restart" or "systemctl restart weewx" you have to elevate to root by one means or another.
The fact that it prompted you to pick a method of running under root is just a convenience.

Most people will just straight out run such a command under sudo which elevates to root for you, provided your user is allowed (which on RPI, the pi user, generally is allowed).

So what you wanted was:

$ sudo /etc/init.d/weewx restart

So if you never used to run it via "sudo" then you must have had an installation with some fancy permissions set to allow everything to be accessed by the pi user.
It's doable, but definitely not an out of the box config so if you had that working, you must have put a lot of effort into it a long time ago and maybe some "apt" kinds of commands reverted to the default "runs as root" paradigm?

Regards,
\Leon
--
Leon Shaner :: Dearborn, Michigan (iPad Pro)
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/6a38b5b3-1296-42ba-bea8-aeaa245fd0c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages