Skip to content

Commit 2ed69b6

Browse files
committed
more utility funcs
1 parent d41cf5b commit 2ed69b6

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

irods/test/pam.bats/experiment.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ DIR=$(dirname $0)
33
. $DIR/funcs
44
cd "$DIR"
55
set_up_ssl sudo
6+
add_irods_to_system_pam_configuration

irods/test/pam.bats/funcs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,19 @@ age_out_pam_password() {
128128
local new_time=$((mtime - offset))
129129
sudo su - postgres -c "psql ICAT -c 'update r_user_password set create_ts=$new_time, modify_ts=$new_time where user_id=$id'"
130130
}
131+
132+
add_irods_to_system_pam_configuration() {
133+
local tempfile=/tmp/irods-pam-config.$$
134+
cat <<-EOF >$tempfile
135+
auth required pam_env.so
136+
auth sufficient pam_unix.so
137+
auth requisite pam_succeed_if.so uid >= 500 quiet
138+
auth required pam_deny.so
139+
EOF
140+
sudo chown root.root $tempfile
141+
sudo mv $tempfile /etc/pam.d/irods
142+
}
143+
144+
setup_preconnect_preference() {
145+
sudo su irods -c "sed -i.orig 's/\(^\s*acPreConnect.*CS_NEG\)\([A-Z_]*\)/\1_$1/' /etc/irods/core.re"
146+
}

0 commit comments

Comments
 (0)