Saturday, June 11, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


What is the under the hood difference in how linux implements commands which can be piped vs those that accept command arguments?

Posted: 11 Jun 2022 07:23 PM PDT

I understand the basics of OS memory management, processes, communication between processes, etc. However, it is not obvious to me the fundamental difference between the implementation of commands that can receive input via pipes and those that can only accept command arguments.

Why would a command accept input via one method but not the other, and how one can easily tell which input method a command accepts?

As a trivial example, why can I pipe the filenames output by ls to cat for display, but cannot do the same for rm? Is there a philosophical reason, deep technical reason, or arbitrary choice in implementation that drives this difference in behavior?

ls | cat  delete_me_1.txt  delete_me_2.txt    ls | rm  rm: missing operand  

pipe for read command does not work

Posted: 11 Jun 2022 06:41 PM PDT

read command in sh works if I redirect file1 as standard input like

$ cat file1  first second  $ read u v <file1  $ echo $u  first  $ echo $v  second  

However, if I redirect standard output from echo like

$ echo first second | read a b  $ echo $a    

It does not work. I thought read gets standard input from pipe in the second case. Why am I wrong? Thank you.

Why menu options/items for editors/commands are declared with uppercase characters?

Posted: 11 Jun 2022 05:45 PM PDT

When nano is running, in the bottom appears the menu options based on ^#, for example

^O  ^X  

etc ..

Each one represents

  • ctrl + o
  • ctrl + x

respectively

Reason of this post: when a new linux user - nobody has born with knowledge - see these menu options/items using uppercase characters he could assume the following:

  • ctrl + shift + o
  • ctrl + shift + x

Therefore, why not from the beginning show ^o and ^x - it through with lowercase? Why uppercase? - Is there a historical reason?

This scenario applies for example for the less command too, about:

f ^F ^V SPACE * Forward one window (or N lines).  b ^B ESC-v *    Backward one window (or N lines).  z * Forward one window (and set window to N).  w * Backward one window (and set window to N).  

Observe ^F and ^B - so why not ^f and ^b?

How to make Mozilla Firefox to follow the Freedesktop XDG specification?

Posted: 11 Jun 2022 07:20 PM PDT

I want to use the XDG specification to avoid cluttering in my $HOME directory in Arch Linux.

Right now, Firefox version 101 created a $HOME/.mozilla directory, which I want to place somewhere else.

So, how can I configure Firefox to use a different directory?

less command: b/f vs w/s

Posted: 11 Jun 2022 06:46 PM PDT

About the less and according with:

indicates the following:

f ^F ^V SPACE * Forward one window (or N lines).  b ^B ESC-v *    Backward one window (or N lines).  z * Forward one window (and set window to N).  w * Backward one window (and set window to N).  

Enabling the line numbers - with -N - for example for man less itself, I can see that b/f works/behaves the same than w/z it about the amount of content/lines moved up/down by either window or page.

Question

  • What is the difference between b/f vs w/z?

normally I use the first pair, but when use the second pair?

Extra Question

  • What does and set window to N mean?

I am assuming it is the expected difference that makes w/z different against b/f

chroot as unpriviledged user leads to 'Permission denied' trying to run any binary

Posted: 11 Jun 2022 05:05 PM PDT

I have a chroot root containing some static binaries on an ARMv7l platform (Kobo eReader, see InkBox OS project), namely BusyBox. chrooting as root works fine:

kobo:/kobo/mnt/onboard/onboard/.apps/Sanki# env PATH=/system-bin /tmp/chroot /data/onboard/.apps/Sanki/ /app-temp/busybox sh  kobo:/# whoami  whoami: unknown uid 0 #### I am root  kobo:/#  

then I tried to login as an unpriviledged user in the chroot via the --userspec option:

kobo:/kobo/mnt/onboard/onboard/.apps/Sanki# env PATH=/system-bin /tmp/chroot --userspec=user:user /data/onboard/.apps/Sanki/ /app-temp/busybox sh  chroot: failed to run command '/app-temp/busybox': Permission denied  kobo:/kobo/mnt/onboard/onboard/.apps/Sanki#  

Stack trace:

