Project

General

Profile

« Previous | Next » 

Revision 6824

root Makefile: PostgreSQL: phpPgAdmin: Edit config file to allow passwordless logins. Edit login page to fill in public_ as the default username and add a message to leave the password blank for that user.

View differences:

lib/phpPgAdmin.login.php.diff
1
@@ -12,4 +12,7 @@
2
 	require_once('./libraries/lib.inc.php');
3
 
4
+	$msg = (isset($msg) ? $msg."\n<br/><br/>\n" : '')
5
+		.'For user public_, leave password blank';
6
+
7
 	$misc->printHeader($lang['strlogin']);
8
 	$misc->printBody();
9
@@ -39,5 +42,5 @@
10
 		<tr>
11
 			<td><?php echo $lang['strusername']; ?></td>
12
-			<td><input type="text" name="loginUsername" value="<?php if (isset($_POST['loginUsername'])) echo htmlspecialchars($_POST['loginUsername']); ?>" size="24" /></td>
13
+			<td><input type="text" name="loginUsername" value="<?php if (isset($_POST['loginUsername'])) echo htmlspecialchars($_POST['loginUsername']); else echo 'public_' ?>" size="24" /></td>
14
 		</tr>
15
 		<tr>
lib/phpPgAdmin.config.inc.php.diff
1
@@ -86,5 +86,5 @@
2
 	// understand how to change PostgreSQL's pg_hba.conf to enable
3
 	// passworded local connections.
4
-	$conf['extra_login_security'] = true;
5
+	$conf['extra_login_security'] = false;
6
 
7
 	// Only show owned databases?
Makefile
127 127

  
128 128
##### PostgreSQL
129 129

  
130
define editPhppgadmin
131
sudo patch /etc/phppgadmin/config.inc.php lib/phpPgAdmin.config.inc.php.diff
132
sudo cp -n /usr/share/phppgadmin/login.php /usr/share/phppgadmin/login.php.old
133
sudo patch /usr/share/phppgadmin/login.php lib/phpPgAdmin.login.php.diff
134
endef
135

  
130 136
editPhppgadminApacheConf = echo $$'1\n,s/deny from all/allow from all/\nwq'|\
131 137
sudo ed --loose-exit-status --verbose /etc/phppgadmin/apache.conf
132 138

  
......
205 211
	-sudo apt-get --yes install libpq-dev
206 212
	-sudo apt-get --yes install postgresql-$(pgVersion)-postgis
207 213
	-sudo apt-get --yes install phppgadmin
214
	$(editPhppgadmin)
208 215
	$(editPhppgadminApacheConf)
209 216
	$(editApacheConfForPhppgadmin)
210 217
	$(if $(nonApacheOnPort80),$(editApachePortsConf))

Also available in: Unified diff