How to disable Pydio password? - php

I found this question on stack and I need to do the same thing but with their newer product Pydio. Any thoughts? The same type of config file is not present??
#user962284: Im using ajaxplorer on a local server and I dont want to use the user
authentication each time I open my browser (write the user and
password)
ajaxplorer is created with php and ajax, and I think modifying the
source code is possible to disable the user authentication, or at
least use a blank password
but, what lines of the code are necessary to modify?
The answer for this query was to:
ENABLE_USERS : Toggle user accounts on/off. If set to 0, the
application is not protected! ALLOW_GUEST_BROWSING : Toggle whether
guests (unauthenticated users) can browse your files.
How do I do this in Pydio??

You can enable from GUI of Pydio >> Settings >> Application Core >> Authentication >> Sele

Related

XAMPP not updating "unsecure" to "secure" when I add a password for root

I have successfully added a username and password for "These XAMPP pages are no longer accessible by network for everyone" to be listed as secure, but no matter what I do for the MySQL "Password Changing", "The MySQL admin user root has NO password" and "PhpMyAdmin is free accessible by network" will not say "secure". Is there some kind of configuration I am missing?
I have started and stopped the XAMPP server immediately after, immediately after closing all browser windows, and immediately after killing the Chrome process. I have also tried this with Firefox.
Should I do some kind of re-install? I feel like I'm missing something.
In the basic configuration of XAMPP, phpMyAdmin have public access.
You can change the MySQL root password and choose the authentication method for phpMyAdmin from the security console at localhost/security/index.php
Before you can access the MySQL server, phpMyAdmin will prompt you for a user name and password. Don't forget to set a password for the user "root" first.
The page should look like this:
After you set your password it should look like this (You have to restart your MySQL server):
(Page: localhost/security/index.php)
So now if you want to call phpmyadmin you should see this:

Selenium 2 & Firefox profiles do not get applied

So i'm stuck, I'm running my script through a proxy which requires HTTP Authentication, however I can't authenticate with #:.. So I decided to create a profile that has the authentication plugin added for FireFox and make it auto input.
I've made the zip base64 file, as I'm running on OSX I used the following commands,
zip -r profile 3rkomsuo.selenium
openssl base64 -in "profile.zip" -out "profile.zip.b64"
The file is 24MBs tho(edit, disabled firebug and now it's only about 4MB, still no luck)? I only added 2 plugins, firebug and Auth plugin, that's tiny! Now I've put the file into my web directory, I'm running MAMP, and I send the profile as described.
$session = $web_driver->session('firefox', array("firefox_profile" => file_get_contents("profile.zip.b64")));
I've checked the POST, send a correct array, i've increased PHP POST size in php.ini to 64MBs just in case, however nothing works, still loads the basic(nothing set up) profile? If anyone could help you would be my hero as I've spent several hours debugging this without any luck!
Managed to set up the profile, make sure you rename prefs.js to user.js and zip the folder contents for the profile, not the profile folder itself!
If making profile is not working in your case then you can handle Authentication dialog by using Autoit.
Write a few line script in autoit.
Compile it to convert it in exe.
Call that exe before the line which causes the authentication dialog to appear.

Access network share with PHP5.2 + IIS7.5

I'm using php 5.2 with IIS7.5.
I have a network share on a NAS that is username and password protected. I cannot disable or change authentication info on the NAS. I need to be able to access that network share via php.
I've done the following:
Created new user in windows whose username and password matches those on the NAS.
Created IIS application pool that uses this same auth info.
Created a web.config file inside of the php app directory with an impersonation turned on, using the same auth info.
identity impersonate="true" password="ThePass" userName="TheUser" />
Turned on ASP.NET impersonation in the application authentication in IIS.
None of this seemed to work with this simple line of code in php:
$dir = opendir("\\someservername\somesharename");
Warning: opendir(\someservername\somesharename) [function.opendir]: failed to open dir: No error in C:\websites\site\forum\testing.php on line 7
So, I decided to test the configuration with ASP.NET.
string[] diretories = System.IO.Directory.GetDirectories("\\someservername\somesharename");
The asp.net test worked perfectly.
Going further down the rabbit hole, I ran phpinfo() and checked the username info in it. Down in the "Environment" section of phpinfo, I found the "USERNAME" item. Its value was "TheUser," as was what I expected.
Everything points to the system being configured correctly until I tried:
echo get_current_user();
Which returned, "IUSR." That surely isn't what I expected.
So, how in the world do I get php + IIS7.5 to read from a foreign network share?
Update:
Thanks to a few of the answers, I've added
$result = shell_exec("net use o: \\\\pathToServer\\27301 /persistent:yes 2>&1");
Which returns a success. I'm still getting the error on opendir. I tried another test and used is_dir. This returned false on my newly created mapped drive.
var_dump(is_dir("o:\\"));
// Prints: bool(false)
UPDATE
I ran the script from the command line when logged in as the user that created. The scripts executes correctly. Could this take us back to get_current_user() which returns IUSR? I tryied getmypid() which returned a process ID. I cross referred that process id with the task manager and found that it was for php-cgi.exe, running under the custom user account that I made.
The recommended way to access a network share in PHP is to "mount" it. Try to connect your share as a network drive.
Btw. your command is wrong
$dir = opendir("\\someservername\somesharename");
You have to use 4 "\" because it's the escape character
$dir = opendir("\\\\someservername\somesharename");
NOTE: get_current_user() returns the owner of the process on IIS
You can try a test by mapping it like
$command = "net use $drive \"\\\\$ip\\$share\" $smb_password /user:$domain\\$smb_username";
$result = shell_exec($command);
on opendir you need to have \\\\$server_name\\$share try with 4 '\' and if mapping like that works and 4 '\' is failing on opendir. You may have credentials not matching.
If you map it this way new user you created in windows whose username and password matches those on the NAS will have rights on mapped drive that way you do not need to worry about the scope.
Had the same problem on a similar system. Solved this by going to web site > Authentication > Anonymous Authentication > Change IUSR to whatever your username is or use Application Pool user if correctly configured.

Does a capistrano deploy.rb file contain server credentials?

This is my first time using Capistrano and I am getting server authentication errors right at the start of my deploy:setup stage. I am a PHP user using rvm on a mac.
I noticed my deploy.rb file does not contain the password to my server. It only contains the password to my private git repo. Is there an attribute available for setting the server password so my connection could authenticate?
Do deploy.rb files list server credentials?
I'd like to refer you to a related discussion. Point in case: It's better to setup publickey authentication for your servers, it saves you from having your credentials stored in plain text and it is safer to begin with.
If you use github for your git hosting, you can use your publickey there as well. Be sure to use ssh_options[:forward_agent] = true to forward your publickey to the server when deploying.
If you really want to set your user and password, I believe you can do it as follows:
set :user, "sshuser"
set :password, "sshpassword"
set :scm_passphrase, "gitpassword"
More info can be found at github help/capistrano
The previous answer covers good info about deploy and i agree it is better to setup public keys.
But if you have password issues, try to add this line:
default_run_options[:pty] = true
to your deploy.rb file, so you allow Capistrano to prompt for passwords.
#Amit Erandole (in reply to [ip_address_omitted] (Net::SSH::AuthenticationFailed: root), app_name_ommitted (Errno::ETIMEDOUT: Operation timed out - connect(2)):
Looks like root access over ssh is not allowed on the server (and generally not recommended). Try it again with a valid user or turn root access on in sshd_config (PermitRootLogin yes).
But as was already mentioned by HectorMalot, create an ssh-key and forget about the passwords. ;)

