Permalink
Browse files

Merge pull request #2061 from nickanderson/ENT-4196/3.12

ENT-4149: Change reset administrative credentials documentation
  • Loading branch information...
nickanderson committed Jan 3, 2019
2 parents 70fe1c9 + 4ddb3c6 commit 103422d5f4e520ea26d7caea85d15727eecf4d2b
Showing with 3 additions and 10 deletions.
  1. +3 −10 enterprise-cfengine-guide/hub_administration/reset-admin-creds.markdown
@@ -10,18 +10,11 @@ The default `admin` user can be reset to defaults using the following SQL.
cfsettings-setadminpassword.sql:

```sql
UPDATE "users"
SET password='SHA=aa459b45ecf9816d472c2252af0b6c104f92a6faf2844547a03338e42e426f52',
salt='eWAbKQmxNP',
name='admin',
email='admin@organisation.com',
active='1',
roles='{admin,cf_remoteagent}',
changetimestamp = now()
WHERE username='admin';
INSERT INTO "users" ("username", "password", "salt", "name", "email", "external", "active", "roles", "changetimestamp")
SELECT 'admin', 'SHA=aa459b45ecf9816d472c2252af0b6c104f92a6faf2844547a03338e42e426f52', 'eWAbKQmxNP', 'admin', 'admin@organisation.com', false, '1', '{admin,cf_remoteagent}', now()
WHERE NOT EXISTS (SELECT 1 FROM users WHERE username='admin');
ON CONFLICT (username, external) DO UPDATE
SET password = 'SHA=aa459b45ecf9816d472c2252af0b6c104f92a6faf2844547a03338e42e426f52',
salt = 'eWAbKQmxNP';
```

To reset the CFEngine admin user run the following sql as root on your hub

0 comments on commit 103422d

Please sign in to comment.