kobo:/kobo/mnt/onboard/onboard/.apps/Sanki# strace env PATH=/system-bin /tmp/chroot --userspec=user:user /data/onboard/.apps/Sanki/ /system-bin/busybox sh  execve("/usr/bin/env", ["env", "PATH=/system-bin", "/tmp/chroot", "--userspec=user:user", "/data/onboard/.apps/Sanki/", "/system-bin/busybox", "sh"], 0x7e8f5cf8 /* 17 vars */) = 0  set_tls(0x2ad13388)                     = 0  set_tid_address(0x2ad13f3c)             = 3925  brk(NULL)                               = 0x2abcd000  brk(0x2abcf000)                         = 0x2abcf000  mmap2(0x2abcd000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2abcd000  open("/etc/ld-musl-armhf.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)  open("/lib/libacl.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_BASIC_STATS, 0x7eafe5f8) = -1 ENOSYS (Function not implemented)  fstat64(3, {st_mode=S_IFREG|0755, st_size=17616, ...}) = 0  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0h\22\0\0004\0\0\0"..., 936) = 936  mmap2(NULL, 86016, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2abcf000  mmap2(0x2abe2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0x2abe2000  close(3)                                = 0  open("/lib/libattr.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_BASIC_STATS, 0x7eafe5f8) = -1 ENOSYS (Function not implemented)  fstat64(3, {st_mode=S_IFREG|0755, st_size=13480, ...}) = 0  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\320\r\0\0004\0\0\0"..., 936) = 936  mmap2(NULL, 81920, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2abe4000  mmap2(0x2abf6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x2abf6000  close(3)                                = 0  mprotect(0x2abe2000, 4096, PROT_READ)   = 0  mprotect(0x2abf6000, 4096, PROT_READ)   = 0  mprotect(0x2abb5000, 24576, PROT_READ)  = 0  prctl(PR_SET_NAME, "env")               = 0  prctl(PR_SET_KEEPCAPS, 2125458926)      = -1 EINVAL (Invalid argument)  execve("/tmp/chroot", ["/tmp/chroot", "--userspec=user:user", "/data/onboard/.apps/Sanki/", "/system-bin/busybox", "sh"], 0x7eafecf4 /* 17 vars */) = 0  set_tls(0x2acff388)                     = 0  set_tid_address(0x2acfff3c)             = 3925  brk(NULL)                               = 0x2ac75000  brk(0x2ac77000)                         = 0x2ac75000  mmap2(NULL, 8192, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab4b000  mprotect(0x2ab4c000, 4096, PROT_READ|PROT_WRITE) = 0  open("/etc/ld-musl-armhf.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)  open("/lib/libacl.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_BASIC_STATS, 0x7e811648) = -1 ENOSYS (Function not implemented)  fstat64(3, {st_mode=S_IFREG|0755, st_size=17616, ...}) = 0  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0h\22\0\0004\0\0\0"..., 936) = 936  mmap2(NULL, 86016, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2ad00000  mmap2(0x2ad13000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0x2ad13000  close(3)                                = 0  open("/lib/libattr.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_BASIC_STATS, 0x7e811648) = -1 ENOSYS (Function not implemented)  fstat64(3, {st_mode=S_IFREG|0755, st_size=13480, ...}) = 0  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\320\r\0\0004\0\0\0"..., 936) = 936  mmap2(NULL, 81920, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2aaf1000  mmap2(0x2ab03000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x2ab03000  close(3)                                = 0  mprotect(0x2ad13000, 4096, PROT_READ)   = 0  mprotect(0x2ab03000, 4096, PROT_READ)   = 0  mprotect(0x2ac5d000, 24576, PROT_READ)  = 0  prctl(PR_SET_NAME, "/tmp/chroot")       = 0  prctl(PR_SET_KEEPCAPS, 2122391093)      = -1 EINVAL (Invalid argument)  mmap2(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaec000  statx(AT_FDCWD, "/data", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW, STATX_BASIC_STATS, 0x7e8119b0) = -1 ENOSYS (Function not implemented)  lstat64("/data", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0  statx(AT_FDCWD, "/data/onboard", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW, STATX_BASIC_STATS, 0x7e8119b0) = -1 ENOSYS (Function not implemented)  lstat64("/data/onboard", {st_mode=S_IFDIR|0755, st_size=6656, ...}) = 0  statx(AT_FDCWD, "/data/onboard/.apps", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW, STATX_BASIC_STATS, 0x7e8119b0) = -1 ENOSYS (Function not implemented)  lstat64("/data/onboard/.apps", {st_mode=S_IFDIR|0755, st_size=512, ...}) = 0  statx(AT_FDCWD, "/data/onboard/.apps/Sanki", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW, STATX_BASIC_STATS, 0x7e8119b0) = -1 ENOSYS (Function not implemented)  lstat64("/data/onboard/.apps/Sanki", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0  munmap(0x2aaec000, 16384)               = 0  open("/etc/passwd", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aac0000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "root:x:0:0:root:/root:/bin/ash\nb"..., 1024) = 1024  read(3, "mail:/sbin/nologin\nntp:x:123:123"..., 1024) = 302  close(3)                                = 0  munmap(0x2aac0000, 4096)                = 0  open("/etc/group", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac4d000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "root:x:0:root\nbin:x:1:root,bin,d"..., 1024) = 730  close(3)                                = 0  munmap(0x2ac4d000, 4096)                = 0  open("/etc/passwd", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab7d000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "root:x:0:0:root:/root:/bin/ash\nb"..., 1024) = 1024  read(3, "mail:/sbin/nologin\nntp:x:123:123"..., 1024) = 302  close(3)                                = 0  munmap(0x2ab7d000, 4096)                = 0  socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aac7000  connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 24) = -1 ENOENT (No such file or directory)  close(3)                                = 0  munmap(0x2aac7000, 4096)                = 0  open("/etc/group", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aacc000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "root:x:0:root\nbin:x:1:root,bin,d"..., 1024) = 730  read(3, "", 1024)                       = 0  close(3)                                = 0  munmap(0x2aacc000, 4096)                = 0  chroot("/data/onboard/.apps/Sanki/")    = 0  chdir("/")                              = 0  open("/etc/passwd", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aacd000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "user::1000:1000:user:/root:/syst"..., 1024) = 42  close(3)                                = 0  munmap(0x2aacd000, 4096)                = 0  open("/etc/group", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab7e000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "user:x:1000:\n", 1024)         = 13  close(3)                                = 0  munmap(0x2ab7e000, 4096)                = 0  open("/etc/passwd", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac4d000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "user::1000:1000:user:/root:/syst"..., 1024) = 42  close(3)                                = 0  munmap(0x2ac4d000, 4096)                = 0  socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac4d000  connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 24) = -1 ENOENT (No such file or directory)  close(3)                                = 0  munmap(0x2ac4d000, 4096)                = 0  open("/etc/group", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab0b000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "user:x:1000:\n", 1024)         = 13  read(3, "", 1024)                       = 0  close(3)                                = 0  munmap(0x2ab0b000, 4096)                = 0  rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0  rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0  setgroups32(1, [1000])                  = 0  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0  rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0  rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0  setgid32(1000)                          = 0  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0  rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0  rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0  setuid32(1000)                          = 0  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0  execve("/system-bin/busybox", ["/system-bin/busybox", "sh"], 0x7e811d3c /* 17 vars */) = -1 EACCES (Permission denied)  fcntl64(1, F_GETFL)                     = 0x20002 (flags O_RDWR|O_LARGEFILE)  writev(2, [{iov_base="chroot: ", iov_len=8}, {iov_base=NULL, iov_len=0}], 2chroot: ) = 8  writev(2, [{iov_base="failed to run command \342\200\230/system"..., iov_len=47}, {iov_base=NULL, iov_len=0}], 2failed to run command '/system-bin/busybox') = 47  writev(2, [{iov_base=": Permission denied", iov_len=19}, {iov_base=NULL, iov_len=0}], 2: Permission denied) = 19  writev(2, [{iov_base="", iov_len=0}, {iov_base="\n", iov_len=1}], 2  ) = 1  close(1)                                = 0  close(2)                                = 0  exit_group(126)                         = ?  +++ exited with 126 +++  kobo:/kobo/mnt/onboard/onboard/.apps/Sanki# strace env PATH=/system-bin /tmp/chroot --userspec=user:user /data/onboard/.apps/Sanki/ /app-temp/busybox sh  execve("/usr/bin/env", ["env", "PATH=/system-bin", "/tmp/chroot", "--userspec=user:user", "/data/onboard/.apps/Sanki/", "/app-temp/busybox", "sh"], 0x7ec2bcf8 /* 17 vars */) = 0  set_tls(0x2ad36388)                     = 0  set_tid_address(0x2ad36f3c)             = 3929  brk(NULL)                               = 0x2abef000  brk(0x2abf1000)                         = 0x2abf1000  mmap2(0x2abef000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2abef000  open("/etc/ld-musl-armhf.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)  open("/lib/libacl.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_BASIC_STATS, 0x7ebfe608) = -1 ENOSYS (Function not implemented)  fstat64(3, {st_mode=S_IFREG|0755, st_size=17616, ...}) = 0  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0h\22\0\0004\0\0\0"..., 936) = 936  mmap2(NULL, 86016, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2abf1000  mmap2(0x2ac04000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0x2ac04000  close(3)                                = 0  open("/lib/libattr.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_BASIC_STATS, 0x7ebfe608) = -1 ENOSYS (Function not implemented)  fstat64(3, {st_mode=S_IFREG|0755, st_size=13480, ...}) = 0  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\320\r\0\0004\0\0\0"..., 936) = 936  mmap2(NULL, 81920, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2ac06000  mmap2(0x2ac18000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x2ac18000  close(3)                                = 0  mprotect(0x2ac04000, 4096, PROT_READ)   = 0  mprotect(0x2ac18000, 4096, PROT_READ)   = 0  mprotect(0x2abd7000, 24576, PROT_READ)  = 0  prctl(PR_SET_NAME, "env")               = 0  prctl(PR_SET_KEEPCAPS, 2126507504)      = -1 EINVAL (Invalid argument)  execve("/tmp/chroot", ["/tmp/chroot", "--userspec=user:user", "/data/onboard/.apps/Sanki/", "/app-temp/busybox", "sh"], 0x7ebfed04 /* 17 vars */) = 0  set_tls(0x2ad7d388)                     = 0  set_tid_address(0x2ad7df3c)             = 3929  brk(NULL)                               = 0x2ac45000  brk(0x2ac47000)                         = 0x2ac47000  mmap2(0x2ac45000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac45000  open("/etc/ld-musl-armhf.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)  open("/lib/libacl.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_BASIC_STATS, 0x7eab9648) = -1 ENOSYS (Function not implemented)  fstat64(3, {st_mode=S_IFREG|0755, st_size=17616, ...}) = 0  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0h\22\0\0004\0\0\0"..., 936) = 936  mmap2(NULL, 86016, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2ab0a000  mmap2(0x2ab1d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0x2ab1d000  close(3)                                = 0  open("/lib/libattr.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_BASIC_STATS, 0x7eab9648) = -1 ENOSYS (Function not implemented)  fstat64(3, {st_mode=S_IFREG|0755, st_size=13480, ...}) = 0  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\320\r\0\0004\0\0\0"..., 936) = 936  mmap2(NULL, 81920, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2aab3000  mmap2(0x2aac5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x2aac5000  close(3)                                = 0  mprotect(0x2ab1d000, 4096, PROT_READ)   = 0  mprotect(0x2aac5000, 4096, PROT_READ)   = 0  mprotect(0x2ac2d000, 24576, PROT_READ)  = 0  prctl(PR_SET_NAME, "/tmp/chroot")       = 0  prctl(PR_SET_KEEPCAPS, 2125176375)      = -1 EINVAL (Invalid argument)  mmap2(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab1f000  statx(AT_FDCWD, "/data", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW, STATX_BASIC_STATS, 0x7eab99b0) = -1 ENOSYS (Function not implemented)  lstat64("/data", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0  statx(AT_FDCWD, "/data/onboard", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW, STATX_BASIC_STATS, 0x7eab99b0) = -1 ENOSYS (Function not implemented)  lstat64("/data/onboard", {st_mode=S_IFDIR|0755, st_size=6656, ...}) = 0  statx(AT_FDCWD, "/data/onboard/.apps", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW, STATX_BASIC_STATS, 0x7eab99b0) = -1 ENOSYS (Function not implemented)  lstat64("/data/onboard/.apps", {st_mode=S_IFDIR|0755, st_size=512, ...}) = 0  statx(AT_FDCWD, "/data/onboard/.apps/Sanki", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW, STATX_BASIC_STATS, 0x7eab99b0) = -1 ENOSYS (Function not implemented)  lstat64("/data/onboard/.apps/Sanki", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0  munmap(0x2ab1f000, 16384)               = 0  open("/etc/passwd", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aad1000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "root:x:0:0:root:/root:/bin/ash\nb"..., 1024) = 1024  read(3, "mail:/sbin/nologin\nntp:x:123:123"..., 1024) = 302  close(3)                                = 0  munmap(0x2aad1000, 4096)                = 0  open("/etc/group", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aad2000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "root:x:0:root\nbin:x:1:root,bin,d"..., 1024) = 730  close(3)                                = 0  munmap(0x2aad2000, 4096)                = 0  open("/etc/passwd", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aad4000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "root:x:0:0:root:/root:/bin/ash\nb"..., 1024) = 1024  read(3, "mail:/sbin/nologin\nntp:x:123:123"..., 1024) = 302  close(3)                                = 0  munmap(0x2aad4000, 4096)                = 0  socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac1d000  connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 24) = -1 ENOENT (No such file or directory)  close(3)                                = 0  munmap(0x2ac1d000, 4096)                = 0  open("/etc/group", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab47000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "root:x:0:root\nbin:x:1:root,bin,d"..., 1024) = 730  read(3, "", 1024)                       = 0  close(3)                                = 0  munmap(0x2ab47000, 4096)                = 0  chroot("/data/onboard/.apps/Sanki/")    = 0  chdir("/")                              = 0  open("/etc/passwd", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aac8000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "user::1000:1000:user:/root:/syst"..., 1024) = 42  close(3)                                = 0  munmap(0x2aac8000, 4096)                = 0  open("/etc/group", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac1d000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "user:x:1000:\n", 1024)         = 13  close(3)                                = 0  munmap(0x2ac1d000, 4096)                = 0  open("/etc/passwd", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab3c000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "user::1000:1000:user:/root:/syst"..., 1024) = 42  close(3)                                = 0  munmap(0x2ab3c000, 4096)                = 0  socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac1d000  connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 24) = -1 ENOENT (No such file or directory)  close(3)                                = 0  munmap(0x2ac1d000, 4096)                = 0  open("/etc/group", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaf2000  fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0  read(3, "user:x:1000:\n", 1024)         = 13  read(3, "", 1024)                       = 0  close(3)                                = 0  munmap(0x2aaf2000, 4096)                = 0  rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0  rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0  setgroups32(1, [1000])                  = 0  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0  rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0  rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0  setgid32(1000)                          = 0  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0  rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0  rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0  setuid32(1000)                          = 0  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0  execve("/app-temp/busybox", ["/app-temp/busybox", "sh"], 0x7eab9d3c /* 17 vars */) = -1 EACCES (Permission denied)  fcntl64(1, F_GETFL)                     = 0x20002 (flags O_RDWR|O_LARGEFILE)  writev(2, [{iov_base="chroot: ", iov_len=8}, {iov_base=NULL, iov_len=0}], 2chroot: ) = 8  writev(2, [{iov_base="failed to run command \342\200\230/app-te"..., iov_len=45}, {iov_base=NULL, iov_len=0}], 2failed to run command '/app-temp/busybox') = 45  writev(2, [{iov_base=": Permission denied", iov_len=19}, {iov_base=NULL, iov_len=0}], 2: Permission denied) = 19  writev(2, [{iov_base="", iov_len=0}, {iov_base="\n", iov_len=1}], 2  ) = 1  close(1)                                = 0  close(2)                                = 0  exit_group(126)                         = ?  +++ exited with 126 +++  

