Change user from marcus to cl
This commit is contained in:
parent
5f58648188
commit
5f1004266d
1 changed files with 24 additions and 24 deletions
|
@ -16,8 +16,8 @@ users:
|
||||||
shell: /usr/sbin/nologin
|
shell: /usr/sbin/nologin
|
||||||
groups: nginxgroup
|
groups: nginxgroup
|
||||||
sudo: null
|
sudo: null
|
||||||
# Create a new user named 'marcus'
|
# Create a new user named 'cl'
|
||||||
- name: marcus
|
- name: cl
|
||||||
# Add the user to the 'users' and 'admin' groups
|
# Add the user to the 'users' and 'admin' groups
|
||||||
groups: users, admin
|
groups: users, admin
|
||||||
# Allow the user to execute any command with sudo without entering a password
|
# Allow the user to execute any command with sudo without entering a password
|
||||||
|
@ -100,7 +100,7 @@ write_files:
|
||||||
# Specifies the command to use for the SFTP subsystem
|
# Specifies the command to use for the SFTP subsystem
|
||||||
Subsystem sftp /usr/lib/openssh/sftp-server
|
Subsystem sftp /usr/lib/openssh/sftp-server
|
||||||
# Specifies the user(s) allowed to log in via SSH (in this case, only the user "marcus")
|
# Specifies the user(s) allowed to log in via SSH (in this case, only the user "marcus")
|
||||||
AllowUsers marcus
|
AllowUsers cl
|
||||||
|
|
||||||
- path: /etc/fail2ban/jail.local
|
- path: /etc/fail2ban/jail.local
|
||||||
content: |
|
content: |
|
||||||
|
@ -272,14 +272,14 @@ write_files:
|
||||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /home/marcus/www/u1/docs/public;
|
root /home/cl/www/u1/docs/public;
|
||||||
index index.html;
|
index index.html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
write_files:
|
write_files:
|
||||||
- path: /home/marcus/setup_git.sh
|
- path: /home/cl/setup_git.sh
|
||||||
owner: 'marcus:marcus'
|
owner: 'cl:cl'
|
||||||
permissions: '0755'
|
permissions: '0755'
|
||||||
defer: True
|
defer: True
|
||||||
content: |
|
content: |
|
||||||
|
@ -288,33 +288,33 @@ write_files:
|
||||||
git config --global user.name "Marcus Kammer"
|
git config --global user.name "Marcus Kammer"
|
||||||
git config --global init.defaultBranch main
|
git config --global init.defaultBranch main
|
||||||
|
|
||||||
- path: /home/marcus/setup_repos.sh
|
- path: /home/cl/setup_repos.sh
|
||||||
owner: 'marcus:marcus'
|
owner: 'cl:cl'
|
||||||
permissions: '0755'
|
permissions: '0755'
|
||||||
defer: True
|
defer: True
|
||||||
content: |
|
content: |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Clone the SBCL repository for a specific branch and depth.
|
# Clone the SBCL repository for a specific branch and depth.
|
||||||
# Version is equal to the sbcl version available in ubuntu apt-get repo.
|
# Version is equal to the sbcl version available in ubuntu apt-get repo.
|
||||||
git clone --depth 1 --branch sbcl-2.1.11 git://git.code.sf.net/p/sbcl/sbcl /home/marcus/sbcl
|
git clone --depth 1 --branch sbcl-2.1.11 git://git.code.sf.net/p/sbcl/sbcl /home/cl/sbcl
|
||||||
# Clone the SLIME repository for a specific branch and depth
|
# Clone the SLIME repository for a specific branch and depth
|
||||||
git clone --depth 1 --branch v2.28 https://github.com/slime/slime.git /home/marcus/slime
|
git clone --depth 1 --branch v2.28 https://github.com/slime/slime.git /home/cl/slime
|
||||||
|
|
||||||
- path: /home/marcus/setup_quicklisp.sh
|
- path: /home/cl/setup_quicklisp.sh
|
||||||
owner: 'marcus:marcus'
|
owner: 'cl:cl'
|
||||||
permissions: '0755'
|
permissions: '0755'
|
||||||
defer: True
|
defer: True
|
||||||
content: |
|
content: |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Needs to be run manually, cant be run automatically.
|
# Needs to be run manually, cant be run automatically.
|
||||||
# If runs automatically, `quicklisp.lisp' cant be find by sbcl.
|
# If runs automatically, `quicklisp.lisp' cant be find by sbcl.
|
||||||
curl https://beta.quicklisp.org/quicklisp.lisp -o /home/marcus/quicklisp.lisp && chown marcus:marcus /home/marcus/quicklisp.lisp
|
curl https://beta.quicklisp.org/quicklisp.lisp -o /home/cl/quicklisp.lisp && chown marcus:marcus /home/cl/quicklisp.lisp
|
||||||
sbcl --load quicklisp.lisp --non-interactive --eval '(quicklisp-quickstart:install)' --quit
|
sbcl --load quicklisp.lisp --non-interactive --eval '(quicklisp-quickstart:install)' --quit
|
||||||
curl https://git.sr.ht/~marcuskammer/cloudinit/blob/main/.sbclrc -o /home/marcus/.sbclrc && chown marcus:marcus /home/marcus/.sbclrc
|
curl https://git.sr.ht/~marcuskammer/cloudinit/blob/main/.sbclrc -o /home/cl/.sbclrc && chown marcus:marcus /home/cl/.sbclrc
|
||||||
sbcl --non-interactive --eval "(ql:quickload '(:hunchentoot :spinneret :dexador :rove :vecto :woo :clsql-sqlite3))" --quit
|
sbcl --non-interactive --eval "(ql:quickload '(:hunchentoot :spinneret :dexador :rove :vecto :woo :clsql-sqlite3))" --quit
|
||||||
|
|
||||||
- path: /home/marcus/block_openai.sh
|
- path: /home/cl/block_openai.sh
|
||||||
owner: 'marcus:marcus'
|
owner: 'cl:cl'
|
||||||
permissions: '0755'
|
permissions: '0755'
|
||||||
defer: True
|
defer: True
|
||||||
content: |
|
content: |
|
||||||
|
@ -333,17 +333,17 @@ write_files:
|
||||||
done < "$file"
|
done < "$file"
|
||||||
[ -f "$file" ] && rm -f "$file"
|
[ -f "$file" ] && rm -f "$file"
|
||||||
|
|
||||||
- path: /home/marcus/setup_user_all.sh
|
- path: /home/cl/setup_user_all.sh
|
||||||
owner: 'marcus:marcus'
|
owner: 'cl:cl'
|
||||||
permissions: '0755'
|
permissions: '0755'
|
||||||
defer: True
|
defer: True
|
||||||
content: |
|
content: |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
/bin/bash /home/marcus/setup_git.sh
|
/bin/bash /home/cl/setup_git.sh
|
||||||
/bin/bash /home/marcus/setup_repos.sh
|
/bin/bash /home/cl/setup_repos.sh
|
||||||
|
|
||||||
- path: /home/marcus/.tmux.conf
|
- path: /home/cl/.tmux.conf
|
||||||
owner: 'marcus:marcus'
|
owner: 'cl:cl'
|
||||||
permissions: '0755'
|
permissions: '0755'
|
||||||
defer: True
|
defer: True
|
||||||
content: |
|
content: |
|
||||||
|
@ -462,5 +462,5 @@ runcmd:
|
||||||
- systemctl enable fail2ban && systemctl start fail2ban
|
- systemctl enable fail2ban && systemctl start fail2ban
|
||||||
# Restart the SSH server to apply the new configuration
|
# Restart the SSH server to apply the new configuration
|
||||||
- systemctl restart sshd
|
- systemctl restart sshd
|
||||||
- sudo -u marcus /bin/bash /home/marcus/setup_user_all.sh
|
- sudo -u cl /bin/bash /home/cl/setup_user_all.sh
|
||||||
- sudo -u marcus ssh-keygen -t ed25519 -C "u1.metalisp" -f ~/.ssh/id_ed25519 -N ""
|
- sudo -u cl ssh-keygen -t ed25519 -C "u1.metalisp" -f ~/.ssh/id_ed25519 -N ""
|
||||||
|
|
Loading…
Add table
Reference in a new issue