first commit
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
Source: thefirstrun
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Maintainer: Stefl Martin <martin.stefl@ceskatelevize.cz>
|
||||
Build-Depends: curl sudo
|
||||
Homepage: https://debian.czech-tv.cz
|
||||
|
||||
Package: thefirstrun
|
||||
Version: 1.0
|
||||
Architecture: all
|
||||
Essential: no
|
||||
Priority: optional
|
||||
Maintainer: flavienbwk
|
||||
Description: A sample package creating a shortcut that triggers a bash script opening a link to the official Ubuntu website
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
apt install sudo -y
|
||||
useradd -m -d /home/ansict -s /bin/bash -c "Ansible CT" -U ansict
|
||||
sudo usermod -aG sudo ansict
|
||||
echo "ansict ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
mkdir /home/ansict/.ssh
|
||||
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQD7GiVOT4oUwFXsRyAmu5LJx2imW0zMpbVSZg5sa3WDvRLHUk10e7Ch+9SzvusbljlLV31M685cmHzZhSxrGqZR9R7TnhEdZb2QVKTRLBEmL4C2o6wOF+4FKEkOrSr7msDHcwvKN9lDib0MGyvLqZd2MXclAtE+yCvwvvbwOpLztPwyFKvFuBW9PtZ0KFYYxMIxwjOMrzCmb0hlWCnhnmNh08PTR1AT7Sdz8YlMIOYEjTxzRCW8nemjtrpydoBH05q8luqS6LxB4yj2kscSBB10eOviQ6FUQBg3ob0xe3KdCUPq7o2eUah+HDAZOy3MVd+uAuogzCMnpot0VGX+vmWAcV0iwBU0CEHJl12dK6CsMCETX3cjVQqQOueCh9biav9XzbbWDkIfrx871+os15izK03o3LcTZU7sDxkzeYha6/U1Z+5wPGXHTwcwMLsxn98W04rBor2ugVs+j+iKo9P8nTiOXO1Ngq4YrLuBqgJytJScoU72l4DN+CDpl0mP2K0= ansict@ansitest" > /home/ansict/.ssh/authorized_keys2
|
||||
chown -R ansict:ansict /home/ansict
|
||||
cp /etc/ssh/sshd_config /etc/ssh/sshd_config_backup
|
||||
sed -i 's/#PubkeyAuthentication/PubkeyAuthentication/' /etc/ssh/sshd_config
|
||||
sed -i 's/#AuthorizedKeysFile/AuthorizedKeysFile/' /etc/ssh/sshd_config
|
||||
systemctl restart sshd
|
||||
Reference in New Issue
Block a user