Default username and password for LUCI2 - openwrt

I uploaded the LUCI2 from Git to my OpenWrt box. For the first access to the web interface we must input login name and password. What should these two parameters be?
I typed admin/admin, and they did not work. Even if I execute the command: 'passwd admin' and I add 'admin' as new passwd.

Related

Jenkins integration with AD

I am working on integrating a new Jenkins instance with AD. I have installed the required plugins. When I try to add a domain, it asks for info such as domain name, domain controller, etc.
I am not fully clear on the BindDN field. If I leave it blank and test the domain, it throws this warning
Leaving blank Bind DN means that any operation performed will use anonymous binding. Keep in mind that this is not recommended as some servers do not allow it by default.
I then provided a user account in BindDN which exists in the domain. Now on testing the domain, it is throwing this error log:
DC_Name:389
java.net.UnknownHostException: DC_Name
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
Pls share some inputs to complete the integration with AD.
There is information provided in the Jenkins wiki page for the AD plugin, as well as some ldap tools to help diagnose.
<DOMAIN_NAME> -> Domain Name: support-cloudbees.com
<searchbase> -> Organization Unit we want to look into.
In the example, it is OU=Support, DC=support-cloudbees, DC=com
<binddn> -> Bind DN.
In the example, CN=felix, OU=Support, DC=support-cloudbees, DC=com
<passwd> -> Bind Password
<userid> -> User we want to look for. We can look for the managerDN itself or for a different user on the tree.
In the example, this can be set-up for example to CN=felix, OU=Support, DC=support-cloudbees, DC=com.
As described here,
The Bind DN is comprised of the user and the location of the user in
the LDAP directory tree. Each element of the Distinguished Name is
pointed out: The first part is the user CN=user1. The second part is
the container CN=Users. The third part is the domain DC=example and
DC=com
Did you correctly specify "the location of the user in the LDAP tree" ? The error appears to be with a DC value.
Ours is in the form:
cn=<Acct Name>, ou=<some_value>, ou=<some_value>, dc=<some_value>, dc=<some_value>
YMMV. Try use the ldap tools mentioned to validate.

Store user passwords in plain text in OpenLDAP server

I am using OpenLDAP provided in osixia/openldap docker image (https://github.com/osixia/docker-openldap) but it is storing all passwords hashed.
Normally it will be desirable but I am planning to hash passwords on front end (with salting and MD5) so no person in the organization never gets to see the users passwords, but when I try saving them they are hash again, I have not find a way to prevent this behavior.
I try deleting (using user cn=admin,cn=config) an entry that comes with the image called cn={4}ppolicy,cn=schema,cn=config which I think may be the culprit but ldapdelete returns Server is unwilling to perform (53).
Any help is deeply appreciated.
If you store the password in plain text you can retrieve them in plain text.
You just need to check in the ACL that the user you use to read them have the correct rights to do it.
The password policy entry you are talking about is just a schema definition which allows you to define a password policy but does not enforce anything. (The 53 error is because you can't remove a schema from a running OpenLDAP to prevent removing a schema which could be used by an entry)
According to what I can see in github about the docker image you use, the ACL used is :
olcAccess: to attrs=userPassword,shadowLastChange
by self write
by dn="cn=admin,{{ LDAP_BASE_DN }}" write
by anonymous auth
by * none
Which means that only the user himself or the admin account can read the password field userPassword
It is this ACL that you need to modify to suit your needs. The ACL should be located here :
dn: olcDatabase={1}{{ LDAP_BACKEND }},cn=config

How to configure id editor in my server without Oauth

I'm new in Web mapping, I need web map editor. I found the iD Editor but I couldn't configure it to my own osm server! I don't know how is it working with API and Oauth.
How to configure the iD editor in my server without Oauth and how to create API?
Thanks.
The openstreetmap-website documentation has a excellent tutorial of how to use an editor with the openstreetmap-api.
The example of the doc is using the Potlatch 2 editor, but you can do the same process for registering and configuring iD (id_key) and the website/Notes (oauth_key).
Do the following:
Log into your Rails Port instance - e.g. http://localhost:3000
Click on your user name to go to your user page
Click on "my settings" on the user page
Click on "oauth settings" on the My settings page
Click on 'Register your application'.
Unless you have set up alternatives, use Name: "Local iD" and URL: "http://localhost:3000"
Check the 'modify the map' box.
Everything else can be left with the default blank values.
Click the "Register" button
On the next page, copy the "consumer key"
Edit config/application.yml in your rails tree
Uncomment and change the "oauth_key" configuration value
Restart your rails server
An example excerpt from application.yml:
# Default editor
default_editor: "id"
# OAuth consumer key for iD
oauth_key: "8lFmZPsagHV4l3rkAHq0hWY5vV3Ctl3oEFY1aXth"
To use the iD editor you need to use OAuth authorization, otherwise, you can use the JOSM editor which you can choose a base authentication.
# Default editor
default_editor: "id"
# OAuth consumer key for iD
oauth_key: "8lFmZPsagHV4l3rkAHq0hWY5vV3Ctl3oEFY1aXth"
to change:
# OAuth consumer key for iD
id_key: "8lFmZPsagHV4l3rkAHq0hWY5vV3Ctl3oEFY1aXth"
application.yml has been refactored to settings.yml but you will need to create a settings.local.yml to override it configurations.

ZF2 Validation - Field required if another element is not empty

I've had experience with making custom validation in Zend Framework 2 (using version 2.0.5 at present). I'm interested in creating a change password section in an "edit profile" form. What I want to be able to do, is have 3 fields:
Current Password,
New Password,
Confirm New Password.
Then I want to validate as follows:
If a new password is set, current password must also be set (and authenticated), and confirm new password should match new password.
If a current password is set, the new password and confirm new password must also be required.
If none are set, allow the edit of the rest of the profile, so continue validation.
I think you can get the gist of what I'm after, I'm looking for a reusable way to do this using Zend Framework 2. Ideally, creating a custom validator so that the forms can be reused, thought I suspect a factory approach may be better. Anything so I don't have to check it in the controller/service layer and repeat myself wherever I want to use this.
Kind Regards,
ise
You could add a custom filter, but I think this could also be done using validation groups and separately validate groups of inputs.
you could add the password fields to a separate group and only validate that group if the main password is not empty.
http://framework.zend.com/manual/2.0/en/modules/zend.input-filter.intro.html
http://framework.zend.com/manual/2.0/en/modules/zend.form.collections.html#validation-groups-for-fieldsets-and-collection

How to change the URL email is coming from

How to change the "FROM URL" to my "website name"? I tried to change it via
System -> Configuration -> Store Email Addresses
and Transactional Email, but there is nothing which can change that.
This is a php mail setting, deep in the innards of the machine. Do you own the box or are you on shared hosting? Maybe make this question more generic and consider trying another app, e.g. Wordpress, to see if it is hosting or Magento.
I have resolved this issue by following these three steps:
Make changes to php.ini on line #683
sendmail_path = /usr/sbin/sendmail -t -i -fname#Domain.net -nMY CompanyName
Changed lib/Zend/mail.php line #686
$this->_storeHeader('From', 'name#Domain.net', true);
In cPanel created email account with the same name "name#Domain.net"
Go to System -> Configuration -> Contacts
so, you can set 'Send Emails To' field

Resources