[chroot]/etc/passwd:

user::1000:1000:user:/root:/system-bin/sh  

[chroot]/etc/group:

user:x:1000:  

Permissions:

kobo:/kobo/mnt/onboard/onboard/.apps/Sanki# ls -ld app-temp  drwxrwxrwt    2 user     user            80 Jun 11 19:26 app-temp  kobo:/kobo/mnt/onboard/onboard/.apps/Sanki# ls -l app-temp/  total 2660  -rwxr-xr-x    1 user     user       1509048 Jun 11 18:52 busybox  kobo:/kobo/mnt/onboard/onboard/.apps/Sanki#  

It also gives me the same 'Permission denied' error if I try to do su user -s /system-bin/sh in the chroot as root.

Any idea of what's wrong? Thanks!

less command g vs p option

Posted: 11 Jun 2022 04:08 PM PDT

In less for navigation purposes according with this tutorial

indicates:

g   Go to the first line in the file.  p   Go to the beginning of the file.  

I tested both, and of course the result is the same (of course using G to go bottom) and testing each one.

But just at a first glance if g and G do the opposite to each other and they are enough to go to the first line (top) and last line (bottom) respectively - so why there is the p option if it does the same as g?

wmctrl Cannot get client list properties. (_NET_CLIENT_LIST or _WIN_CLIENT_LIST) [Solved]

Posted: 11 Jun 2022 05:30 PM PDT

Fresh Arch install running ctwm. If I do a simple wmctrl -l I get

Cannot get client list properties. (_NET_CLIENT_LIST or _WIN_CLIENT_LIST)

I've done plenty of minimal arch installs all basically the same and I've never had this issue and the output is pretty vague to trouble shoot what is missing/wrong.

Rewriting log parsing script in Perl or Python (get rid of awk)

Posted: 11 Jun 2022 06:30 PM PDT

I need accomplish a task of filtering bot's activity in the log file.

Solution should only show records (strings) meeting following criteria

  • user logged in, user changed password, user logged off within same second (all 3 actions have to be done within 1 second);
  • those actions (log in, change password, log off) happened one after another with no other entries in between.

All 3 actions are performed in 1 second of time.

Input data example

[a lot of data]  Mon, 22 Aug 2016 13:15:39 +0200|178.57.66.225|fxsciaqulmlk| - |user logged in| -  Mon, 22 Aug 2016 13:15:39 +0200|178.57.66.225|fxsciaqulmlk| - |user changed password| -  Mon, 22 Aug 2016 13:15:39 +0200|178.57.66.225|fxsciaqulmlk| - |user logged off| -  Mon, 22 Aug 2016 13:15:42 +0200|178.57.66.225|faaaaaa11111| - |user logged in| -  Mon, 22 Aug 2016 13:15:40 +0200|178.57.66.215|terdsfsdfsdf| - |user logged in| -  Mon, 22 Aug 2016 13:15:49 +0200|178.57.66.215|terdsfsdfsdf| - |user changed password| -  Mon, 22 Aug 2016 13:15:49 +0200|178.57.66.215|terdsfsdfsdf| - |user logged off| -  Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user logged in| -  Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user logged in| -  Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user changed password| -  Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user logged off| -  Mon, 22 Aug 2016 13:17:50 +0200|178.57.66.205|abcbbabab| - |user logged in| -  Mon, 22 Aug 2016 13:17:50 +0200|178.57.66.205|abcbbabab| - |user changed password| -  Mon, 22 Aug 2016 13:17:50 +0200|178.57.66.205|abcbbabab| - |user changed profile| -  Mon, 22 Aug 2016 13:17:50 +0200|178.57.66.205|abcbbabab| - |user logged off| -  Mon, 22 Aug 2016 13:19:19 +0200|178.56.66.225|fxsciaqulmla| - |user logged in| -  Mon, 22 Aug 2016 13:19:19 +0200|178.56.66.225|fxsciaqulmla| - |user changed password| -  Mon, 22 Aug 2016 13:19:19 +0200|178.56.66.225|fxsciaqulmla| - |user logged off| -  Mon, 22 Aug 2016 13:20:42 +0200|178.57.67.225|faaaa0a11111| - |user logged in| -  [a lot of data]  

