Openerp 7 openerp-server.conf custom addons_path - openerp-7

How can i add my custom addons to config? Here is my openerp-server.conf file
[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = dev1
db_password = False
addons_path =/home/dev1/odoo-7.0/addons
and I am adding my custom addons to addons_path with a comma like that,
addons_path =/home/dev1/odoo-7.0/addons,/home/dev1/odoo-7.0/custom_addons
but it is giving me an 'web_kanban' error. What am i doing wrong? Thank you.

You forgot to add the one add-ons path. We must need to include the openerp add-ons path in the config file.
/home/dev1/odoo-7.0/openerp
So, your file looks like below.
[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = dev1
db_password = False
addons_path = /home/dev1/odoo-7.0/addons,/home/dev1/odoo-7.0/openerp, /home/dev1/odoo-7.0/custom_addons
This should work for you.

Related

How can I change the Authentication method in connections between WinRm and Terraform with hyperv provider?

I'm trying to use an hyperv provider for create some virtual machines but I need to define some parameters for the HyperV API. The problem is that WinRm (that is the tool that try to connect with the host) can't access with my credentials using the Basic Auth. However, If I use the Negotiate Auth, it returns a successfully connection. So, I don't know how can I define a parameter in Terraform for that.
Here is my provider config's code in Terraform:
provider "hyperv" {
user = myusername
password = mypassword
host = myhost
port = 5985
https = false
insecure = true
timeout = "60s"
}
My winrm/config/client:
NetworkDelayms = 5000
URLPrefix = wsman
AllowUnencrypted = true
Auth
Basic = true
Digest = true
Kerberos = true
Negotiate = true
Certificate = true
CredSSP = true
DefaultPorts
HTTP = 5985
HTTPS = 5986
TrustedHosts = *
My winrm/config/service:
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 1500
EnumerationTimeoutms = 240000
MaxConnections = 300
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = true
Auth
Basic = true
Kerberos = true
Negotiate = true
Certificate = true
CredSSP = true
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = *
IPv6Filter = *
EnableCompatibilityHttpListener = true
EnableCompatibilityHttpsListener = true
CertificateThumbprint
AllowRemoteAccess = true
Hy again guys. If someone have the same problem I resolve it on that way:
-I activate Administrador user from Local users.
-Then, one have to run this command in a CMD:
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
-Reboot the system
-Then, run winrm quickconfig in a CMD, and then it would work.
I hope it help you!

How to setup LDAP (RBAC) in Airflow?

The current issues I am having is that LDAP settings do not seem to work with Airflow. My current code does not produce a login screen nor are there logs in the docker container that shows it is attempting to connect to the LDAP server. I have attempted to follow these tutorials but they appear to do nothing (i.e. the webserver_config.py is not being used) TutorialOne TutorialTwo
Any information regarding how the connection works would be greatly appreciated!
webserver_config.py:
import os
from airflow import configuration as conf
from flask_appbuilder.security.manager import AUTH_LDAP
basedir = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = conf.get('core', 'SQL_ALCHEMY_CONN')
CSRF_ENABLED = True
AUTH_TYPE = AUTH_LDAP
AUTH_ROLE_ADMIN = 'Admin'
AUTH_USER_REGISTRATION = True
AUTH_USER_REGISTRATION_ROLE = "Admin"
#AUTH_USER_REGISTRATION_ROLE = "Viewer"
AUTH_LDAP_SERVER = 'ldapserveraddressherebutIwon'tshowyousorry'
AUTH_LDAP_SEARCH = "DC=ms,DC=ds,DC=uhc,DC=com"
AUTH_LDAP_BIND_USER = 'CN=Users,DC=ms,DC=ds,DC=uhc,DC=com'
AUTH_LDAP_BIND_PASSWORD ="*******************"
AUTH_LDAP_UID_FIELD = 'sAMAccountName'
AUTH_LDAP_USE_TLS = False
AUTH_LDAP_ALLOW_SELF_SIGNED = False
# Get relative path for CA certificate file
script_dir = os.path.dirname(__file__)
AUTH_LDAP_TLS_CACERTFILE = script_dir + "ca.cer"
I have deleted the authenticate = True and auth_backend = airflow.contrib.auth.backends.ldap_auth from airflow.cfg and my webserver_config.py is in the same folder for use.
This can be achieved through the airflow.cfg.
Please read the LDAP section below and let me know.
https://airflow.apache.org/docs/stable/security.html

ldap configuration in airflow when rbac is True

I was configuring ldap in airflow.
Followed this documentation here - https://flask-appbuilder.readthedocs.io/en/latest/security.html
webserver_config.py
import os
from airflow import configuration as conf
from flask_appbuilder.security.manager import AUTH_LDAP
basedir = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = conf.get('core', 'SQL_ALCHEMY_CONN')
CSRF_ENABLED = True
AUTH_TYPE = AUTH_LDAP
AUTH_ROLE_ADMIN = 'Admin'
AUTH_USER_REGISTRATION = True
AUTH_USER_REGISTRATION_ROLE = "Admin"
# AUTH_USER_REGISTRATION_ROLE = "Viewer"
AUTH_LDAP_SERVER = 'ldaps://ldap:636/'
AUTH_LDAP_SEARCH = "DC=domain,DC=net"
AUTH_LDAP_BIND_USER = 'CN=admin,DC=domain,DC=net'
AUTH_LDAP_BIND_PASSWORD = 'password'
AUTH_LDAP_UID_FIELD = 'sAMAccountName'
AUTH_LDAP_USE_TLS = False
for running ldap container i used osixia/docker-openldap
but i run webserver and try to login it gives Invalid login. Please try again. No matter what id password i gave.
When not using ldap it is able to login with the user i created using airflow cli create_user
I don't know if i am doing everything right. There is no good documentation/article with the steps.
Can someone help me on this? THANKS!!!

devise ldap auth with group restrict rails 5 and devise 4.3

i have a problems to restirct access from a member of a group. My application are a Rails 5 app with devise and devise_ldap_authenticatable gems installed.
this my ldap.yml
authorizations: &AUTHORIZATIONS
allow_unauthenticated_bind: false
group_base: "CN=Domain Admins,CN=Users,DC=XXX,DC=XX"
## Requires config.ldap_check_group_membership in devise.rb be true
# Can have multiple values, must match all to be authorized
required_groups:
- CN=Domain Admins,CN=Users,DC=xxx,DC=xx
my devise.rb
config.ldap_logger = true
config.ldap_create_user = true
config.ldap_update_password = true
#config.ldap_config = "#{Rails.root}/config/ldap.yml"
config.ldap_check_group_membership = true
config.ldap_ad_group_check = true
##config.ldap_check_attributes = true
config.ldap_use_admin_to_bind = true
i try all combination but nothing works. I changed the line 174 of connection.rb
filter = Net::LDAP::Filter.eq("uniqueMember", dn)
with
filter = Net::LDAP::Filter.eq("member", dn)
OR
filter = Net::LDAP::Filter.eq("memberOf", dn)
but nothing happens please i need to solve this!
thanks for all reply
UPDATE
check the # <<: *AUTHORIZATIONS at bottom of authentication Ldap and uncomment it <<: *AUTHORIZATIONS
this put the group check into ldap auth.
bye!!!

Configuring MantisBT to send emails using GMail

I am new to Mantis bug tracker and I want to enable the email notification after registering for a new account.
Well, I installed the MantisBT correctly without any problem on my local computer, I already changed the admin's password and removed the admin folder in the directory. After this I signed up for a new account, there was a confirmation message flashed saying that I need to verify my registration via email. My problem here is that no verification message was sent to my email. According to one of the tutorials I found, I need to configure first my config_inc.php. After the installation, the initial content of my config_inc.php was
<?php
$g_hostname = 'localhost';
$g_db_username = '<myUser>';
$g_db_password = '<myPass>';
$g_database_name = 'bugtracker';
$g_db_type = 'mysql';
?>
So I changed it to.
*I am using my gmail account here
<?php
$g_hostname = 'localhost';
$g_db_username = '<myUser>';
$g_db_password = '<myPass>';
$g_database_name = 'bugtracker';
$g_db_type = 'mysql';
$g_allow_signup = ON;
$g_allow_anonymous_login = OFF;
$g_anonymous_account = '';
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_username = '<myUser#gmail.com>';
$g_smtp_password = '<myPass>';
$g_administrator_email = '<myUser#gmail.com>';
$g_webmaster_email = '<myUser#gmail.com>';
$g_from_name = 'Mantis Bug Tracker';
$g_from_email = '<myUser#gmail.com>';
$g_return_path_email = '<myUser#gmail.com>';
$g_email_receive_own = OFF;
$g_email_send_using_cronjob = OFF;
$g_allow_file_upload = ON;
$g_file_upload_method = DATABASE;
$g_absolute_path_default_upload_folder = '';
$g_max_file_size = 5000000;
$g_preview_attachments_inline_max_size = 256 * 1024;
$g_allowed_files = '';
$g_disallowed_files = '';
$g_window_title = 'MantisBT';
$g_logo_image = 'images/mantis_logo.gif';
$g_favicon_image = 'images/favicon.ico';
$g_show_realname = OFF;
$g_show_user_realname_threshold = NOBODY;
$g_default_home_page = 'my_view_page.php';
?>
I overwrite my config_inc.php with this one and then register for a new account. After submitting the information, an error occured saying:
Fatal error: Call to undefined method SMTP::getError() in < myDirectory >\mantis\library\phpmailer\class.phpmailer.php on line 1910.
And now I'm stucked, please help me with this, I need to setup my email notification. I was just creating accounts but I cannot use them because I need to verify it.
Please let me know if I need to modify some of the related files and what are the steps.
Thanks for the help!
According to a posting on the MantisBT forums, these are working settings for GMail:
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_username = 'username#gmail.com';
$g_smtp_password = 'yourpassword';
$g_smtp_connection_mode = 'ssl';
$g_smtp_port = 465;
Something to add about GMail. These settings are correct but GMail has instituted some new security that will still prevent email from being sent from Mantis or any other mailer using the SMTP connector.
In order to do this with GMail, you must "Allow less secure apps to access accounts". In GMail admin, there is a setting to allow users to control access from "less secure apps," which must be turned on, and then the user account used to send mail must turn on access from "less secure apps." The link above provides the information on how to configure this.
The frustrating thing is everything will appear to work fine but no emails are sent. There is no error indication from the SMTP server. However, the user account used to send mail may receive an email from GMail indicating someone is trying to access the account. I spent hours trying to track this down.
If anyone still faces issue or error while configuration add log level so that you can drill down the problem further. Below settings worked for me. Detailed explanation is written here
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_port = '465';
$g_smtp_connection_mode = 'ssl';
$g_smtp_username = 'letzdotesting#gmail.com';
$g_smtp_password = 'xxxxx';
$g_administrator_email = 'letzdotesting#gmail.com';
$g_webmaster_email = 'letzdotesting#gmail.com';
$g_from_email = 'letzdotesting#gmail.com';
$g_return_path_email = 'letzdotesting#gmail.com';
$g_default_timezone = 'UTC';
$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:C:\mantisbt.log';
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_username = 'username'; // without #gmail.com
$g_smtp_password = 'password';
$g_smtp_connection_mode = 'ssl';
$g_smtp_port = 465;
it Works for me
2017 update (MantisBT 2.3.0) Please follow the steps below:
[1] IF YOU'RE USING DOCKER
Access the docker instance running the command below:
docker exec -it {docker-id} bash
[2] INSIDE MANTISBT SERVER
if you dont have any editor:
# sudo apt-get update
# apt-get install vim
create a log file:
# touch /var/log/mantisbt.log
# cd /var/log/
# chmod 777 mantisbt.log
[3] EDITING MANTISBT CONFIGURATION
# vim /var/www/html/config/config_inc.php
add the following content to the file opened in the earlier step:
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_administrator_email = 'your-admin-email#gmail.com';
$g_webmaster_email = 'your-webmaster-email#gmail.com';
$g_return_path_email = 'your-return-email#gmail.com';
$g_from_email = 'your-from-email#gmail.com';
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_port = 465;
$g_smtp_connection_mode = 'ssl';
$g_smtp_username = 'username';
$g_smtp_password = 'password';
$g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
$g_log_destination = 'file:/var/log/mantisbt.log';
$g_validate_email = OFF;
[4] EDITING GMAIL CONFIGURATION
You need to do this in order to allow MantisBT authentication:
Access the following URL:
https://myaccount.google.com
Navigate to the Sign-in & Security menu-item under menu-tree.
Check the "Allow less secure apps" option and set equals to true
Image:
You're good to go!
Tested and running with these configurations. =]
My issue was solved by updating ca certificates.
I am using Xampp, with PHP 7.2 on Windows sever 2012.
Although the below link provides you with the details, I mention the relavent part too:
Updating CA certificates
Updating CA certificates To update your CA certificates, make sure
your operating system is fully up to date - CA certs are usually
updated via OS updates. Alternatively, you can download the latest CA
cert file from curl, install it somewhere accessible (for example
/etc/ssl/cacert.pem) and point at it from the openssl.cafile and
curl.cainfo directives in your php.ini file (this location will vary
according to your OS and PHP config; where you need to put it is
beyond the scope of PHPMailer!):
openssl.cafile = /etc/ssl/cacert.pem
curl.cainfo = /etc/ssl/cacert.pem
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#updating-ca-certificates