[database]
path=/home/foo/.mail
[user]
name=foo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#set -x | |
DUSER=badbrowser | |
# X11 display | |
xhost +SI:localuser:${DUSER} >/dev/null | |
# pulseaudo | |
setfacl -m u:${DUSER}:x ${XDG_RUNTIME_DIR}/pulse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2021/12/31 07:49:25.049908, 5, pid=14551, effective(0, 0), real(0, 0)] ../../source3/lib/username.c:181(Get_Pwnam_alloc) | |
Finding user EXAMPLENET\foo | |
[2021/12/31 07:49:25.049929, 5, pid=14551, effective(0, 0), real(0, 0)] ../../source3/lib/username.c:120(Get_Pwnam_internals) | |
Trying _Get_Pwnam(), username as lowercase is examplenet\foo | |
[2021/12/31 07:49:25.050300, 5, pid=14551, effective(0, 0), real(0, 0)] ../../source3/lib/username.c:128(Get_Pwnam_internals) | |
Trying _Get_Pwnam(), username as given is EXAMPLENET\foo | |
[2021/12/31 07:49:25.050538, 5, pid=14551, effective(0, 0), real(0, 0)] ../../source3/lib/username.c:141(Get_Pwnam_internals) | |
Trying _Get_Pwnam(), username as uppercase is EXAMPLENET\FOO | |
[2021/12/31 07:49:25.050818, 5, pid=14551, effective(0, 0), real(0, 0)] ../../source3/lib/username.c:153(Get_Pwnam_internals) | |
Checking combinations of 0 uppercase letters in examplenet\foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://programmersought.com/article/30002612436/ and | |
# https://www.thegeekstuff.com/2013/07/write-linux-kernel-module/ | |
cat > oops.c <<EOF | |
#include <linux/kernel.h> | |
#include <linux/module.h> | |
static int __init hello_init(void) | |
{ | |
int *p = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ls -ld /home ~/.ssh ~/.ssh/authorized_keys | |
drwxr-xr-x 3 root root 18 Mar 2 12:56 /home | |
drwx------ 2 jiri users 4096 Mar 23 12:28 /home/jiri/.ssh | |
-rw------- 1 jiri users 109 Mar 12 16:55 /home/jiri/.ssh/authorized_keys | |
$ cat /tmp/ssh/sshd_config | |
AllowUsers jiri | |
AuthorizedKeysFile /home/jiri/.ssh/authorized_keys | |
Subsystem sftp /usr/libexec/ssh/sftp-server | |
Port 1234 |
For BIOS boot, IMO UEFI works differently (GRUB).
fdisk /dev/sda # create partition and set it active
mkfs.ext4 /dev/sda1
mount /dev/sda1 /mnt
bsdtar -xvf <iso> -C /mnt/
grub2-install --target=i386-pc --recheck --debug --boot-directory=/mnt/boot /dev/sda
cat > /mnt/boot/grub2/grub.cfg <<EOF
serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ id; sftp -b - -s '/usr/bin/sudo /usr/libexec/sftp-server' localhost << EOL | |
> pwd | |
> cd /root | |
> ls -al | |
> quit | |
> EOL | |
uid=1000(jiri) gid=1000(jiri) groups=1000(jiri),4(wheel),12(audio),13(video),20(scanner),21(network),987(docker),990(libvirt),995(bluetooth) | |
sftp> pwd | |
Remote working directory: /home/jiri | |
sftp> cd /root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UTF-8 encoded sample plain-text file | |
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | |
Markus Kuhn [ˈmaʳkʊs kuːn] <http://www.cl.cam.ac.uk/~mgk25/> — 2002-07-25 CC BY | |
The ASCII compatible UTF-8 encoding used in this plain-text file | |
is defined in Unicode, ISO 10646-1, and RFC 2279. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ type foo | |
foo is a function | |
foo () | |
{ | |
echo "foo"; | |
echo "bar"; | |
echo "running" | |
} | |
$ status=$(foo) | |
$ echo ${status} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+/- Job: "show_id_job" | |
+/- Task Group: "show_id_group" | |
+/- Task: "show_id" | |
+/- Config { | |
+/- args[0]: "--login" => "jiri" | |
+/- args[1]: "jiri" => "-c" | |
args[2]: "/usr/bin/id" | |
command: "/usr/bin/su"} |
NewerOlder