I've written the code below in order to complete the task

awk 'BEGIN { FS=" " } { c[$5]++; l[$5,c[$5]]=$0 } END { for (i in c) { if (c[i] > 2) for (j = 1; j <= c[i]; j++) print l[i,j] } }' $1 \    | grep -E 'logged in|changed password|logged off'  

Usage:

./parse_log.sh logfile.log

Output:

Mon, 22 Aug 2016 13:19:19 +0200|178.56.66.225|fxsciaqulmla| - |user logged in| -  Mon, 22 Aug 2016 13:19:19 +0200|178.56.66.225|fxsciaqulmla| - |user changed password| -  Mon, 22 Aug 2016 13:19:19 +0200|178.56.66.225|fxsciaqulmla| - |user logged off| -  Mon, 22 Aug 2016 13:15:39 +0200|178.57.66.225|fxsciaqulmlk| - |user logged in| -  Mon, 22 Aug 2016 13:15:39 +0200|178.57.66.225|fxsciaqulmlk| - |user changed password| -  Mon, 22 Aug 2016 13:15:39 +0200|178.57.66.225|fxsciaqulmlk| - |user logged off| -  Mon, 22 Aug 2016 13:17:50 +0200|178.57.66.205|abcbbabab| - |user logged in| -  Mon, 22 Aug 2016 13:17:50 +0200|178.57.66.205|abcbbabab| - |user changed password| -  Mon, 22 Aug 2016 13:17:50 +0200|178.57.66.205|abcbbabab| - |user logged off| -  Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user logged in| -  Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user logged in| -  Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user changed password| -  Mon, 22 Aug 2016 13:15:59 +0200|178.57.66.205|erdsfsdfsdf| - |user logged off| -  

But I want to know what alternative written in Perl or Python (with minimum usage of external libs) would look?

how to check if a ssh key is already unlocked

Posted: 11 Jun 2022 02:29 PM PDT

I'm working on automation scripts and have ran into a bottleneck with ssh-add. Apparently ssh-add -l lists all the keys, but a key can be "locked" if the key file is passphrase protected. There's a check to see if a key file is passphrase protected, but so far I've not found a solution to check if passphrase has been provided previously and the key is already in the "unlocked" state.

The reason for this check is to prevent the automation script from triggering the passphrase dialog every time. My question is: why ssh-add does not provide a way of checking locked state for a loaded key? is there a workaround to accomplish this test?

PS: key is already loaded as mentioned and the file path to that key is known.

Maintain parallel lossy and lossless music collections

Posted: 11 Jun 2022 04:12 PM PDT

I have a large music collection. Some of it is lossless files, and some is lossy.

I would like to maintain a copy of the collection that consists of the original collection's lossy files, and lossy transcodes of the original collections lossless files.

Some assumptions:

  • I know how to use ffmpeg to convert flac to opus files
  • I only have flac files that need to be converted, no wav or alac codecs
  • The lossy files can be opus, vorbis, or mp3

I want to:

  • Use minimal storage for the the new music collection. I.e. it would link back to the original lossy files where appropriate.
  • Keep the collection up to date as I add more lossy and lossless files to the original, or update the metadata.
  • Not have to re-transcode lossless files that have not been modified.

I imagine I will need to use some custom scripting to accomplish this, but if anyone has recommendations or tips before I sink lots of time into this, I would be eternally grateful.

systemd Firewall .service Unit: Type=exec or Type=oneshot?

Posted: 11 Jun 2022 03:12 PM PDT

I'm debugging a firewall .service unit and a few questions arise.

One of those questions is the unit's best service type, either exec or oneshot. Virtually no comparisons of the two appear in my searches, probably because exec is a relatively recent addition to systemd (v.249 IIRC).

By way of background, the unit (call it iptables.service) is intended to activate and configure the firewall by running a Bash script (call it iptables.sh) before the network is up (i.e., before network-pre.target), e.g.,

ExecStart=/bin/bash -c '/home/locsh/iptables.sh'  

Type=oneshot has the advantage of not entering the "active" state, so it subsequently can be restarted or reactivated, e.g., by a timer unit. It also is the more common of the two types in most examples, albeit without explanation.

Type=exec has the advantage that it will delay startup of follow-up units until the main service has been executed. This seems to make perfect sense for a firewall .service unit because the network should depend on the script running successfully and remain down otherwise, e.g., if the script temporarily can't be read because somehow the relevant .mount unit hasn't yet activated.

Restart=on-failure seems to be an obvious and prudent addition in either case.

The first question is whether one or the other might better for any reason.

The second question is whether Type=exec, because it delays the start of follow-up units, might introduce a subtle ordering cycle in some edge cases, either with or without "Restart=on-failure", in part because the unit's ordering dependency

Before=network-pre.target  

is relatively early in the boot process.

OpenVPN and logs

Posted: 11 Jun 2022 06:34 PM PDT

I have installed OpenVPN on a linux server and was wondering how I can see http/traffic logs from a user. I would like to see something like: User A accessed google.com at 2022-02-02:10:10:10 - And if there is a way to see packets?

Is is possible to see these logs with OpenVPN?

I tried looking for logs under, but no luck:

/var/log/syslog

/var/log/openvpn.log

/var/log/messages

Thanks

Linux Debian Bullseye - not able to install packages after uninstalling libreoffice

Posted: 11 Jun 2022 01:00 PM PDT

I uninstalled libreoffice and its packages to replace it with another office software. After this step I cannot use apt properly. Doing sudo apt-get install xxxx throws this error message (it always says 54 megs will be freed, though storage should be used, rather than removed):

Reading package lists... Done  Building dependency tree... Done  Reading state information... Done  discord is already the newest version (0.0.17).  The following packages will be REMOVED:  libreoffice-common  0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.  1 not fully installed or removed.  After this operation, 54.0 MB disk space will be freed.  

I also cannot install libreoffice because it has broken packages:

sudo apt-get install libreoffice  The following packages have unmet dependencies:  libreoffice : Depends: libreoffice-writer but it is not installable             Depends: libreoffice-avmedia-backend-gstreamer but it is not installable or                      libreoffice-avmedia-backend-vlc but it is not installable             Recommends: libreoffice-librelogo but it is not installable             Recommends: libreoffice-nlpsolver but it is not installable             Recommends: libreoffice-report-builder but it is not installable             Recommends: libreoffice-script-provider-bsh but it is not installable             Recommends: libreoffice-script-provider-js but it is not installable             Recommends: libreoffice-script-provider-python but it is not installable             Recommends: libreoffice-sdbc-postgresql but it is not installable             Recommends: libreoffice-wiki-publisher but it is not installable             Recommends: libreoffice-java-common (>= 1:6.1.5~) but it is not installable   libreoffice-base : Depends: uno-libs3 (>= 5.1.0~alpha) but it is not installable                  Recommends: libreoffice-writer but it is not installable                  Recommends: libreoffice-java-common (>= 1:6.1.5~) but it is not installable   libreoffice-base-core : Depends: uno-libs3 (>= 5.3.0~alpha) but it is not installable   libreoffice-base-drivers : Depends: uno-libs3 (>= 5.3.0~alpha) but it is not installable                          Recommends: libreoffice-sdbc-hsqldb but it is not installable                          Recommends: libreoffice-sdbc-firebird but it is not installable   libreoffice-calc : Depends: uno-libs3 (>= 5.3.0~alpha) but it is not installable   libreoffice-core : Depends: libreoffice-common (> 1:6.1.5) but it is not going to be installed                  Depends: uno-libs3 (>= 6.1.5-3+deb10u7) but it is not installable   libreoffice-draw : Depends: uno-libs3 (>= 5.3.0~alpha) but it is not installable   libreoffice-impress : Depends: uno-libs3 (>= 5.3.0~alpha) but it is not installable                     Recommends: libreoffice-avmedia-backend-gstreamer but it is not installable or                                 libreoffice-avmedia-backend-vlc but it is not installable   libreoffice-math : Depends: uno-libs3 (>= 5.1.0~alpha) but it is not installable   libreoffice-report-builder-bin : Depends: uno-libs3 (>= 5.1.0~alpha) but it is not installable    python3-uno : Depends: python3 (< 3.8) but 3.9.2-3 is to be installed             Depends: python3.7 but it is not going to be installed             Depends: uno-libs3 (>= 5.3.0~alpha) but it is not installable   E: Unable to correct problems, you have held broken packages.  