Setting permission for PHP (or I_USER [I'm not sure here...]) to connect to iisweb.vbs

I have been trying to figure out a way to manage our domains at work and easily created a SimpleDNS class, but now I'm on the IIS Server Administration side of it and I'm just lost on what is going on.
Here is the PHP code I am running to test it.
<?php
$cmd = 'iisweb /create c:\websites\examplesite.com\www "Example Domain!" /d www.examplesite.com';
exec($cmd,$data);
print_r($data);
?>
But when I run it I get:
Array ( [0] => Error &H80041003: Access denied
I am completely stumped on how to set up permissions for this.
Here's the good part! When I run <?php exec('ping google.com',$data);?>: it works seamlessly.
I have no idea where to start when it comes to setting up the permissions for iisweb.vbs (the iisweb vbs file). I don't even know if I'm supposed to set up permissions on that file. I don't know if I'm supposed to setup a CGI option in the console. I'm lost.
Can someone help me out? What am I doing here?
Your code will be running under one of two identities.
The identity of the Application Pool that the website runs in (NETWORK SERVICE for example if the defaults were used). You can find this out by opening the property window for an application pool and selecting the Identity tab.
The identity of the website anonymous user which you can find in Website Properties -> Directory Security -> Authentication and access control (click the edit button).
FastCGI
If you're running PHP under FastCGI and the c:\php\php.ini configuration value fastcgi.impersonate = 1 then user identity be the site anonymous user (option 2) above. If fastcgi.impersonate = 0 then PHP scripts will execute under the identity of the application pool (option 1).
You can tell if PHP is configured to execute under FastCGI by looking at the .php scriptmap for the site (Website Properties -> Home Directory -> Configuration -> Application Extensions). If it's set to C:\WINDOWS\system32\inetsrv\fcgiext.dll then you're running FastCGI.
No FastCGI
If your .php script map is not configured to use C:\WINDOWS\system32\inetsrv\fcgiext.dll
then scripts will run under the identity of the site anonymous user (option 2 above).
In all cases the account used must have Administrators rights to be able to run the IIS admin scripts.

Categories