Hi
Ok, I'm feeling really sill now.
I've ... added the user ... to the www-data group. ...
IIRC: sudo usermod g www-data <user>
I'm now wondering if that's taken me out of every group except www-data.
How?
Then I went back and, as recommended, disabled root access via SSH.
How?
I set PermitRootLogin in /etc/ssh/sshd_config to no.
It sounds like your user was previously in group that is allowed to sudo, but is not anymore.
It does. Problem is, as far as I know, this is my only user.
Check your /etc/sudoers file for something like:
# Members of the admin group may gain root privileges %admin ALL=(ALL) ALL
then check that you're in that group, e.g. for my userid "mak":
root@yoda:~# grep ^admin /etc/group admin:x:119:mak
If you get stuck with groups, you can always specifically add a line for your user: "su" to root, then run "visudo" and add a line like:
mak ALL=(ALL) ALL
Thanks, but I don't have permission to do any of that and no idea what the root password might be. I've always just logged in as me and used sudo.
This of course means I can't even shut the machine down remotely. Before I take a monitor and keyboard downstairs to it, is there a way I can get around this (after you've all had a good laugh of course!)?
You can just "su" to root, and then shut down.
Same problem.
Is my system toast? Do I need to start again? :-(