As a curator
I want to create drop boxes for a list of username
So that I don't run out of account to distribute
additional infos
on staging and live bastion on Upstream, there is a script that bulk create drop box account and save credentials in a log to be sent to curators. That script needs to be saved in git repo under gigadb/app/tools/drobox-tools/make_dropbox.sh, and then deployed to the FTP servers through the files_playbook.yml.
Tasks
[ ] #1874
[ ] #1875
[ ] #1876
[ ] #1877
[ ] #1878
[ ] #1879
#!/usr/bin/env bash
set -e
touch ./new_dropboxes.txt
date >> ./new_dropboxes.txt
for username in "$@"; do
echo "Generating password for user $username:"
password=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13; echo)
echo $password > /tmp/$username.pass
echo $password >> /tmp/$username.pass
echo "$username:$password" >> ./new_dropboxes.txt
echo "Making directory in /share/dropbox"
mkdir -p /share/dropbox/$username
echo "Creating FTP account"
docker compose exec -T ftpd pure-pw useradd $username -f /etc/pure-ftpd/passwd/pureftpd.passwd -m -u dropboxuser -d /home/$username < /tmp/$username.pass
echo "Cleaning up"
rm /tmp/$username.pass
done
After PR #1943 is merged, this ticket become simpler to implement as the dropbox creation script can be run from the server the curators have access too (#1876, #1877 and #1878 will become unnecessary)
user story
additional infos
on staging and live bastion on Upstream, there is a script that bulk create drop box account and save credentials in a log to be sent to curators. That script needs to be saved in git repo under
gigadb/app/tools/drobox-tools/make_dropbox.sh
, and then deployed to the FTP servers through thefiles_playbook.yml
.Tasks