Wednesday, June 1, 2011

Samba issue in openSUSE 11.4 - Failed to open /etc/samba/secrets.tdb

If you ever encounter this issue where you get errors like:

primus:/etc/samba # rcsmb restart
Shutting down Samba SMB daemon Warning: daemon not running.

And from your /var/log/messages you get:

Failed to open /etc/samba/secrets.tdb

Just disable AppArmor.

Google Chrome incognito

It just occurred to me that I cannot automatically clear all private data from Google Chrome when I exit unlike in Firefox.

Well if I launch Chrome in incognito mode (or porn mode) it doesn't retain any private data.

Just do a chromium --incognito


Configuring pure-ftpd with Authorised User access on SUSE Linux

  1. Install the pure-ftpd package
    zypper in pure-ftpd

  2. Edit the /etc/pure-ftpd/pure-ftpd.conf file and modify and save the following directives with the values stated:
    ChrootEveryone YES
    Demonize YES

    AnonymousOnly NO

    NoAnonymos YES
    PureDB /etc/pure-ftpd/pureftpd.pdb #(This line needs to be uncommented)


  3. Create a UNIX dummy user account and a home directory for an authorised user
    • Create a UNIX dummy account
      useradd -s /dev/null ftpduser


    • Create a chrooted ftp home directory for the authorised user (it can be anywhere on the system - just get the UNIX file permission/ownership correct)
      mkdir /srv/ftp/ftpduser

      chown -R ftpduser /srv/ftp/ftpduser


  4. Creating and associating pure-ftpd virtual user account (we call it jim) to UNIX system account
    pure-pw useradd jim -u ftpduser -d /srv/ftp/ftpduser

    • Then update the /etc/pure-ftpd/pureftpd.pdb database
      pure-pw mkdb
      (required for each time user added/removed/modified)

    * You may associate multiple virtual user accounts to one UNIX user account. All virtual user accounts will use the local permissions permissible to the UNIX user account.

    * You may also do a one-to-one matching i.e. one virtual account to one UNIX account - but you may need to create multiple home directories.


  5. Restart the pure-ftpd daemon and you are good to go. Ensure that the appropriate firewall port is opened.