view release on metacpan or search on metacpan
lib/App/CPANIDX/HTTP/Server.pm view on Meta::CPAN
=item C<dsn>
After running C<new>, but before calling C<run>, call this to assign the database details to
the server. Takes three arguments: a L<DBI> C<DSN> string, a username (if applicable) and a
password (if applicable).
=item C<run>
Runs the server and starts handling requests.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CPANIDX.pm view on Meta::CPAN
The username for the supplied C<dsn>.
=item C<pass>
The password for the supplied C<dsn>.
=item C<url>
The C<cpanidx-gendb> script will poll this url when it has finished its update. It should be the
root url of your CPANIDX site
view all matches for this distribution
view release on metacpan or search on metacpan
--gpg-path PATH
--gpg-name NAME
These options are used to set the path the the GPG directory (which
contains the keyring) and the name of the key that will be used.
--gpg-password PASSWORD
--gpg-passfile FILE
When signing a package, this script become interactive unless expect
(or perl Expect) is available. If one of these is available, the
password can be passed in at the command line (or a file containing
the password) using one of these two commands.
--env VAR=VAL
Sets an environment variable before building the package. This
option can be used any number of times.
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/App/CamelPKI/Test.pm view on Meta::CPAN
qw(test_simple_utf8 test_bmp_utf8
@test_DN_CAs
%test_der_DNs
%test_public_keys
%test_reqs_SPKAC %test_reqs_PKCS10
%test_keys_plaintext %test_keys_password
%test_self_signed_certs %test_rootca_certs
%test_entity_certs
test_CRL
server_start server_stop server_port
create_camel_pki_conf_php
t/lib/App/CamelPKI/Test.pm view on Meta::CPAN
1dzsPX66bnNHT1dwF9K+ZilNKIpUUEPisXEsLZ28n579qZbP1vmL
-----END RSA PRIVATE KEY-----
RSA2048
);
=item I<%test_keys_password>
The same private keys as in L</%test_keys_plaintext>, but
protected with C<secret> as the password. Keys are the same as in
I<%test_keys_plaintext>; values are encrypted using 3DES-CBC,
as if by the command
openssl rsa -des3 -passout pass:secret -in test.key
=cut
our %test_keys_password =
(rsa1024 => <<RSA1024,
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,106A001EF5153939
t/lib/App/CamelPKI/Test.pm view on Meta::CPAN
is(length(App::CamelPKI::Test->test_bmp_utf8()), 3);
ok(utf8::is_utf8(App::CamelPKI::Test->test_bmp_utf8()));
};
test "%test_keys_plaintext and %test_keys_password" => sub {
is_deeply
([sort keys %App::CamelPKI::Test::test_keys_plaintext],
[sort keys %App::CamelPKI::Test::test_keys_password],
"same keys in both");
if (defined(my $openssl_bin = openssl_path)) {
while(my ($k, $v) =
each %App::CamelPKI::Test::test_keys_password) {
my ($out, $err) = run_thru_openssl
($v, qw(rsa -passin pass:secret));
is($out,
$App::CamelPKI::Test::test_keys_plaintext{$k});
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CatalystStarter/Bloated.pm view on Meta::CPAN
my @args = @_;
my @args_to_show = @args;
my ($o,$e,$r);
## hide db password:
if (
$args_to_show[0] =~ /_create\.pl$/ and
$args_to_show[1] eq "model"
) {
$args_to_show[8] = "<secret>" if
lib/App/CatalystStarter/Bloated.pm view on Meta::CPAN
for schema and model classes.
=item *
If using a dbi:Pg dsn, looks in your ~/.pgpass to find usernames
and passwords and even intelligently completes your dsn if you are
missing hostname and or port.
=item *
Sets up a TT wrapper based on a HTML5 template intializr.com and
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Changelog.pm view on Meta::CPAN
changelog --filter v
=head1 ERRORS
If there is an error during any operation (such as adding, editing, or removing passwords), an error message will be displayed indicating the issue.
=head1 AUTHOR
Luiz Felipe de Castro Vilas Boas <luizfelipecastrovb@gmail.com>
view all matches for this distribution
view release on metacpan or search on metacpan
So to be clear, if you wanted to set a default for C<--query-param-auth>, you
can either:
=over 3
=item 1. Set C<CHARON_QUERY_PARAM_AUTH=password=station>
=item 2. Put a line like C< query_param_auth: password=station > in F<.charonrc>
=item 3. Set C<CHARON_CONFLOC> to F<~/.charonrc> and add a line like the above to that file.
=back
it will just go away, instead of you forgetting to shut it down and leaving it
running forever.
=head2 --query-param-auth
charon --query-param-auth 'password=station'
charon --query-param-auth ''
Query param auth is just a handy way to be able to send moderately authenticated
links to your friends. This is on by default and generates a password with the
key of C<auth>, so links will be C<http://foo:3001/bar.tar.gz?auth=bd75z4j>. If
you want to choose the key and value pass C<$key=$value>, so if you pass
C<password=42> you could use the link C<http://foo:3001/bar.tar.gz?password=42>.
Note that while this is on by default I may decide to change that in the future.
=head2 --index --no-index
view all matches for this distribution
view release on metacpan or search on metacpan
devel/convert-scm.pl view on Meta::CPAN
$sth->execute ('favourites', $pos, $list->[$pos]);
$sth->finish();
}
} elsif ($key eq 'lme-username'
|| $key eq 'lme-password'
|| $key eq 'yahoo-quote-host'
|| $key eq 'yahoo-quote-timezone'
|| $key eq 'commsec-data-url'
|| $key eq 'commsec-enabled') {
my ($key, $value) = @$form;
view all matches for this distribution
view release on metacpan or search on metacpan
#############################################################
## Kubeseal
#############################################################
# Kubeseal handles passwords - Simple use case.
# Creates a yaml manifest file that can be used publicly.
# without sharing the real password.
echo -n bar | kubectl create secret generic mysecret --dry-run=client --from-file=foo=/dev/stdin -o yaml > mysecret.yaml
# Seal a kubernetes manifest file.
# This service needs to be running:
kubectl get service sealed-secrets-controller -n kube-system
#############################################################
## Linux Commands - expect
#############################################################
# Run a command where user input is required (script,auto,password)
expect -c 'spawn ssh SOME_USER@irkdes "date"; expect "password:"; send "asdf1234\r"; interact'
# Expect quirks (scipt,auto,password)
# This will NOT work
echo "SOME_USER" | while read n; do expect ... ; done
# This DOES work
for n in "SOME_USER"; do expect ... ; done
# Suppress output (scipt,auto,password)
# Some output
expect -c 'spawn -noecho ... '
# All output
expect -c 'log_user 0; spawn ... ' # Restore with "log_user 1"
#############################################################
## Linux Commands - passwd, chpasswd, vipw, gpasswd
#############################################################
# Reset/Change a users password (admin)
Log unto fs
sudo passwd xbexxxx
asdf1234
asdf1234
sudo make -C /var/yp
# Change root password
sudo passwd root
# Reset password in a script with no prompt (change)
# Can only supply one user to "passwd"
echo asdf1234 | sudo passwd xbe4092 --stdin; sudo make -C /var/yp
echo -e "xbe4092:asdf1234\npotapov:asdf1234" | sudo chpasswd; sudo make -C /var/yp
# Reset password over ssh (change,admin)
ssh -qtY potapov@lnxbrfs01 'echo -e "xbe4092:asdf123\npotapov:asdf123" | sudo /usr/sbin/chpasswd; sudo make -C /var/yp'
sb fs1 'echo -e "xbe4092:asdf123\npotapov:asdf123" | sudo /usr/sbin/chpasswd; sudo make -C /var/yp'
# Reset password of many users (admin,change)
echo "xbe4092:asdf1234" | sudo chpasswd
sudo make -C /var/yp
# Edit the password file. Disable/Lock user accounts before deleting
# Change /bin/bash to /bin/false
# Asterisk in password field disables account
sudo vipw
sudo make -C /var/yp
# Check if specific user account is:
# L - Locked
#############################################################
## Linux Commands - read
#############################################################
# Read input from the keyword/user without showing the password (much easier in bash)
read -s pass; echo "got [$pass]"
read -s -p "Password:" pass; echo; echo "got [$pass]"
# Read input from the keyword/user without showing the password. Limit password length
read -s -n 5 -p "Password:" pass; echo; echo "got [$pass]"
#############################################################
## Linux Commands - reptyr
# Setup SVN Cyient variables (debugging use)
svn_pull_url="<url>/Tests"
svn_push_url="<url>/Results"
svn_username="tpotapov"
read -s -p "password: " svn_password
SB run 1234 t1+a "svn pull=$svn_pull_url push=$svn_push_url user=$svn_username pass=$svn_password"
#############################################################
## Linux Commands - tail
#############################################################
# Pass through wget firewall/proxy (Download)
read -sp "Password: " PASSWORD
export http_proxy=http://xbe4092:$PASSWORD@pratt-proxyva.utc.com:8080/
export https_proxy=http://xbe4092:$PASSWORD@pratt-proxyva.utc.com:8080/
# If password contains special characters (like #,@ ...)
#############################################################
## Linux Commands - whereis
#############################################################
#############################################################
## Linux Commands - ypcat
#############################################################
# View password file on main server (yellow page cat)
ypcat passwd
# Add ypcat passwd command if missing
vi /var/yp/nicknames
# add entry: passwd passwd.byname
# Return users which are found in the yellow pages password file
cat user_deletion_list | perl -ne 'print `ypcat passwd | grep $_` ' > found_in_yp
# Remove/Delete a user account
1. Check username in Outlook (CTRL-K)
2. Check username in Yellow Pages (ypcat passwd | grep username)
#############################################################
## Linux Commands - yppasswd
#############################################################
# Change your password
yppasswd
#############################################################
## Linux Commands - zero
gpg --gen-key
# Create a PGP signed file
gpg -ea -r "YOUR_NAME" > $HOME/.pause
user USER
password Pas$word
# Show your PGP keys (list)
gpg -k # Public keys.
gpg -K # Secret keys.
# Decrypt a PGP signed file.
gpg -d ~/.pause
# Cache password in agent.
# Some reason this fixed caching.
gpgconf --kill gpg-agent
# Share GPG keys (export from one, import in another machine).
gpg --export-secret-key -a > secretkey.asc
# Selects only form elements (input, select, textarea, button)
# (JQuery,Selectors,Form,Filters,Table 2.6)
:input
# Selects only password elements (input[type=password])
# (JQuery,Selectors,Form,Filters,Table 2.6)
:password
# Selects only radio elements (input[type=radio])
# (JQuery,Selectors,Form,Filters,Table 2.6)
:radio
# Install MySQL on linux.
sudo apt install mysql-server mysql-client libmysqlclient-dev
sudo systemctl start mysql.service
mysql -u root
> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
> CREATE USER 'tim'@'localhost' IDENTIFIED BY 'tim';
> use mysql;
> SELECT User, password_last_changed FROM user;
mysql -u root -proot
cpanm DBD::mysql
# Cannot login to msql with root.
sudo vi /etc/mysql/my.cnf
# Find duplicates using mysql.
mysql -u otrs -potrs otrs -e '
SELECT col,COUNT(col) from table GROUP BY col HAVING COUNT(col) >
# Run mysql query on the command line.
mysql -u user -ppassword table -e 'query'
# Show a table schema in mysql
DESCRIBE table
# MySQL strange behavior
perl -lE 'say for getgrnam("systems")'
# Group ID
perl -lE 'say for getgrgid("systems")'
# Get password file entry for a username (check if they exist)
perl -le 'print for getpwnam "<USER>"'
#############################################################
## Perl Functions - local
#############################################################
# Get terminal width in perl
perl -MTerm::ReadKey= -E "my ($w) = GetTerminalSize(); say $w"
# Read input from the keyword/user without showing the password
perl -MTerm::ReadKey -le 'ReadMode(2); $pass .= $key while(ord($key = ReadKey(0)) !~ /^(?: 10|13 )$/x); ReadMode(0); print "Got [$pass]"'
# Read input from the keyword/user without showing the password (same, but using keywords)
perl -MTerm::ReadKey -le 'ReadMode(noecho); $pass .= $key while(ord($key = ReadKey(0)) !~ /^(?: 10|13 )$/x); ReadMode(restore); print "Got [$pass]"'
perl -MTerm::ReadKey -e 'ReadMode(2); while($c=ReadKey(0), ord($c) !~ /^(?:10|13)$/x){ $pass .= $c } ReadMode(0); print "[$pass]\n"'
# Read input from the keyword/user without showing the password (same, but more compact)
perl -MTerm::ReadKey -le 'ReadMode(2); $pass = ReadLine(0); chomp $pass; ReadMode(0); print "Got [$pass]"'
perl -MTerm::ReadKey -le 'ReadMode(2); $_ = ReadLine(0); chomp; ReadMode(0); print "[$_]"'
# Read input from the keyword/user without showing the password (same, but on windows)
perl -MTerm::ReadKey -le "ReadMode 2; $pass = ReadLine 0; chomp $pass; ReadMode 0; print qq([$pass])"
# Read input from the keyword/user without showing the password. replace characters with a star "*"
perl -MTerm::ReadKey -e 'ReadMode(4); while($c=ReadKey(0),$o=ord($c),$o != 10 and $o != 13){ if($o == 127 || $o == 8){chop $p; print "\b \b"}elsif($o < 32){}else{ $p .= $c; print "*" }} ReadMode(0); print "[$p]\n"'
perl -MTerm::ReadKey -e 'ReadMode 3; while($c=ReadKey(0),$o=ord($c),$o != 10 and $o != 13){ if($o == 127 || $o == 8){chop $p; print "\b \b"}elsif($o < 32){}else{ $p .= $c; print "*" }} ReadMode 0; print "[$p]\n"'
perl -MTerm::ReadKey -e 'ReadMode 4; while($c=ReadKey(0),$o=ord($c),$o!=10){ if($o==127 or $o==8){chop $p; print "\b \b"}elsif($o < 32){}else{$p.=$c; print "*"}} ReadMode 0; print "[$p]\n"'
#############################################################
## PI - General
#############################################################
# No password when entering sudo commands (Linux,pi,debug)
vi /etc/sudoers
# Add this to bottom
pi ALL=(ALL) NOPASSWD:ALL
# No password when entering sudo commands (Linux,pi,debug)
sudo usermod -a -G GROUP_NAME USER
#
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
# The mapped name (cryptHome) must match the one you
# defined in the crypttab. Replace username by the name of the actual user.
#
# You could also mount it under /home, but then you will have
# all user's home directories in one encrypted drive - that
# means all of them need to know the partition's password to open it on boot.
# Originally thought these were also necessary for an external hard drive.
# Appear to work without the lines.
#
sudo vi /etc/crypttab
# <name> <device> <password> <options>
mnt-usb-crypt UUID=<device-uuid> /path/to/key luks,noauto
#
# Need to run after updating cryptab:
sudo update-initramfs -u -k all
#
# Administrators can do just about everything a user would want to do with
# Windows, typically this includes the first user you create with windows.
# You are probably a member of this group.
#
# Users are accounts with lower permissions, and typically require an Administrator
# to enter their password to do anything that would bring up a UAC console in
# Windows. You can create accounts with these permissions (I do it for my
# guest account) with the "Add Remove User Accounts" menu in the Control Panel.
# Find out who have a file opened
# Need to have this setup one time (as admin)
# @REM='
# @echo off
# mode CON: COLS=120 LINES=30
#
# set file=H:/kog.dat
# perl -lE "$f='%file%'; -e $f and exit; print qq(Enter your password: ); chomp($p=<STDIN>); open FH, qq(>$f); print FH $p; system qq(attrib +h $f) "
# set /P pass=< %file%
#
# echo Opening Exceed
# start /B "Exceed" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Open Text Exceed 14 x64\Exceed.lnk"
#
# Service commands
::
:: Add new service
sc.exe create MyProgram binPath="C:\Program Files (x86)\Windows Resource Kits\Tools\srvany.exe"
sc config MyProgram start=auto
sc.exe config MyProgram obj= "me@home.com" password= ""
::
:: Remove a service
sc.exe delete MyProgram
::
:: Start a service
view all matches for this distribution
view release on metacpan or search on metacpan
script/restart-chrome view on Meta::CPAN
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
Do not use any configuration file.
view all matches for this distribution
view release on metacpan or search on metacpan
themes/bs2/static/css/bootstrap.css view on Meta::CPAN
}
select,
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
themes/bs2/static/css/bootstrap.css view on Meta::CPAN
height: auto;
}
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
themes/bs2/static/css/bootstrap.css view on Meta::CPAN
transition: border linear 0.2s, box-shadow linear 0.2s;
}
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Cinema/Controller/User.pm view on Meta::CPAN
return;
}
my $form = $self->formbuilder;
# Get the username and password from form
my $uid = $form->field('username') || "";
my $pwd = $form->field('password') || "";
# If the username and password values were found in form
if ( $form->submitted && $form->validate ) {
my $status = $c->authenticate(
{
username => $uid,
password => $pwd,
active => 1
}
);
if ($status) { # If successful, then let them use the application
$c->flash->{message} = "Welcome back, " . $uid;
$c->res->redirect( $c->uri_for('/menu/home') );
return;
}
else {
$c->flash->{error} = "Bad username or password.";
}
}
}
sub logout : Local {
lib/App/Cinema/Controller/User.pm view on Meta::CPAN
{
first_name => $form->field('fname'),
last_name => $form->field('lname'),
email_address => $form->field('email'),
username => $form->field('uid'),
password => $form->field('pwd'),
active => 1,
user_roles => [ { role_id => $form->field('role') } ]
}
);
my $e = App::Cinema::Event->new();
lib/App/Cinema/Controller/User.pm view on Meta::CPAN
->delete();
$user->first_name( $form->field('fname') );
$user->last_name( $form->field('lname') );
$user->email_address( $form->field('email') );
$user->password( $form->field('pwd') );
foreach ( $form->field('role') ) {
$user->create_related( 'user_roles', { role_id => $_ } );
}
lib/App/Cinema/Controller/User.pm view on Meta::CPAN
name => 'email',
value => $user->email_address,
);
$form->field(
name => 'pwd',
value => $user->password,
);
my @ids = ();
foreach ( $user->user_roles ) {
push @ids, $_->role_id;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ClusterSSH/Getopt.pm view on Meta::CPAN
q{If the terminals overlap too much see the C<terminal_reserve_XXXXX> options in the [_1] file (see [_2]).},
'F<$HOME/.clusterssh/config>', 'L</"FILES">'
);
output '=item *';
output $self->loc(
q{When using ClusterSSH on a large number of systems to connect to a single system using an SSH utility (e.g. you issue a command to to copy a file using scp from the remote computers to a single host) and when these connections require authe...
'F<~/.ssh/authorized_keys>'
);
output '=item *';
output $self->loc(
q{If client windows fail to open, try running:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Cmdline.pm view on Meta::CPAN
--dbname database name
--dbhost hostname hosting database
--dbport database port number
--dbuser user name to access database
--dbpasswd password to access database
--dbsocket UNIX socket accessing the database
-s --show show database access properties
-h display a short usage message
-v --version display a version
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Authentication.pm view on Meta::CPAN
$context = App->context();
$authentication = $context->service("Authentication"); # or ...
$authentication = $context->authentication();
if ($authentication->validate_password($username, $password)) {
...
}
=head1 DESCRIPTION
lib/App/Authentication.pm view on Meta::CPAN
=head1 Public Methods:
=cut
#############################################################################
# validate_password()
#############################################################################
=head2 validate_password()
* Signature: $username = $auth->validate_password();
* Param: void
* Return: $username string
* Throws: App::Exception::Authentication
* Since: 0.01
Sample Usage:
$username = $auth->validate_password();
=cut
sub validate_password {
my ($self, $username, $password) = @_;
return(1);
}
#############################################################################
# Method: service_type()
view all matches for this distribution
view release on metacpan or search on metacpan
script/create-random-file view on Meta::CPAN
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
Do not use any configuration file.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DBBrowser/DB.pm view on Meta::CPAN
return 'Pg';
}
sub get_db_handle {
my ( $self, $db ) = @_;
my $dbh = DBI->connect( "DBI:Pg:dbname=$db", 'user', 'password', {
RaiseError => 1,
PrintError => 0,
});
return $dbh;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DBCritic.pm view on Meta::CPAN
#pod =head1 SYNOPSIS
#pod
#pod use App::DBCritic;
#pod
#pod my $critic = App::DBCritic->new(
#pod dsn => 'dbi:Oracle:HR', username => 'scott', password => 'tiger');
#pod $critic->critique();
#pod
#pod =head1 DESCRIPTION
#pod
#pod This package is used to scan a database schema and catalog any violations
lib/App/DBCritic.pm view on Meta::CPAN
use Moo;
use Scalar::Util 'blessed';
use App::DBCritic::Loader;
for (qw(username password class_name)) { has $_ => ( is => 'ro' ) }
#pod =attr username
#pod
#pod The optional username used to connect to the database.
#pod
#pod =attr password
#pod
#pod The optional password used to connect to the database.
#pod
#pod =attr class_name
#pod
#pod The name of a L<DBIx::Class::Schema|DBIx::Class::Schema> class you wish to
#pod L</critique>.
lib/App/DBCritic.pm view on Meta::CPAN
);
sub _build_schema {
my $self = shift;
my @connect_info = map { $self->$_ } qw(dsn username password);
if ( my $class_name = $self->class_name ) {
return $class_name->connect(@connect_info)
if eval "require $class_name";
}
lib/App/DBCritic.pm view on Meta::CPAN
=head1 SYNOPSIS
use App::DBCritic;
my $critic = App::DBCritic->new(
dsn => 'dbi:Oracle:HR', username => 'scott', password => 'tiger');
$critic->critique();
=head1 DESCRIPTION
This package is used to scan a database schema and catalog any violations
lib/App/DBCritic.pm view on Meta::CPAN
=head2 username
The optional username used to connect to the database.
=head2 password
The optional password used to connect to the database.
=head2 class_name
The name of a L<DBIx::Class::Schema|DBIx::Class::Schema> class you wish to
L</critique>.
view all matches for this distribution
view release on metacpan or search on metacpan
bin/dbiloader view on Meta::CPAN
=head1 SYNOPSIS
dbiloader C<-h>
dbiloader [C<-c>] [C<-t E<lt>separatorE<gt>>] [C<-u E<lt>usernameE<gt>>] [C<-p E<lt>passwordE<gt>>] C<E<lt>connectionE<gt>> C<E<lt>tableE<gt>> [C<E<lt>schemaE<gt>>] [C<E<lt>filesE<gt>>...]
# Read TSV and load into mytable in SQLite database t.db
dbiloader -t '\t' dbi:SQLite:t.db mytable data.txt
# Clear mytable, read CSV (default), and load into mytable in SQLite database t.db
bin/dbiloader view on Meta::CPAN
=head2 C<-u E<lt>usernameE<gt>>
Specify username.
=head2 C<-p E<lt>passwordE<gt>>
Specify password.
=head2 C<E<lt>connectionE<gt>>
Specify DBI connection string.
view all matches for this distribution
view release on metacpan or search on metacpan
bin/dump-dbi-column-info view on Meta::CPAN
pos => 1,
},
user => {
schema => 'str*',
},
password => {
schema => 'str*',
},
catalog => {
schema => 'str*',
},
bin/dump-dbi-column-info view on Meta::CPAN
},
};
sub dump_dbi_column_info {
my %args = @_;
my $dbh = DBI->connect($args{dsn}, $args{user}, $args{password},
{RaiseError=>1});
my @rows;
my $sth = $dbh->column_info($args{catalog}, $args{schema}, $args{table}, undef);
while (my $row = $sth->fetchrow_hashref) {
push @rows, $row;
bin/dump-dbi-column-info view on Meta::CPAN
=item B<--help>, B<-h>, B<-?>
Display help message and exit.
=item B<--password>=I<s>
=item B<--schema>=I<s>
Default value:
bin/dump-dbi-column-info view on Meta::CPAN
catalog (see --catalog)
dsn (see --dsn)
format (see --format)
naked_res (see --naked-res)
password (see --password)
schema (see --schema)
table (see --table)
user (see --user)
=head1 ENVIRONMENT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DDNS/Namecheap.pm view on Meta::CPAN
use LWP::Simple qw($ua get);
$ua->agent("");
use Mozilla::CA;
has domain => ( is => 'ro', isa => 'Str', required => 1 );
has password => ( is => 'ro', isa => 'Str', required => 1 );
has hosts => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has ip => ( is => 'ro', isa => 'Str', required => 0 );
sub update {
my $self = shift;
foreach ( @{ $self->{hosts} } ) {
my $url = "https://dynamicdns.park-your-domain.com/update?domain=$self->{domain}&password=$self->{password}&host=$_";
$url .= "&ip=$self->{ip}" if $self->{ip};
if ( my $return = get($url) ) {
unless ( $return =~ /<errcount>0<\/errcount>/is ) {
$return = ( $return =~ /<responsestring>(.*)<\/responsestring>/is ? $1 : "unknown error" );
print "failure submitting host \"$_\.$self->{domain}\": $return\n";
lib/App/DDNS/Namecheap.pm view on Meta::CPAN
=head1 SYNOPSIS
my $domain = App::DDNS::Namecheap->new(
domain => 'mysite.org',
password => 'abcdefghijklmnopqrstuvwxyz012345',
hosts => [ "@", "www", "*" ],
ip => '127.0.0.1', #optional -- defaults to external ip
);
$domain->update();
view all matches for this distribution
view release on metacpan or search on metacpan
script/gen-bind-zone-from-powerdns-db view on Meta::CPAN
Default value:
"DBI:mysql:database=pdns"
=item B<--db-password>=I<s>
=item B<--db-user>=I<s>
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Devbot.pm view on Meta::CPAN
use Regexp::Common qw /net/;
##################################################
my $nick='devbot';
my $password;
my $server='irc.oftc.net';
my $port=6697;
my $ssl=1;
my @channels;
my $trace=0;
lib/App/Devbot.pm view on Meta::CPAN
my $log=1;
my $store_files=0;
GetOptions (
"nick=s" => \$nick,
"password=s" => \$password,
"server=s" => \$server,
"port=i" => \$port,
"ssl!" => \$ssl,
"channel=s" => \@channels,
"log!" => \$log,
lib/App/Devbot.pm view on Meta::CPAN
mkdir "logs/$channel";
append_file "logs/$channel/$file.txt", strftime ('%T ', localtime), @strings, "\n";
}
sub bot_start{
$irc->plugin_add (NickServID => POE::Component::IRC::Plugin::NickServID->new(Password => $password)) if defined $password;
$irc->plugin_add (AutoJoin => POE::Component::IRC::Plugin::AutoJoin->new(
Channels => \@channels,
RejoinOnKick => 1,
Rejoin_delay => 10,
Retry_when_banned => 60,
lib/App/Devbot.pm view on Meta::CPAN
=item B<--nick> I<nickname>
The nickname of devbot. Defaults to devbot.
=item B<--password> I<password>
If supplied, identify to NickServ with this password
=item B<--server> I<hostname>
The server to connect to. Defaults to irc.oftc.net.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
},
username1 => {
schema => 'str*',
tags => ['category:db-connection'],
},
password1 => {
schema => 'str*',
tags => ['category:db-connection'],
},
dsn2 => {
schema => 'str*',
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
},
username2 => {
schema => 'str*',
tags => ['category:db-connection'],
},
password2 => {
schema => 'str*',
tags => ['category:db-connection'],
},
);
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
# require DBIx::Connect::Any;
#
# my %args = @_;
#
# my $dbh = DBIx::Connect::Any->connect(
# $args{dsn}, $args{username}, $args{password},
# {RaiseError=>1});
#
#}
$SPEC{diff_db_schema} = {
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
require DBIx::Connect::Any;
my %args = @_;
my $dbh1 = DBIx::Connect::Any->connect(
$args{dsn1}, $args{username1}, $args{password1},
{RaiseError=>1});
my $dbh2 = DBIx::Connect::Any->connect(
$args{dsn2}, $args{username2}, $args{password2},
{RaiseError=>1});
require DBIx::Diff::Schema;
my $res = DBIx::Diff::Schema::diff_db_schema($dbh1, $dbh2);
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
=item * B<dsn1>* => I<str>
=item * B<dsn2>* => I<str>
=item * B<password1> => I<str>
=item * B<password2> => I<str>
=item * B<username1> => I<str>
=item * B<username2> => I<str>
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
=item * B<db2>* => I<str>
Name of the second MySQL database.
=item * B<password1> => I<str>
=item * B<password2> => I<str>
=item * B<username1> => I<str>
=item * B<username2> => I<str>
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
=item * B<db2>* => I<str>
Name of the second PostgreSQL database.
=item * B<password1> => I<str>
=item * B<password2> => I<str>
=item * B<username1> => I<str>
=item * B<username2> => I<str>
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
=item * B<db2>* => I<str>
Name of the second PostgreSQL database.
=item * B<password1> => I<str>
=item * B<password2> => I<str>
=item * B<username1> => I<str>
=item * B<username2> => I<str>
view all matches for this distribution
view release on metacpan or search on metacpan
script/dir2dist view on Meta::CPAN
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
Do not use any configuration file.
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/generate/pam-krb5/docknot.yaml view on Meta::CPAN
blurb: |
pam-krb5 is a Kerberos PAM module for either MIT Kerberos or Heimdal. It
supports ticket refreshing by screen savers, configurable authorization
handling, authentication of non-local accounts for network services,
password changing, and password expiration, as well as all the standard
expected PAM features. It works correctly with OpenSSH, even with
ChallengeResponseAuthentication and PrivilegeSeparation enabled, and
supports extensive configuration either by PAM options or in krb5.conf or
both. PKINIT is supported with recent versions of both MIT Kerberos and
Heimdal and FAST is supported with recent MIT Kerberos.
description: |
pam-krb5 provides a Kerberos PAM module that supports authentication, user
ticket cache handling, simple authorization (via .k5login or checking
Kerberos principals against local usernames), and password changing. It can
be configured through either options in the PAM configuration itself or
through entries in the system krb5.conf file, and it tries to work around
PAM implementation flaws in commonly-used PAM-enabled applications such as
OpenSSH and xdm. It supports both PKINIT and FAST to the extent that the
underlying Kerberos libraries support these features.
t/data/generate/pam-krb5/docknot.yaml view on Meta::CPAN
against a Heimdal server, the test will be skipped; if you use the Heimdal
library against an MIT server, the test suite may hang.
Several `module/expired` tests are expected to fail with Heimdal 1.5 due
to a bug in Heimdal with reauthenticating immediately after a
library-mediated password change of an expired password. This is fixed in
later releases of Heimdal.
To run the full test suite, Perl 5.10 or later is required. The following
additional Perl modules will be used if present:
t/data/generate/pam-krb5/docknot.yaml view on Meta::CPAN
Be sure to include the module in the session group as well as the auth
group. Without the session entry, the user's ticket cache will not be
created properly for ssh logins (among possibly others).
If your users should normally all use Kerberos passwords exclusively,
putting something like:
```
password sufficient pam_krb5.so minimum_uid=1000
password required pam_unix.so try_first_pass obscure md5
```
in `/etc/pam.d/common-password` will change users' passwords in Kerberos
by default and then only fall back on Unix if that doesn't work. (You
can make this tighter by using the more complex new-style PAM
configuration.) If you instead want to synchronize local and Kerberos
passwords and change them both at the same time, you can do something
like:
```
password required pam_unix.so obscure sha512
password required pam_krb5.so use_authtok minimum_uid=1000
```
If you have multiple environments that you want to synchronize and you
don't want password changes to continue if the Kerberos password change
fails, use the `clear_on_fail` option. For example:
```
password required pam_krb5.so clear_on_fail minimum_uid=1000
password required pam_unix.so use_authtok obscure sha512
password required pam_smbpass.so use_authtok
```
In this case, if `pam_krb5` cannot change the password (due to password
strength rules on the KDC, for example), it will clear the stored
password (because of the `clear_on_fail` option), and since `pam_unix`
and `pam_smbpass` are both configured with `use_authtok`, they will both
fail. `clear_on_fail` is not the default because it would interfere
with the more common pattern of falling back to local passwords if the
user doesn't exist in Kerberos.
If you use a more complex configuration with the Linux PAM `[]` syntax
for the session and account groups, note that `pam_krb5` returns a
status of ignore, not success, if the user didn't log on with Kerberos.
t/data/generate/pam-krb5/docknot.yaml view on Meta::CPAN
On Red Hat systems, modify `/etc/pam.d/system-auth` instead, which
contains all of the configuration for the different stacks.
You can also use pam-krb5 only for specific services. In that case,
modify the files in `/etc/pam.d` for that particular service to use
`pam_krb5.so` for authentication. For services that are using passwords
over TLS to authenticate users, you may want to use the `ignore_k5login`
and `no_ccache` options to the authenticate module. `.k5login`
authorization is only meaningful for local accounts and ticket caches
are usually (although not always) only useful for interactive sessions.
t/data/generate/pam-krb5/docknot.yaml view on Meta::CPAN
probably also need to add `retain_after_close` to the PAM configuration
to avoid having the user's credentials deleted before they are logged
in.
The Solaris Kerberos library reportedly does not support prompting for a
password change of an expired account during authentication. Supporting
password change for expired accounts on Solaris with native Kerberos may
therefore require setting the `defer_pwchange` or `force_pwchange`
option for selected login applications. See the description and
warnings about that option in the pam_krb5(5) man page.
Some configuration options may be put in the `krb5.conf` file used by
your Kerberos libraries (usually `/etc/krb5.conf` or
`/usr/local/etc/krb5.conf`) instead or in addition to the PAM
configuration. See the man page for more details.
The Kerberos library, via pam-krb5, will prompt the user to change their
password if their password is expired, but when using OpenSSH, this will
only work when `ChallengeResponseAuthentication` is enabled. Unless
this option is enabled, OpenSSH doesn't pass PAM messages to the user
and can only respond to a simple password prompt.
If you are using MIT Kerberos, be aware that users whose passwords are
expired will not be prompted to change their password unless the KDC
configuration for your realm in `[realms]` in `krb5.conf` contains a
`master_kdc` setting or, if using DNS SRV records, you have a DNS entry
for `_kerberos-master` as well as `_kerberos`.
- title: Debugging
body: |
t/data/generate/pam-krb5/docknot.yaml view on Meta::CPAN
return `PAM_IGNORE`, which tells the PAM library to proceed as if that
module wasn't listed in the PAM configuration at all.
`pam_authenticate`, however, returns failure in the ignored user case by
default, since otherwise a configuration using `ignore_root` with
pam-krb5 as the only PAM module would allow anyone to log in as root
without a password. There doesn't appear to be a case where returning
`PAM_IGNORE` instead would improve the module's behavior, but if you
know of a case, please let me know.
By default, `pam_authenticate` intentionally does not follow the PAM
standard for handling expired accounts and instead returns failure from
`pam_authenticate` unless the Kerberos libraries are able to change the
account password during authentication. Too many applications either do
not call `pam_acct_mgmt` or ignore its exit status. The fully correct
PAM behavior (returning success from `pam_authenticate` and
`PAM_NEW_AUTHTOK_REQD` from `pam_acct_mgmt`) can be enabled with the
`defer_pwchange` option.
t/data/generate/pam-krb5/docknot.yaml view on Meta::CPAN
pam_setcred
pam_open_session
```
During the first `pam_authenticate`, we can't obtain credentials and
therefore a ticket cache since the password is expired. But
`pam_authenticate` isn't called again after `pam_chauthtok`, so
`pam_chauthtok` has to create a ticket cache. We however don't want it
to do this for the normal password change (`passwd`) case.
What we do is set a flag in our PAM data structure saying that we're
processing an expired password, and `pam_chauthtok`, if it sees that
flag, redoes the authentication with password prompting disabled after
it finishes changing the password.
Unfortunately, when handling password changes this way, `pam_chauthtok`
will always have to prompt the user for their current password again
even though they just typed it. This is because the saved
authentication tokens are cleared after `pam_authenticate` returns, for
security reasons. We could hack around this by saving the password in
our PAM data structure, but this would let the application gain access
to it (exactly what the clearing is intended to prevent) and breaks a
PAM library guarantee. We could also work around this by having
`pam_authenticate` get the `kadmin/changepw` authenticator in the
expired password case and store it for `pam_chauthtok`, but it doesn't
seem worth the hassle.
- title: History and Acknowledgements
body: |
Originally written by Frank Cusack <fcusack@fcusack.com>, with the
following acknowledgement:
view all matches for this distribution
view release on metacpan or search on metacpan
config/CLI_Config.pm view on Meta::CPAN
# nick to use when we authenticate ourselves to the App::Dochazka::REST server
# when this is set to '' or undef, App::Dochazka::CLI will prompt for it
set( 'DOCHAZKA_REST_LOGIN_NICK', undef );
# DOCHAZKA_REST_LOGIN_NICK
# password to use when we authenticate ourselves to the App::Dochazka::REST server
# when this is set to '' or undef, App::Dochazka::CLI will prompt for a password
# WARNING: PUTTING YOUR PASSWORD HERE MAY BE CONVENIENT, BUT IS PROBABLY UNSAFE
set( 'DOCHAZKA_REST_LOGIN_PASSWORD', undef );
# MREST_CLI_COOKIE_JAR
# default location of the cookie jar
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Dochazka/Common.pm view on Meta::CPAN
All four of these, plus the C<eid> field, have C<UNIQUE> constraints defined at
the database level, meaning that duplicate entries are not permitted. However,
of the four, only C<nick> is required.
Depending on how authentication is set up, employee passwords may also be
stored in this table, using the C<passhash> and C<salt> fields.
For details, see L<App::Dochazka::REST::Model::Employee>.
view all matches for this distribution
view release on metacpan or search on metacpan
config/REST_Config.pm view on Meta::CPAN
# N.B. 1 administrators can edit all fields, and passerbies can't edit any
# N.B. 2 if LDAP authentication and LDAP import/sync are being used, it may not
# make sense for employees to edit *any* of the fields
# N.B. 3 this site param affects the functioning of the "POST employee/self" and "POST employee/current" resources
set( 'DOCHAZKA_PROFILE_EDITABLE_FIELDS', {
'inactive' => [ 'password' ],
'active' => [ 'password' ],
});
# DOCHAZKA_INTERVAL_SELECT_LIMIT
# upper limit on number of intervals fetched (for sanity, to avoid
# overly huge result sets)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Dochazka/WWW/Dispatch.pm view on Meta::CPAN
$log->debug( "Entering " . __PACKAGE__ . "::validate_user_credentials()" );
my $r = $self->request;
my $session = $self->session;
my $nick = $body->{'nam'};
my $password = $body->{'pwd'};
my $standalone = $meta->META_WWW_STANDALONE_MODE;
$log->debug( "Employee $nick login attempt" );
$log->debug( "DOCHAZKA_WWW_BACKEND_URI is " . $site->DOCHAZKA_WWW_BACKEND_URI );
my ( $code, $message, $body_json );
my $rr = $self->rest_req( {
server => $site->DOCHAZKA_WWW_BACKEND_URI,
nick => $nick,
password => $password,
path => 'employee/self/full',
} );
$code = $rr->{'hr'}->code;
$message = $rr->{'hr'}->message;
$body_json = $rr->{'body'};
view all matches for this distribution