close Warning: Can't synchronize with repository "(default)" (/usr/svn/silverfile does not appear to be a Subversion repository.). Look in the Trac log for more information.

SilverFile Server Administration Guide and Tips

Add users to sudo

Sudo allows all users in admin group root privilege. This is something that Ubuntu sets up as an alternative to visudo.

usermod -a -G admin ryan

SSH Keys

To generate a key:

ssh-keygen (or)
ssh-keygen -t dsa (for dsa)
(do not enter a passphrase)

This generates, id_dsa and Client(id_dsa) ---ssh--> Host( in .ssh/authorized_keys)

Using GPG

We are using symmetric gpg which just requires the use of a passphrase to encrypt/decrypt files.

To initially create the gpg file the command is:

gpg -c decryptedfile

To render decrypted file to STDOUT (note the additional dash):

gpg -o - file.gpg

Using Vim to edit files in place

Copy the gnupg.vim file to $HOME/.vim/plugin/ View plugin

Note- This vim script is edited slightly to make symmetric encryption the default. This is done by setting g:GPGPreferSymmetric= 1 in the script.

Generate a new SSL Cert

1) Generate the key (2048 bit)

openssl genrsa -des3 -out 2048

Specify anything for the key passphrase, ie "silver", it will be removed later.

2) Generate the certificate request for the root authority - i.e. godaddy

openssl req -new -key -out

3) Remove passphrase from key. This will enable apache to back online without any intervention.

openssl rsa -in -out

Disk Usage Tools

Get a summary of disk usage for each client folder. Sort the output alphabetically.

du -h --max-depth=1 | sort -k 2

Using Screen

Screen is an excellent utility for managing shell sessions remotely.


Within the new shell, enter Ctr-A d. This disengages you from that shell but still allows it to keep running.

screen -ls (lists screen sessions)
screen -r xxxx.tty.session (allows you to re-attach to a given session)

SSH Tunneling

If you want to tunnel the tomcat instance (running nutch) try this command:

ssh -p 2222 -L 8080:localhost:8080

Init Scripts

Add an init script Add the script to /etc/init.d/ and then run:

update-rc.d script_name defaults

Remove an init script Delete the script from /etc/init.d/ and then run:

update-rc.d script_name remove

Samba Administration

Check samba version (also checks if samba is running)

smbd -V

Use samba client List smb shares on server:

smbclient -L //server -U user

Browse samba share

smbclient //server/share -U user
smbclient //server/share -U user%password

Django Administration

Dump data in database (assumes settings is in production skin directory)

python dumpdata --pythonpath=.. --settings=production.settings

Load data from fixture (json)

python loaddata /home/sf/dataout.json --pythonpath=.. --settings=production.settings

Alternatively you can load data in with syncdb. Recreate the MySQL db and move the fixture into files/common/fixtures/ naming it initial_data.json. Then run:

python syncdb --pythonpath=.. --settings=production.settings
Last modified 13 years ago Last modified on Oct 7, 2009, 10:28:09 PM