Thanks, Vince. Forgot about the nologin entry.

*sudo -u weewx bash*


is what you want. (No double quote at the end.)


On Thu, Mar 12, 2026 at 11:57 AM Vince Skahan <[email protected]> wrote:

> Andrei - you are probably going to get an error if you run Tom's sudo
> command....
>
> # From Tom's instructions
> $ sudo su weewx
> This account is currently not available.
>
> # If you get that error, sudo to weewx a little differently
> $  sudo -u weewx bash"
>
> # and verify you're weewx
> $ id
> uid=103(weewx) gid=103(weewx)
> groups=103(weewx),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),101(netdev),992(render),996(input),1001(gpio),1002(i2c),1003(spi)
>
> If you are uid=weewx you should be able to run the sqlite3 commands
> without permission issues...
>
>
> On Thursday, March 12, 2026 at 11:40:39 AM UTC-7 Tom Keffer wrote:
>
>> You can certainly do that if you don't care about the data in your
>> database.
>>
>> The reason why the command did not work is because you did not log in as
>> user 'weewx'. You were logged in as user 'pi'. See the instructions I sent
>> in the last email.
>>
>> On Thu, Mar 12, 2026 at 11:38 AM ANDREI ROZWADOWSKI <
>> [email protected]> wrote:
>>
>>> I've installed sqlite3
>>> After that, I executed several commands and got the following result:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *pi@raspberrypi:~ $ sqlite3 /var/lib/weewx/weewx.sdbsqlite> SELECT
>>> datetime(dateTime,'unixepoch','localtime') FROM archive WHERE
>>> date(dateTime,'unixepoch','localtime') > "2026-04-01";SQLite version 3.46.1
>>> 2024-08-13 09:16:08Enter ".help" for usage hints.sqlite> SELECT
>>> datetime(dateTime,'unixepoch','localtime') FROM archive WHERE
>>> date(dateTime,'unixepoch','localtime') > "2026-04-01";2052-10-17
>>> 16:52:002053-02-18 08:32:002128-04-25 09:27:00sqlite> DELETE FROM archive
>>> WHERE date(dateTime,'unixepoch','localtime') > "2026-04-01";Runtime error:
>>> attempt to write a readonly database (8)*
>>>
>>> Tell me, please, maybe it will be easier.: 1. Stop weewx. 2. Delete the
>>> weewx .sdb file 3. Restart weewx   ??
>>>
>>> --
>>>
>> 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 [email protected].
>>>
>> To view this discussion visit
>>> https://groups.google.com/d/msgid/weewx-user/bb1d9b91-5889-4900-abbd-5d7ff4ba17een%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-user/bb1d9b91-5889-4900-abbd-5d7ff4ba17een%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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 [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/weewx-user/7b8bede6-8e5c-4869-9a6c-a79115fb1b9dn%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/7b8bede6-8e5c-4869-9a6c-a79115fb1b9dn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEDb9ZHbmG9XBR%3DAbSP9%2BTr%3DeobpW2PhHw14Rxvc6MnK2g%40mail.gmail.com.

Reply via email to