Thank you very much in advance.

Is it possible to trace/record every file IO being done by one or all applications, both through syscalls and mmap?

Posted: 11 Jun 2022 07:08 PM PDT

I want to trace every IO operation an application does in its lifetime and don't want any caching effect to interfere. I cannot change the application source code, using a shim would be OK. Performance is not an issue, I just want to record what an application does even if it takes hours. The final goal of this is to use the traces to try to improve heuristics related to filesystems, for example, prefetching. Ideally the output would be something like <filename, offset>, but just would probably be enough.

Here are my ideas so far and why I think they won't work:

  1. Trace all block-level accesses, for example, IOs sent to an SSD. This requires disabling readahead and page cache. The former is easy to do, the latter seems to be impossible. Flushing the page cache every X units of time is out of the question since there is no guarantee every read bypasses the page cache. Disabling only write-cache is also not enough.

  2. Using eBPF to trace all filesystem operations, like this article does. There are two issues here: apparently only the first request of a file is recorded (from the blog: "The probe we implemented ... identify the first time a block is requested"), and I wrote a replica of what the blog does and the reads are not printed outSource is here]2 (edit: the reason why it wasn't showing is that the file I was reading was on an NFS drive. Whoops). The BCC script shows some IOs happening on the system, but none from the touchblk application are printed out. I have no idea why or how.

Edit: here are some other ideas, but I don't know how to implement yet:

  1. Always mark pages as unavailable, so that they are always fetched from disk.
  2. TLB poisoning.

Am I overthinking this? Is there either a solution that I didn't think about that does this or a fix to one of the problems I identified?

Thanks!

Make 2nd column unique and add the respective value of them in 1st columns

Posted: 11 Jun 2022 01:34 PM PDT

I have input as shown below, and I need to keep only unique strings from the second column, where the first column will become the sum of all values for each unique string.

For ex: take the OIA in the 2nd column and add the respective values of OIA from the first column and print before OIA.

INPUT:

1079 OIA  1079 OIA  975  OIA  975  OIA  372  CLN  243  TLN  224  TLN  224  TLN  224  TLN  224  TLN  224  TLN  224  TLN  224  TLN  224  TLN  224  TLN  224  TLN  

Expected Output:

4108    OIA  372     CLN  2483    TLN  

Custom mime type for directories

Posted: 11 Jun 2022 07:30 PM PDT

Is it possible to make a custom mime type for directories (inode/directory)?
Just like what MacOS does with *.app folders (app bundle) which make it possible to open them in another program.

How to run remote server shell script with environment parameters on Jenkins pipeline

Posted: 11 Jun 2022 07:06 PM PDT

I am attempting to run a shell script on a remote server in jenkins scripted pipeline using the sshScript remote: remote, script: command. This line of code currently looks like this:

sshScript remote: remote, script: './bash.sh' "$env.gitTag" "$env.Version"  

However, it keeps saying that the parameters are null there is an error being thrown. I have tried everything and cannot find an answer. I echo the parameters before they are thrown and they contain strings which I expect.

15:56:35  WARNING: Unknown parameter(s) found for class type 'org.jenkinsci.plugins.sshsteps.steps.CommandStep': script  [Pipeline] }  [Pipeline] // stage  [Pipeline] }  [Pipeline] // node  [Pipeline] }  [Pipeline] // timestamps  [Pipeline] End of Pipeline  java.lang.IllegalArgumentException: command is null or empty      at org.jenkinsci.plugins.sshsteps.steps.CommandStep$Execution.run(CommandStep.java:69)      at org.jenkinsci.plugins.sshsteps.util.SSHStepExecution.lambda$start$0(SSHStepExecution.java:84)      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)      at java.base/java.lang.Thread.run(Thread.java:829)  Finished: FAILURE  

These are the errors being published at the end.

Why do my Thinkserver TS140 with Ubuntu Server 20.04 freeze?

Posted: 11 Jun 2022 05:25 PM PDT

I have a Lenovo Thinkserver TS140 with SSD. I can install Ubuntu Desktop or Server 20.04 on the SSD and use it without any problems. But when I add a internal WD Red Pro 6 TB internal hard-drive (ext4) the computer freeze after it have been running for a while. Sometimes a couple of minutes. Sometimes a couple of hours or days. If I disconnect the drive the computer works so something happens when the drive is connected. I am building a Plex media server and it works perfect until the computer freeze. Can someone please tell me what to do? The screen looks like this when that happens.

enter image description here

What is the armored option for in GnuPG?

Posted: 11 Jun 2022 03:37 PM PDT

when I export a gpg private or public key, and specify armored as a switch, I get plain text key, however, the gnupgp website seems to state that these keys are actually encrypted. What's the point in calling it armored if its just plain text? I don't get it.

The key is exported in a binary format, but this can be inconvenient when the key is to be sent though email or published on a web page. GnuPG therefore supports a command-line option --armor that that causes output to be generated in an ASCII-armored format similar to uuencoded documents. In general, any output from GnuPG, e.g., keys, encrypted documents, and signatures, can be ASCII-armored by adding the --armor option.

https://www.gnupg.org/gph/en/manual/x56.html

Docker reporting that my Linux kernel doesn't support cgroup cpu real-time period

Posted: 11 Jun 2022 02:01 PM PDT

I've configured Docker on my Ubuntu 18.04 Server to expose its API so I can create and deploy Docker containers via REST requests, which I need to add certain features to my project. This worked fine for first few endpoints I tried. However, when I attempt to create a new Docker container (the main point of the exercise), I get the message:

{"message": "Your kernel does not support cgroup cpu real-time period"}  

Is this true? Alternatively is it instead that I need to set something up to enable this functionality, or is Docker reporting incorrectly?

curl -X POST -H "Content-Type: application/json" -d "@./test-data/docker-create-api-test.json" http://localhost:1112/containers/create  {"message":"Your kernel does not support cgroup cpu real-time period"}  

Very grateful for any assistance given as this functionality is critical to my project.

Alsa and PulseAudio (csound): Connection Refused

Posted: 11 Jun 2022 03:04 PM PDT

I've come across a problem that has me completely stumped. First; some system info

Linux quasar-nixos-tr 4.19.87 #1-NixOS SMP Sun Dec 1 08:17:47 UTC 2019 x86_64 GNU/Linux  

Now; I'm playing with a sound generating/music library called csound and I'm seeing a strange issue.

I'm using a layer over csound via Haskell; the library is called csound-expression and it merely generates a csound file based on some Haskell code, and then runs it via csound.

As per my understanding; csound then routes the audio to Alsa, which on my system, attempts to route it via PulseAudio's default device.

