Skip to content

Instantly share code, notes, and snippets.

@ammgws
ammgws / archlinux_chroot_jail_user_setup_guide.md
Created March 15, 2021 13:40
Create chroot jail so friend can SSH into server and/or use it for sshuttle (Arch Linux)

Replace "jaileduser" with whatever you want the username to be.

Step 1 (as root) - Setup chroot environment and user. Replace fish in the last command with whatever shell you want.

sudo su - 
mkdir --parents /home/jaileduser/home
useradd --create-home --gid users --home /home/jaileduser/home/jaileduser jaileduser
usermod --home /home/jaileduser jaileduser
mkdir --parents /{etc/jail/jaileduser,var/jail/jaileduser/{cache/{key,pkg},lib}}
chown jaileduser:users /var/jail/jaileduser/cache/key
adduser.fish
81 chars: When creating a group, this option forces the new groupid to be the given number
98 chars: Use shell as the user\'s login shell, rather than the default specified by the configuration file
117 chars: Add the new user to GROUP instead of a usergroup or the default group defined by USERS_GID in the configuration file
122 chars: Override the first uid in the range that the uid is chosen from (overrides FIRST_UID specified in the configuration file)
--------------------------
animate.fish
101 chars: On, activate, off, deactivate, set, opaque, copy transparent, extract, background, or shape [option]
--------------------------
ansible-playbook.fish
@ammgws
ammgws / virtual_wifi_setup_notes.md
Last active June 8, 2020 14:49
virtual wifi for testing

create wpa_supplicant.conf somewhere

network={
    ssid="meow"
    key_mgmt=NONE
    priority=16
}
ctrl_interface=/run/wpa_supplicant
update_config=1
This file has been truncated, but you can view the full file.
[
{
"id": 7,
"name": "HDMI-A-2",
"rect": {
"x": 1920,
"y": 0,
"width": 1920,
"height": 1080
},
This file has been truncated, but you can view the full file.
[
{
"id": 7,
"name": "HDMI-A-2",
"rect": {
"x": 1920,
"y": 0,
"width": 1920,
"height": 1080
},
This file has been truncated, but you can view the full file.
[
{
"id": 7,
"name": "HDMI-A-2",
"rect": {
"x": 1920,
"y": 0,
"width": 1920,
"height": 1080
},
[
{
"id": 7,
"name": "HDMI-A-2",
"rect": {
"x": 1920,
"y": 0,
"width": 1920,
"height": 1080
},
[
{
"id": 7,
"name": "HDMI-A-2",
"rect": {
"x": 1920,
"y": 0,
"width": 1920,
"height": 1080
},
[
{
"id": 7,
"name": "HDMI-A-2",
"rect": {
"x": 1920,
"y": 0,
"width": 1920,
"height": 1080
},
[
{
"id": 7,
"name": "HDMI-A-2",
"rect": {
"x": 1920,
"y": 0,
"width": 1920,
"height": 1080
},