Paul Grenyer wrote:
I've ... added the user ... to the www-data group. ...
How?
Then I went back and, as recommended, disabled root access via SSH.
How?
This is where I think I made my novice error, because when I SSH into the box now I can no longer 'sudo'. In fact I get the message:
<user> is not in the sudoers file. This incident will be reported.
It sounds like your user was previously in group that is allowed to sudo, but is not anymore. 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
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.
-- Martijn