IMC-Docs Working Group Tools

Server Tools

Changelogs

Whenever you do something on any of the servers, please complete the appropriate Changelog! Their organization is explained on KompostInfo#Collective_sysadmin.

Adding a shell user to humus

Note : this should also work on kompost and other VServers, but might have to be adapted.

Create user

sudo adduser USER

Give him/her a strong password (for example, use the pwgen program to generate it), and paste it in /home/USER/password. This will be used for sudo only, since password login is disabled on humus (only pubkey ssh login allowed).

Add him/her to the docs group : sudo adduser USER docs

Create /home/USER/.ssh owned by USER:USER, with permissions 700. Copy USER's public ssh key into /home/USER/.ssh/authorized_keys, taking care to give this file 600 permissions and USER:USER as owner.

Sudo

sudo visudo

Depending on what the user needs to do, give him/her :
  • either full sudo rights : USER   ALL=(ALL) ALL
  • or sudo rights to admin TWIki : USER   ALL=(ALL) TWIKIADMIN
  • or nothing at all.

Email

Ask listwork@sos.indymedia.org to add USER's email address to the imc-docs-sysadmin@indymedia.org email alias, so that he/she receives metche reports and misc. root email.

Make sure he/she is subscribed to imc-docs and imc-docs-tech mailing lists.

Warning : this email address will receive sensitive information ; therefore it has use TLS end-to-end, ie. :
  • hosted on a mailserver speaking TLS with indymedia's mail server
  • fetched/read with imaps / pop3s

Welcome

Ask USER to read our documentation, and especially KompostInfo#Collective_sysadmin.

FIXME : write a page with links to the appropriate web pages / documentation.

Grepping for spam

This seems to work:
SPAMTERM='viagra'; sudo egrep -r $SPAMTERM /var/www/docs.indymedia.org/data/* | egrep -v '^/var/www/docs.indymedia.org/data/\w*/\w*\.txt,v:'
You need to specify the spam term (formatted as a regular expression) as SPAMTERM first. And you may want to pipe the output into less ( | less ) or redirect it to a text file ( >> topics_containing_spam.txt ).

FosWiki Tools

Removing Users

warning Outdated?

There is a script on the server called twikirmuser.sh - you need to be a sudoer to be able to run it.

In case TWikiUsers gets fucked up, you can regenerate it like this:

cat ../.htpasswd | sed -e 's/^/   * /' | sed -e "s/:.*$//" | sort | sed -e 's/$/\n/' > TWikiUsers.txt

How to roll back a topic (revert to previous version)

warning To adjust

How to reset the password of a user through the twiki website

warning To verify

  • you need to be in the TWikiAdminGroup
  • go to InstallPassword
  • Fill the box with UserName:zK.G.uuPi39Qg so UserName has now the password guest ('zK.G.uuPi39Qg' is a hash for 'guest' in .htpasswd)
  • Change the password for a better one at ChangePassword
Topic revision: r13 - 16 Sep 2009, CaSe
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback