Koozali.org: home of the SME Server

"db" commands manual searched and more..

Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
"db" commands manual searched and more..
« on: December 20, 2007, 07:18:28 PM »
Hi all

- search a good free db command for sme
- and how to enable htaccess on the default web primary root? is htaccess disabled there?
- enable ntfs readonly? for transfer data from usb backup disk(M$-2003) to primary root
Linux PC & Server Support
http://www.linuxonlinehelp.de
.. i Love SME..

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: "db" commands manual searched and more..
« Reply #1 on: December 20, 2007, 10:18:58 PM »
At the wiki you can found basically all the answers to your questions.

http://wiki.contribs.org/DB_Variables_Configuration

Offline linuxhelp

  • *
  • 173
  • +0/-0
    • Linux PC & Server Support
Re: "db" commands manual searched and more..
« Reply #2 on: December 21, 2007, 12:50:09 AM »
Hello

thanks i know this page, are there any other commands too? or only this few?

i looked for enable .htaccess on Root of /Primary to save subfolders on Apache server ibay specific (httpd-e-smith)
Linux PC & Server Support
http://www.linuxonlinehelp.de
.. i Love SME..

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: "db" commands manual searched and more..
« Reply #3 on: December 21, 2007, 01:57:51 AM »
Yes.

Code: [Select]
db accounts setprop Primary AllowOverride all
db accounts setprop Primary FollowSymLinks enabled
signal-event ibay-modify Primary
With this command apache can access .htaccess file.

As you can see, SME set as template variable the most frequently used settings. In Apache, the most used settings are FollowSymLinks, AllowOverride, and a few more. But no all apache settings are configure as template variable. In this case, you must copy the original template file under custom-templates directory, and make the changes there, as good explain Gordon's developer guide. Then expand template and restart the pertinent service.

Offline thomasch

  • *
  • 232
  • +0/-0
Re: "db" commands manual searched and more..
« Reply #4 on: December 21, 2007, 04:07:28 AM »
I think what he need is a command to show ALL db and keys in smeserver.

I can't answer this, and I want to know what is the command too.
Please help.

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: "db" commands manual searched and more..
« Reply #5 on: December 21, 2007, 05:04:32 AM »
I think what he need is a command to show ALL db and keys in smeserver.

I can't answer this, and I want to know what is the command too.
Please help.
I don't know a command to show you template db keys.
I think developers must informonly the name of these db keys, then the Doc team can document with all explanation in the wiki.

Offline raem

  • *
  • 3,972
  • +4/-0
Re: "db" commands manual searched and more..
« Reply #6 on: December 21, 2007, 06:25:44 AM »
linuxhelp

Quote
and how to enable htaccess on the default web primary root?

This is a more secure method
http://wiki.contribs.org/Htaccess
...

Offline pfloor

  • ****
  • 889
  • +1/-0
Re: "db" commands manual searched and more..
« Reply #7 on: December 21, 2007, 08:31:43 AM »
I don't know a command to show you template db keys.
I think developers must informonly the name of these db keys, then the Doc team can document with all explanation in the wiki.
Try:
db <database> show (This will show the contents of the entire db file) eg:
db configuration show
db accounts show

db <database> show <key> (This will show the variables for the chosen key) eg:
db accounts show Primary
config show yum ("config" is a shortcut for "db configuration")

you can also type just "db" on the commandline for more usage.

There is a good start on a lot of the db values already in the wiki here: http://wiki.contribs.org/DB_Variables_Configuration
In life, you must either "Push, Pull or Get out of the way!"

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: "db" commands manual searched and more..
« Reply #8 on: December 21, 2007, 01:28:01 PM »
Hello pfloor.
I know very well the wiki page, because I have created.  :D (PicsOne)
About the command you have suggested, only work for db keys that already in the configuration files, but not for keys in the template files. Not all posible db keys are in db conf files as default. One example:

DisableAnonymous in /etc/e-smith/templates/etc/proftpd.conf/50AnonymousPrimary

If you run db configuration show, you can't see this variable, but exist in template file, and apply only when you have set in the db conf file.
Also, I have found some variables in db file without  proper template file to expand.
The real way to know what variables exist, is to open one by one each template file, and see if has a perl sentence to expand.
I don't know if you can understand my BAD english.
« Last Edit: December 21, 2007, 01:31:42 PM by Normando »

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Re: "db" commands manual searched and more..
« Reply #9 on: December 21, 2007, 01:40:38 PM »
I'm sure there was a small script using grep that allowed you to go through the templates and pull out the DB variables. It was in the forums or bugzilla.

Hmm.. or maybe it was to find in which template a particular variable is used in.

Your right Normando, if the variable is not used in the DB, and is relying on the default value in the template then looking through the DB will not reveal it.
Regards,
William

IF I give advise.. It's only if it was me....

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: "db" commands manual searched and more..
« Reply #10 on: December 21, 2007, 01:51:54 PM »
if the variable is not used in the DB, and is relying on the default value in the template then looking through the DB will not reveal it.
Maybe justify open a bug for include all db template keys in the conf db?
And a little off-topic, about the name of keys http://bugs.contribs.org/show_bug.cgi?id=3529
Maybe in SME8 all db keys are in the conf file.