-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathset_hashed_passwords.pl
More file actions
34 lines (28 loc) · 867 Bytes
/
set_hashed_passwords.pl
File metadata and controls
34 lines (28 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/perl -w
#===============================================================================
#
# FILE: set_hashed_passwords.pl
#
# USAGE: ./set_hashed_passwords.pl
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Dr. Sungsam Gong (sung), sung@bio.cc
# COMPANY: Royal Brompton and Harefield NHS Trust
# VERSION: 1.0
# CREATED: 27/03/12 12:17:42
# REVISION: ---
#===============================================================================
use strict;
use warnings;
use Nectar::Schema::NECTAR;
my $schema = Nectar::Schema::NECTAR->connect('dbi:mysql:database=NECTAR;host=fs01;user=samul;password=snrnsk');
my @users = $schema->resultset('User')->all;
foreach my $user (@users) {
$user->password('cost4ric4n');
$user->update;
}