Now, something strange happens on my system.

  1. After a fresh boot, if I run the csound related code, I hear sound. But, once I've stopped that piece of code from running, no other application seems to be able to connect to PA anymore. Checking with systemctl --user status pulseaudio.service pulsaudio.socket reveals that the service is dead and it has exhausted the max. no. of tries to start up.
  2. After a fresh boot; if I run some other application, say pavucontrol; I can now connect to the PA service but my haskell csound code can no longer connect. It instead, exits with:

    λ> dac . osc $ 200   0dBFS level = 32768.0  --Csound version 6.13 (double samples) Jan  1 1970  [commit: none]  libsndfile-1.0.28  UnifiedCSD:  tmp.csd  STARTING FILE  Creating options  Creating orchestra  closing tag  Creating score  rtaudio: ALSA module enabled  rtmidi: ALSA Raw MIDI module enabled  Elapsed time at end of orchestra compile: real: 0.001s, CPU: 0.001s  sorting score ...      ... done  Elapsed time at end of score sort: real: 0.001s, CPU: 0.001s  displays suppressed  0dBFS level = 1.0  orch now loaded  audio buffered in 256 sample-frame blocks  ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused     *** Cannot open device 'default' for audio input: Connection refused  Failed to initialise real time audio input  inactive allocs returned to freespace  end of score.          overall amps:  0.00000         overall samples out of range:        0  1 errors in performance  Elapsed time at end of performance: real: 0.169s, CPU: 0.004s  

In case 1 (above); I see something interesting in the logs but I'm limited by my understanding of how PA works, how Alsa works and how both of these work together:

Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: Starting Sound Service...  Dec 16 09:28:16 quasar-nixos-tr pulseaudio[2382]: E: [pulseaudio] socket-server.c: bind(): Address already in use  Dec 16 09:28:16 quasar-nixos-tr pulseaudio[2382]: E: [pulseaudio] module.c: Failed to load module "module-esound-protocol-unix" (argument: ""): initialization failed.  Dec 16 09:28:16 quasar-nixos-tr pulseaudio[2382]: E: [pulseaudio] main.c: D-Bus name org.PulseAudio1 already taken.  Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE  Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: pulseaudio.service: Failed with result 'exit-code'.  Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: Failed to start Sound Service.  Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: pulseaudio.service: Service RestartSec=500ms expired, scheduling restart.  Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: pulseaudio.service: Scheduled restart job, restart counter is at 4.  Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: Stopped Sound Service.  Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: Starting Sound Service...  Dec 16 09:28:17 quasar-nixos-tr pulseaudio[2390]: E: [pulseaudio] socket-server.c: bind(): Address already in use  Dec 16 09:28:17 quasar-nixos-tr pulseaudio[2390]: E: [pulseaudio] module.c: Failed to load module "module-esound-protocol-unix" (argument: ""): initialization failed.  Dec 16 09:28:17 quasar-nixos-tr pulseaudio[2390]: E: [pulseaudio] main.c: D-Bus name org.PulseAudio1 already taken.  Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE  Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Failed with result 'exit-code'.  Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: Failed to start Sound Service.  Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Service RestartSec=500ms expired, scheduling restart.  Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Scheduled restart job, restart counter is at 5.  Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: Stopped Sound Service.  Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Start request repeated too quickly.  Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Failed with result 'exit-code'.  

The user here is in the audio and sound groups and I'm using NixOS; which likely has no bearing on this issue.

Can anyone help with what could be going on here?


Also note that; in case 2; alsamixer lists all devices correctly.

Bash list all display output ports

Posted: 11 Jun 2022 02:31 PM PDT

I am looking for a command which prints all visual output ports a laptops has.

I have searched Stack and Google for a while now but I cannot find an answer.

The closest I got is xandr:

eDP-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 277mm x 156mm     1366x768      60.00*+  40.00       1360x768      59.80    59.96       1024x768      60.04    60.00       960x720       60.00       928x696       60.05       896x672       60.01       960x600       60.00       960x540       59.99       800x600       60.00    60.32    56.25       840x525       60.01    59.88       800x512       60.17       700x525       59.98       640x512       60.02       720x450       59.89       640x480       60.00    59.94       680x384       59.80    59.96       576x432       60.06       512x384       60.00       400x300       60.32    56.34       320x240       60.05    HDMI-1 disconnected (normal left inverted right x axis y axis)  DP-1 disconnected (normal left inverted right x axis y axis)  HDMI-2 disconnected (normal left inverted right x axis y axis)  

Looking for something like

HDMI-1 disconnected (normal left inverted right x axis y axis)  DP-1 disconnected (normal left inverted right x axis y axis)  HDMI-2 disconnected (normal left inverted right x axis y axis)  

Unfortunately this output doesn't show the information I need. The information from xrandr is not accurate.

