| 416 | 'cannot modify HBA records: {}'.format(e)) from e |
| 417 | |
| 418 | def trust_local_connections(self): |
| 419 | self.reset_hba() |
| 420 | |
| 421 | if _system != 'Windows': |
| 422 | self.add_hba_entry(type='local', database='all', |
| 423 | user='all', auth_method='trust') |
| 424 | self.add_hba_entry(type='host', address='127.0.0.1/32', |
| 425 | database='all', user='all', |
| 426 | auth_method='trust') |
| 427 | self.add_hba_entry(type='host', address='::1/128', |
| 428 | database='all', user='all', |
| 429 | auth_method='trust') |
| 430 | status = self.get_status() |
| 431 | if status == 'running': |
| 432 | self.reload() |
| 433 | |
| 434 | def trust_local_replication_by(self, user): |
| 435 | if _system != 'Windows': |