Tried lspci, dmesg (maybe it is in there but couldn't find it), lshw and possibly some more hardware listing commands.

The ideal situation would be

VGA x1  HDMI x1 or mini  DP x1  DVI x1  

But a finger at the right direction would be greatly appreciated.

Download Ubuntu Live CD

Posted: 11 Jun 2022 06:02 PM PDT

For pxe boot I need iso Ubuntu. The problem is when Clients requests iso from the Server and iso is Standard Desktop Image (around 1.5 GB), Clients just do not have enough RAM... So I need just Live CD with no option 'Install Ubuntu'

Is it possible to download only Live CD Image and if it is please share the link.

Thanks in advance!

Why is looping over find's output bad practice?

Posted: 11 Jun 2022 06:32 PM PDT

This question is inspired by

Why is using a shell loop to process text considered bad practice ?

I see these constructs

for file in `find . -type f -name ...`; do smth with ${file}; done  

and

for dir in $(find . -type d -name ...); do smth with ${dir}; done  

being used here almost on a daily basis even if some people take the time to comment on those posts explaining why this kind of stuff should be avoided...
Seeing the number of such posts (and the fact that sometimes those comments are simply ignored) I thought I might as well ask a question:

Why is looping over find's output bad practice and what's the proper way to run one or more commands for each file name/path returned by find ?

GRUB: Display GRUB on external display connected to laptop?

Posted: 11 Jun 2022 04:04 PM PDT

I am using Ubuntu Gnome on a Lenovo Y50-70 with a GTX 860M.

I have been unable to successfully configure /etc/default/grub.

I want GRUB to display on my HDMI monitor but it only displays on my laptop inbuilt eDP display.

proxify a custom program to proxychains

Posted: 11 Jun 2022 05:02 PM PDT

After some research, I didn't find any solutions. So I post here.

My goal: redirected the HTTPs traffic from my custom program to BurpSuite in order to analyse the server response and debug my program.

  • I have Debian 4.4.3
  • I have two network interfaces : eth0 and tap0, I work on tap0.
  • I have a php program that just send an HTTPS request to a local server (tap0). My php code use CURL to send the request (curl_init(), curl_setopt() etc.)

In a debugging goal, I have thought to send my flows via BurpSuite in order to see the HTTPS requests. So:

  • I launch Burp that listen on all interfaces port 8080
  • I configure /etc/proxychains.conf and in my ProxyList there are:

    socks4 127.0.0.1 8080  socks5 127.0.0.1 8080  socks4 XX.XX.XX.217 8080  socks5 XX.XX.XX.217 8080  

And when I use proxychains:

prochychains php myProgramme.php  

My program is executed but proxychains doesn't "proxify" the flow and so Burp doesn't see nothing...

I think that's because I am in my local network ?

What do you think about the best solution to intercept and see the HTTPS flows to my php program ?

AIX memory consumption

Posted: 11 Jun 2022 01:06 PM PDT

Question: how can we report the REAL memory usage (without the cache!) using nmon or vmstat or svmon on AIX 6?

nmon:
enter image description here

vmstat:
enter image description here

svmon:
enter image description here

Like on Linux, we can use the free command, but it's not available in AIX:

[user@notebook ~]$ free -m           total       used       free     shared    buffers     cached  Mem:          7797       4344       3453          0        219       2745  -/+ buffers/cache:       1379       6417  Swap:         2047          0       2047  [user@notebook ~]$ free -m | grep cache: | awk '{print $3}'  1379  [user@notebook ~]$   

How can I know the max possible transmit power of my wireless card?

Posted: 11 Jun 2022 06:08 PM PDT

Is there any way for me to tell the maximum possible power of my wireless card from within Linux?

Or do I need to find the product number of the card, and search for specifications like that online?

Network connection drops after a few seconds

Posted: 11 Jun 2022 04:50 PM PDT

I am on Debian. I configured my NIC with a static IP (192.168.1.56).

When I try to connect to a network, initially with ifconfig eth2 I get (correctly):

eth2 inet addr:192.168.1.56 ....   inet6 addr: fe80:221:ff:fe96:4598/64   

but after a few seconds the 192.168.1.56 disappears and after some other seconds the inet6 address disappears too. When I press in the nm-applet it requires a password, but in the meantime it tries to connect.

At my university, the connection is a DHCP one. It works for the first few seconds but after it doesn't. How do I go about fixing this?

Here it is the relevant part of the syslog: (static ip configuration)

Jan  5 16:38:29 patina dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth2 for sub-path eth2.dbus.get.reason  Jan  5 16:38:29 patina NetworkManager: <debug> [1294245509.629163] nm_device_802_11_wireless_get_activation_ap(): Forcing AP 'Cagei2'  Jan  5 16:38:29 patina NetworkManager: <info>  User Switch: /org/freedesktop/NetworkManager/Devices/eth2 / Cagei2  Jan  5 16:38:29 patina NetworkManager: <info>  Deactivating device eth2.  Jan  5 16:38:29 patina NetworkManager: <WARN>  nm_device_802_11_wireless_set_wep_enc_key(): error setting key for device eth2: Invalid argument  Jan  5 16:38:29 patina NetworkManager: <info>  Device eth2 activation scheduled...  Jan  5 16:38:29 patina NetworkManager: <info>  Activation (eth2) started...  Jan  5 16:38:29 patina NetworkManager: <info>  Activation (eth2) Stage 1 of 5 (Device Prepare) scheduled...  Jan  5 16:38:29 patina NetworkManager: <info>  Activation (eth2) Stage 1 of 5 (Device Prepare) started...  Jan  5 16:38:29 patina NetworkManager: <info>  Activation (eth2) Stage 2 of 5 (Device Configure) scheduled...  Jan  5 16:38:29 patina NetworkManager: <info>  Activation (eth2) Stage 1 of 5 (Device Prepare) complete.  Jan  5 16:38:29 patina NetworkManager: <info>  Activation (eth2) Stage 2 of 5 (Device Configure) starting...  Jan  5 16:38:29 patina NetworkManager: <info>  Activation (eth2/wireless): access point 'Cagei2' is encrypted, but NO valid key exists.  New key needed.  Jan  5 16:38:29 patina NetworkManager: <info>  Activation (eth2) New wireless user key requested for network 'Cagei2'.  Jan  5 16:38:29 patina NetworkManager: <info>  Activation (eth2) Stage 2 of 5 (Device Configure) complete.  Jan  5 16:40:15 patina dhclient: There is already a pid file /var/run/dhclient.eth0.pid with pid 2304  Jan  5 16:40:15 patina dhclient: killed old client process, removed PID file  Jan  5 16:40:15 patina dhclient: Internet Systems Consortium DHCP Client V3.1.1  Jan  5 16:40:15 patina dhclient: Copyright 2004-2008 Internet Systems Consortium.  Jan  5 16:40:15 patina dhclient: All rights reserved.  Jan  5 16:40:15 patina dhclient: For info, please visit http://www.isc.org/sw/dhcp/  Jan  5 16:40:15 patina dhclient:   Jan  5 16:40:15 patina dhclient: Listening on LPF/eth0/00:23:8b:54:96:5d  Jan  5 16:40:15 patina dhclient: Sending on   LPF/eth0/00:23:8b:54:96:5d  Jan  5 16:40:15 patina dhclient: Sending on   Socket/fallback  Jan  5 16:40:15 patina dhclient: DHCPRELEASE on eth0 to 192.168.1.1 port 67  Jan  5 16:40:15 patina avahi-autoipd(eth0)[2133]: Got SIGTERM, quitting.  Jan  5 16:40:15 patina avahi-autoipd(eth0)[2133]: Callout STOP, address 169.254.6.95 on interface eth0  Jan  5 16:40:48 patina dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth2 for sub-path eth2.dbus.get.reason  Jan  5 16:40:48 patina NetworkManager: <debug> [1294245648.742672] nm_device_802_11_wireless_get_activation_ap(): Forcing AP 'Cagei2'  Jan  5 16:40:48 patina NetworkManager: <info>  User Switch: /org/freedesktop/NetworkManager/Devices/eth2 / Cagei2  Jan  5 16:40:48 patina NetworkManager: <info>  Deactivating device eth2.  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2): cancelling...  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2) cancellation handler scheduled...  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2): waiting for device to cancel activation.  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2) cancellation handled.  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2): cancelled.  Jan  5 16:40:48 patina NetworkManager: <WARN>  nm_device_802_11_wireless_set_wep_enc_key(): error setting key for device eth2: Invalid argument  Jan  5 16:40:48 patina NetworkManager: <info>  Device eth2 activation scheduled...  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2) started...  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2) Stage 1 of 5 (Device Prepare) scheduled...  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2) Stage 1 of 5 (Device Prepare) started...  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2) Stage 2 of 5 (Device Configure) scheduled...  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2) Stage 1 of 5 (Device Prepare) complete.  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2) Stage 2 of 5 (Device Configure) starting...  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2/wireless): access point 'Cagei2' is encrypted, but NO valid key exists.  New key needed.  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2) New wireless user key requested for network 'Cagei2'.  Jan  5 16:40:48 patina NetworkManager: <info>  Activation (eth2) Stage 2 of 5 (Device Configure) complete.  Jan  5 16:40:54 patina kernel: [ 1397.945334] lo: Disabled Privacy Extensions  Jan  5 16:41:06 patina NetworkManager: <info>  Activation (eth2) New wireless user key for network 'Cagei2' received.  Jan  5 16:41:06 patina NetworkManager: <info>  Activation (eth2) Stage 1 of 5 (Device Prepare) scheduled...  Jan  5 16:41:06 patina NetworkManager: <info>  Activation (eth2) Stage 1 of 5 (Device Prepare) started...  Jan  5 16:41:06 patina NetworkManager: <info>  Activation (eth2) Stage 2 of 5 (Device Configure) scheduled...  Jan  5 16:41:06 patina NetworkManager: <info>  Activation (eth2) Stage 1 of 5 (Device Prepare) complete.  Jan  5 16:41:06 patina NetworkManager: <info>  Activation (eth2) Stage 2 of 5 (Device Configure) starting...  Jan  5 16:41:06 patina NetworkManager: <info>  Activation (eth2/wireless): access point 'Cagei2' is encrypted, and a key exists.  No new key needed.  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: sending command 'INTERFACE_ADD eth2#011#011wext#011/var/run/wpa_supplicant#011'  Jan  5 16:41:08 patina kernel: [ 1411.596736] ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: response was 'OK'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: sending command 'AP_SCAN 1'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: response was 'OK'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: sending command 'ADD_NETWORK'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: response was '0'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: sending command 'SET_NETWORK 0 ssid 436167656932'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: response was 'OK'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: sending command 'SET_NETWORK 0 proto WPA2'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: response was 'OK'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: sending command 'SET_NETWORK 0 key_mgmt WPA-PSK'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: response was 'OK'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: sending command 'SET_NETWORK 0 psk <key>'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: response was 'OK'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: sending command 'ENABLE_NETWORK 0'  Jan  5 16:41:08 patina NetworkManager: <info>  SUP: response was 'OK'  Jan  5 16:41:08 patina NetworkManager: <info>  Activation (eth2) Stage 2 of 5 (Device Configure) complete.  Jan  5 16:41:08 patina NetworkManager: <info>  Supplicant state changed: 1  Jan  5 16:41:08 patina NetworkManager: <info>  Activation (eth2/wireless) Stage 2 of 5 (Device Configure) successful.  Connected to access point 'Cagei2'.  Jan  5 16:41:08 patina NetworkManager: <info>  Activation (eth2) Stage 3 of 5 (IP Configure Start) scheduled.  Jan  5 16:41:08 patina NetworkManager: <info>  Activation (eth2) Stage 3 of 5 (IP Configure Start) started...  Jan  5 16:41:09 patina NetworkManager: <info>  Activation (eth2) Beginning DHCP transaction.  Jan  5 16:41:09 patina NetworkManager: <info>  Activation (eth2) Stage 3 of 5 (IP Configure Start) complete.  Jan  5 16:41:09 patina NetworkManager: <info>  DHCP daemon state is now 12 (successfully started) for interface eth2  Jan  5 16:41:09 patina dhclient: Internet Systems Consortium DHCP Client 4.1.1-P1  Jan  5 16:41:09 patina dhclient: Copyright 2004-2010 Internet Systems Consortium.  Jan  5 16:41:09 patina dhclient: All rights reserved.  Jan  5 16:41:09 patina dhclient: For info, please visit https://www.isc.org/software/dhcp/  Jan  5 16:41:09 patina dhclient:   Jan  5 16:41:09 patina dhclient: Listening on LPF/eth2/00:21:00:96:45:98  Jan  5 16:41:09 patina dhclient: Sending on   LPF/eth2/00:21:00:96:45:98  Jan  5 16:41:09 patina dhclient: Sending on   Socket/fallback  Jan  5 16:41:10 patina dhclient: DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 7  Jan  5 16:41:17 patina dhclient: DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 12  Jan  5 16:41:18 patina kernel: [ 1421.604521] eth2: no IPv6 routers present  Jan  5 16:41:29 patina dhclient: DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 19  Jan  5 16:41:48 patina dhclient: DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 14  Jan  5 16:41:54 patina NetworkManager: <info>  Device 'eth2' DHCP transaction took too long (>45s), stopping it.  Jan  5 16:41:54 patina dhclient: Internet Systems Consortium DHCP Client 4.1.1-P1  Jan  5 16:41:54 patina dhclient: Copyright 2004-2010 Internet Systems Consortium.  Jan  5 16:41:54 patina dhclient: All rights reserved.  Jan  5 16:41:54 patina dhclient: For info, please visit https://www.isc.org/software/dhcp/  Jan  5 16:41:54 patina dhclient:   Jan  5 16:41:54 patina dhclient: Listening on LPF/eth2/00:21:00:96:45:98  Jan  5 16:41:54 patina dhclient: Sending on   LPF/eth2/00:21:00:96:45:98  Jan  5 16:41:54 patina dhclient: Sending on   Socket/fallback  Jan  5 16:41:54 patina dhclient: DHCPRELEASE on eth2 to 137.222.253.66 port 67  Jan  5 16:41:54 patina dhclient: send_packet: Network is unreachable  Jan  5 16:41:54 patina dhclient: send_packet: please consult README file regarding broadcast address.  Jan  5 16:41:55 patina NetworkManager: <info>  Activation (eth2) Stage 4 of 5 (IP Configure Timeout) scheduled...  Jan  5 16:41:55 patina NetworkManager: <info>  DHCP daemon state is now 14 (normal exit) for interface eth2  Jan  5 16:41:55 patina NetworkManager: <info>  DHCP daemon state is now 14 (normal exit) for interface eth2  Jan  5 16:41:55 patina NetworkManager: <info>  Activation (eth2) Stage 4 of 5 (IP Configure Timeout) started...  Jan  5 16:41:55 patina NetworkManager: <info>  Activation (eth2) failure scheduled...  Jan  5 16:41:55 patina NetworkManager: <info>  Activation (eth2) Stage 4 of 5 (IP Configure Timeout) complete.  Jan  5 16:41:55 patina NetworkManager: <info>  Activation (eth2) failed for access point (Cagei2)  Jan  5 16:41:55 patina NetworkManager: <info>  Activation (eth2) failed.  Jan  5 16:41:55 patina NetworkManager: <info>  Deactivating device eth2.  Jan  5 16:41:55 patina NetworkManager: <WARN>  nm_device_802_11_wireless_set_wep_enc_key(): error setting key for device eth2: Invalid argument  Jan  5 16:41:56 patina kernel: [ 1460.455299] ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready  Jan  5 16:42:07 patina kernel: [ 1471.332129] eth2: no IPv6 routers present  Jan  5 16:46:00 patina kernel: [ 1703.976186] usb 1-3: new high speed USB device using ehci_hcd and address 2  Jan  5 16:46:00 patina kernel: [ 1704.120840] usb 1-3: New USB device found, idVendor=13fe, idProduct=1e00  Jan  5 16:46:00 patina kernel: [ 1704.120851] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3  Jan  5 16:46:00 patina kernel: [ 1704.120858] usb 1-3: Product: USB DISK 2.0      Jan  5 16:46:00 patina kernel: [ 1704.120863] usb 1-3: Manufacturer:           Jan  5 16:46:00 patina kernel: [ 1704.120868] usb 1-3: SerialNumber: 078203000F3C  Jan  5 16:46:00 patina kernel: [ 1704.121082] usb 1-3: configuration #1 chosen from 1 choice  Jan  5 16:46:00 patina NetworkManager: <debug> [1294245960.538897] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_13fe_1e00_078203000F3C').  Jan  5 16:46:00 patina kernel: [ 1704.328698] Initializing USB Mass Storage driver...  Jan  5 16:46:00 patina kernel: [ 1704.328913] scsi6 : SCSI emulation for USB Mass Storage devices  Jan  5 16:46:00 patina kernel: [ 1704.329254] usbcore: registered new interface driver usb-storage  Jan  5 16:46:00 patina kernel: [ 1704.329263] USB Mass Storage support registered.  Jan  5 16:46:00 patina kernel: [ 1704.331074] usb-storage: device found at 2  Jan  5 16:46:00 patina kernel: [ 1704.331080] usb-storage: waiting for device to settle before scanning  Jan  5 16:46:00 patina NetworkManager: <debug> [1294245960.740962] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_13fe_1e00_078203000F3C_if0').  Jan  5 16:46:00 patina NetworkManager: <debug> [1294245960.742373] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_13fe_1e00_078203000F3C_if0_scsi_host').  Jan  5 16:46:05 patina kernel: [ 1709.329094] usb-storage: device scan complete  Jan  5 16:46:05 patina kernel: [ 1709.379165] scsi 6:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 0 CCS  Jan  5 16:46:05 patina kernel: [ 1709.380922] sd 6:0:0:0: Attached scsi generic sg2 type 0  Jan  5 16:46:05 patina NetworkManager: <debug> [1294245965.792242] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_13fe_1e00_078203000F3C_if0_scsi_host_0').  Jan  5 16:46:05 patina NetworkManager: <debug> [1294245965.795336] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_13fe_1e00_078203000F3C_if0_scsi_host_0_scsi_device_lun0').  Jan  5 16:46:05 patina NetworkManager: <debug> [1294245965.799318] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_13fe_1e00_078203000F3C_if0_scsi_host_0_scsi_device_lun0_scsi_generic').  Jan  5 16:46:06 patina kernel: [ 1710.042152] sd 6:0:0:0: [sdb] 8060928 512-byte logical blocks: (4.12 GB/3.84 GiB)  Jan  5 16:46:06 patina kernel: [ 1710.043009] sd 6:0:0:0: [sdb] Write Protect is off  Jan  5 16:46:06 patina kernel: [ 1710.043020] sd 6:0:0:0: [sdb] Mode Sense: 23 00 00 00  Jan  5 16:46:06 patina kernel: [ 1710.043026] sd 6:0:0:0: [sdb] Assuming drive cache: write through  Jan  5 16:46:06 patina kernel: [ 1710.047632] sd 6:0:0:0: [sdb] Assuming drive cache: write through  Jan  5 16:46:06 patina kernel: [ 1710.047643]  sdb: sdb1  Jan  5 16:46:06 patina kernel: [ 1710.113494] sd 6:0:0:0: [sdb] Assuming drive cache: write through  Jan  5 16:46:06 patina kernel: [ 1710.113504] sd 6:0:0:0: [sdb] Attached SCSI removable disk  Jan  5 16:46:06 patina NetworkManager: <debug> [1294245966.835564] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/storage_serial__USB_DISK_2_0_078203000F3C_0_0').  Jan  5 16:46:07 patina NetworkManager: <debug> [1294245967.016379] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/volume_uuid_BCD8_97AF').  Jan  5 16:46:07 patina kernel: [ 1710.696802] FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!  

No comments:

Post a Comment