Monday, July 18, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Why does yum install stall when performing an RPM install from my spec file?

Posted: 13 Jul 2022 02:42 PM PDT

I normally start with a Minimal Centos 7 and run

rpm -i postgres10-libs-10.15-1PGDG.rhel7.x86_64.rpm   

And this works perfectly.

However, I am now writing an RPM spec file and trying to get it to do the same thing in the post installation like:

%post  rpm -i postgres10-libs-10.15-1PGDG.rhel7.x86_64.rpm   

However, when I do

yum install my-rpm-1.0.0.el7.x86_64.rpm  

it stalls on the rpm -i line. The reason I know this is because when I do

ps -ef  

I can see

 rpm -i postgres10-libs-10.15-1PGDG.rhel7.x86_64.rpm   

never completes.

Does anyone know why rpm -i does not work in a spec file, but does when in a plain old terminal?

Using a console font with glyphs for Raspberry Pi OS Lite

Posted: 13 Jul 2022 02:22 PM PDT

I'm currently using the latest version of Raspberry Pi OS Lite on a 3B+ model. I'm trying to install a font (eg. Caskadia Cove Nerd Font) to use enable the functionality of oh-my-zsh themes (eg. zsh2000). I've tried the steps suggested here, with no luck. What I've come to understand is that the problem is probably the font type being .otf instead of .psf.

Is it impossible to use these kind of fonts on this version of the OS? Should I try to convert the font, or is it possible to install another terminal/console which supports .otf fonts? Any suggestions would be greatly appreciated.

REMOTE HOST IDENTIFICATION HAS CHANGED: sftp -v -o HostKeyAlgorithms=... : Cannot use "ecdsa" and "rsa" in parallel

Posted: 13 Jul 2022 01:45 PM PDT

When I connect to my "OpenSSH_8.2p1 Ubuntu-4ubuntu0.4" server alternating using "sftp -v -o HostKeyAlgorithms=ecdsa-sha2-nistp256 test-user@localhost" and "sftp -v -o HostKeyAlgorithms=rsa-sha2-256 test-user@localhost" I always get when switching from one algorithm to the other the following warning: "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!". Is this the correct behavior that it is not possible to use ECDSA and RSA Host-Key-Algorithms in parallel or is this a bug?

When udev startet a script accordi to a rule,who user is the caller?

Posted: 13 Jul 2022 12:44 PM PDT

When I write my own udev rules to call a shell script, who is the caller user or the group?

Graphical lags on hybrid graphics laptop

Posted: 13 Jul 2022 12:30 PM PDT

I've installed Void Linux on Xiaomi Redmibook Pro 15 2022.
I'm experiencing the strange graphic issue:
In X11 UI works slow. It's even hard to manipulate mouse cursor: it freezes and gets stuck. But if I start video on youtube or run glxgears everything starts to work normal.
Also in TTY if I hold any button screen is not been updated at real time. Letters appear after I release the button.
And if I start X, wallpapers and bar appear only after I move cursor or press any button.

I assume that the problem is with Intel driver. Because on kernels 5.13 and 5.15 lswh marks iGPU "UNCLAIMED" and I can't start X, but TTY works properly and letters appears immediately.

Prerequisites:
CPU: i7-12650
dGPU: Nvidia RTX2050
Kernel: 5.18.9 with nvidia-drm.modeset=1 mode setting
WM: Qtile(same thing with i3)
Display: 3200x2000p, 90Hz
No DM.
Also I did not configure DPI yet, UI is very small, but I don`t think it could be a problem.

My ~/.xinitrc

xrandr --setprovideroutputsource modesetting NVIDIA-0    xrandr --auto     exec qtile start    

Output of glmark2

GL_VENDOR: Intel  GL_RENDERER: Mesa Intel(R) Graphics (ADL GT2)   GL_VERSION: 4.6 (Compatibility Profile) Mesa 22.1.3  

Output of prime-run glmark2

GL_VENDOR: NVIDIA Corporation  GL_RENDERER: NVIDIA GeForce RTX 2050/PCIe/SSE2   GL_VERSION: 4.6.0 NVIDIA 515.48.07  

I've installed Ubuntu alongside with Void and everything works out of the box with kernel 5.15.
If needed I can provide any additional information(maybe some outputs from Ubuntu vs Void)

I tried to find any differences in dmesg and lshw outputs between Ubuntu and Void. I did not find something significant, except:

1)Void: setup_percpu: NR_CPUS:256 nr_cpumask_bits:256 nr_cpu_ids:16 nr_node_ids:1U buntu: setup_percpu: NR_CPUS:8192 nr_cpumask_bits:16 nr_cpu_ids:16 nr_node_ids:1
2) Void dmesg does not contain these lines:

[    0.140758] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations  [    0.140875] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations   [    0.140999] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations  

3)In Ubuntu lshw list devices models, but void lists only vendors.

I would really appreciate any suggestion!

There are the files containing outputs of corresponding programs/OS

dmesg ubuntu
dmesg void
lshw-ubuntu
lshw-void

On macOS, how do I clear the previous bad returns in iTerm2?

Posted: 13 Jul 2022 01:18 PM PDT

I want to permanently clear the bad returns in iTerm2. I have used "Clear" and "command-k" etc including with "l" shortcuts but it apparently only clears the current terminal. If I restart the terminal, the bad returns appear at the beginning.

How can I clear them permanently?[![enter image description here][1]][1]

Thank you for any insight. [1]: https://i.stack.imgur.com/d06kA.png

dhcp: lease expiration vs. infinite lease

Posted: 13 Jul 2022 12:12 PM PDT

As per RFC2131, when the lease expires the client has to stop using the IP address. So do I understand right that if the lease lifetime is set to infinite on the server, then the client does not need to renew/rebind its IP, and thus the server does not have to provide these timeouts (option 58 and 59) to client?

Command-line tool to capture and apply differences between two folders

Posted: 13 Jul 2022 02:11 PM PDT

I am looking for a command line tool that allows me to do two things:

  1. I give it two folders (paths)

    and it creates a delta file containing all the differences between the two folders.

    This file must allow later, "to apply" these differences on the 1st folder, in order to obtain the second one.

    Example of use =>

    compute-deltas /path/folder1/ /path/folder2/ -o delta-file

    and I get a delta-file

  2. I give it a folder and a delta-file, and it "applies" all the differences to the folder

    apply-deltas /path/folder1/ delta-file -o /path/folder2/

    Before running the command => /path/folder2/ is an empty or non-existent folder

    After executing the command => /path/folder2/ is completely restored from folder1 and delta-file

Here is an idea of how it would work, if an existing tool comes to your mind, please let me know, thanks!

It would be like archiving (or making an image) of an rsync run, and then applying it (running it) later.

Can't add another user to samba

Posted: 13 Jul 2022 11:54 AM PDT

Hello I've made a server using samba and for two people it has been working just fine. But when I try to add a third person it says: failed to add entry for user ___. I attempted to resolve this by first by doing $ useradd ____.

But it replies by saying permission denied.

Cannot lock /etc/passed; try again later.

Is it dangerous to install Debian with an active internet connection?

Posted: 13 Jul 2022 01:47 PM PDT

After installing Debian, I was reading through the Securing Debian Manual [1], and I found a warning to not connect to the internet during installation [2]. This surprised me, because this seems to be the default way of installing Debian, and in fact there are many stories of people getting broken/unusable installations when installing without internet access. Moreover, the installer asked for an internet connection early on in the process with no clear option to opt out (but maybe I missed it), and neither the Debian Installation Guide [3] nor the installer mentioned anything about this being insecure.

So my question is: when installing Debian stable (Bullseye) to a laptop in 2022, is it dangerous to connect to the internet during installation? What are the specific risks? For instance, the Securing Debian Manual [2] says:

Since the system will install and activate services immediately, if the system is connected to the Internet and the services are not properly configured you are opening it to attack.

Which services are meant here? Does this only apply to server installs (which might be running a web server, SSH, etc.), or does this also affect desktop users?

References:
[1]: Securing Debian Manual. https://www.debian.org/doc/manuals/securing-debian-manual/index.en.html
[2]: Securing Debian Manual, Section 3.3: Do not plug to the Internet until ready. https://www.debian.org/doc/manuals/securing-debian-manual/ch03s03.en.html
[3]: Debian Installation Guide. https://www.debian.org/releases/stable/installmanual

boot problem with kali linux 2022.2

Posted: 13 Jul 2022 12:46 PM PDT

My laptop: lenovo ideapad 310 15ISK usb : usb 3.0 sandisk 32GB Kali linux 2022.2

I created usb bootable with this instruction: [url]https://www.kali.org/docs/usb/live-usb-install-with-linux/[/url]

An after this I added persistence: [url]https://www.kali.org/docs/usb/usb-persistence/[/url]

When I try boot I have got:

[ 921.789621] nouveau 0000:03:00.0; fifo: SCHED_ERROR 20 []

Or sometimes I have got symbol underscore in left high corner and nothing else.

Or sometimes I have:

[ 211.741160] mt76x2u 1-3:1.0: vendor request req:07 off:175c failed:-110

sleep in Bash if/else sleep vs <condition> && sleep clamining cpu

Posted: 13 Jul 2022 12:13 PM PDT

I wrote a script to check on the battery and if it is below 5% notify the user.

The script is put to sleep for 1 minute after every check.

If I write the script in the following way, the cpu workload will rise to great extend:

#!/bin/sh    while true; do    [[      $(        upower -i /org/freedesktop/UPower/devices/battery_BAT0 |        grep percentage |        grep -Poe  "\d*"      ) -lt 5    ]] &&    notify-send "Battery below 5%" &&    sleep 60  done  

Do you know why the cpu went up? the notify command and the upower command dont free cpu resources

You can see in the image, that a lot of cpu resources are claimed. They will not be cleared.

If I write the script in a more conventional way, with simple if/else blocks, everything works as expected and the cpu will only go up for a short time in the beginning and after the sleep period is over:

while true; do    if [[         $(          upower -i /org/freedesktop/UPower/devices/battery_BAT0 |          grep percentage |          grep -Poe  "\d*"        ) -lt 5       ]]; then      notify-send "Battery below 5%"    else      sleep 60    fi  done  

Do you know why this behaviour is happening?

make append and separate by white space

Posted: 13 Jul 2022 10:48 AM PDT

https://raw.githubusercontent.com/postgrespro/rum/master/Makefile
https://github.com/postgrespro/rum
I'm trying to understand this behavior of make.

INCLUDES = rum.h rumsort.h  RELATIVE_INCLUDES = $(addprefix src/, $(INCLUDES))  $(info $(RELATIVE_INCLUDES))  

returns:

src/rum.h src/rumsort.h  make: *** No targets.  Stop.  

Not sure why it appended and also separated by one white space.

How to get total size of folder

Posted: 13 Jul 2022 11:24 AM PDT

In Solaris server how can i get total size of this output? Could you help me? I need to learn total size of last 1 day file

root@test:# find . -mtime -1 -type f | xargs du -sh  226M    ./10/01.tar  209M    ./10/02.tar  198M    ./10/03.tar  202M    ./10/04.tar  193M    ./10/05.tar  193M    ./10/06.tar  193M    ./10/07.tar  204M    ./10/08.tar  222M    ./10/09.tar  244M    ./10/10.tar  24G     ./10/00.tar  17G     ./10/01.tar  11G     ./10/02.tar  8.3G    ./10/03.tar  6.5G    ./10/04.tar  5.8G    ./10/05.tar  6.0G    ./10/06.tar  8.3G    ./10/07.tar  

Show the window size while resizing

Posted: 13 Jul 2022 10:58 AM PDT

The question "how to know the geometry of a window, while resizing?" looked promising, but its single, accepted answer suggests to use CLI tools to resize a window to a specific size, so it's not answering my specific questions:

  • Using a modern issue of KDE (KDE 5 in my case), is it possible
    to configure the window manager so that a windowlet is shown,
    showing the instantaneous size (usually in pixels, in characters
    for XTerm and its similar) of the resizing window?
  • If yes, how to?

Using the method described in this answer I have the following window, no "Display geometry when moving or resizing" option to be clicked.

enter image description here

Is there a tool or script that can very quickly find duplicates by only comparing filesize and a small fraction of the file contents?

Posted: 13 Jul 2022 10:53 AM PDT

Tools like fdupes are ridiculous overkill when dealing with jpg or h264 compressed files. Two such files having the exact same filesize is already a pretty good indication of them being identical.

If, say, in addition to that, 16 equidistant chunks of 16 bytes are extracted and compared and they are the same as well that would be plenty of evidence for me to assume that they are identical. Is there something like that?

(By the way I am aware that filesize alone can be a rather unreliable indicator since there are options to compress to certain target sizes, like 1MB or 1 CD/DVD. If the same target size is used on many files, it is quite reasonable that some different files will have the exact same size.)

Clone a running fileystem to an image file

Posted: 13 Jul 2022 10:58 AM PDT

How can I clone a running Linux file system (Debian 10) to a .img file? I want to flash that to another SSD and want the new system to run exactly the same. Clonezilla did not work for me. The new machine hardware will be exactly the same.

Remove all dnf modules currently installed

Posted: 13 Jul 2022 02:02 PM PDT

I have a CentOS 8.0 system with quite a few modules installed I don't want. I want to get rid of them to force an upgrade to CentOS 9.0, which I know is not officially supported but it is not actually what this question is really about. This question is only about this one step of removing all modules installed in dnf on my system.

The output from dnf module list was quite large, so I put it here: https://dpaste.com/EXMJLQ3VK

A lot of stuff installed on this system is no longer wanted and as you can see there is quite a lot of bloat that this would get rid of.

I would like to get parseable output from dnf on the modules list, and I also am not completely sure what I am supposed to do to remove them. On the Fedora wiki there is a page on using dnf modules but I can't seem to remove even just one from the list. I have tried things like this to remove modules...

# dnf module remove php:remi-7.4/common  Unable to match profile in argument php:remi-7.4/common  

I of course don't actually want to remove each of these modules one at a time by hand, yet I can't find any way to get a parseable list from dnf nor even remove them manually. If I learn how to do both those things some magic with xargs is all it should take to remove every single thing in the list.

I did manage to disable every module by passing a wildcard to dnf like so...

dnf module disable "*"  

Yet I cannot remove them with this same method...

# dnf module remove "*"  Last metadata expiration check: 2:20:13 ago on Wed 01 Jun 2022 10:32:56 AM UTC.  Error: Cannot enable more streams from module 'pmdk' at the same time  

Why is rsyslog not working properly?

Posted: 13 Jul 2022 11:51 AM PDT

rsyslog is failing to send messages to /var/log/messages and to the external syslog collector as detailed below.

I have an AWS EC2 RHEL 7 instance and an on-premise RHEL 7 instance. They are both minimal installations, standard AMI, etc. The rsyslog configuration is default except for an added .conf file in /etc/rsyslog.d/ to send logging to an external syslog collector. The on-premise instance sends the syslog to an on-premise collector. The AWS instance sends it to an EC2 based collector. The two collectors are running the same software in the same configuration and are receiving events from other sources and functioning normally otherwise.

/etc/rsyslog.conf is the same between both instances. Here are the uncommented lines:

# grep -v "^#\|^$" /etc/rsyslog.conf  $ModLoad imuxsock # provides support for local system logging (e.g. via logger command)  $ModLoad imjournal # provides access to the systemd journal  $WorkDirectory /var/lib/rsyslog  $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat  $IncludeConfig /etc/rsyslog.d/*.conf  $OmitLocalLogging on  $IMJournalStateFile imjournal.state  *.*;mail.none;authpriv.none;cron.none                /var/log/messages  authpriv.*                                              /var/log/secure  mail.*                                                  -/var/log/maillog  cron.*                                                  /var/log/cron  *.emerg                                                 :omusrmsg:*  uucp,news.crit                                          /var/log/spooler  local7.*                                                /var/log/boot.log  

On the cloud instance there is the addition of /etc/rsyslog.d/21-cloudinit.conf:

# Log cloudinit generated log messages to file  :syslogtag, isequal, "[CLOUDINIT]" /var/log/cloud-init.log    # comment out the following line to allow CLOUDINIT messages through.  # Doing so means you'll also get CLOUDINIT messages in /var/log/syslog  & stop  

And on both instance there is also /etc/rsyslog.d/listen.conf:

# cat /etc/rsyslog.d/listen.conf  $SystemLogSocketName /run/systemd/journal/syslog  

On both instances /etc/rsylog.d/xdr.conf has been added. It varies only by the destination for syslog messages, see below.

Cloud instance:

# cat /proc/version  Linux version 3.10.0-1160.62.1.el7.x86_64 (mockbuild@x86-vm-39.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Wed Mar 23 09:04:02 UTC 2022    # yum list installed | grep rsyslog  rsyslog.x86_64               8.24.0-57.el7_9.2 @rhel-7-server-rhui-rpms    # cat /etc/rsyslog.d/xdr.conf  # Forward all log messages to Taegis XDR  # AWS Collector  *.*    @@aws-v-xxxxxx-xxxxxx-xxxxxxxxxxxxx.elb.us-east-1.amazonaws.com:601    # On-Prem Collector  #*.*    @@scwx-collector.xxx.local:601  

On-Premise instance:

# cat /proc/version  Linux version 3.10.0-1160.62.1.el7.x86_64 (mockbuild@x86-vm-39.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Wed Mar 23 09:04:02 UTC 2022    # yum list installed | grep rsyslog  rsyslog.x86_64                    8.24.0-57.el7_9.2          @rhel-7-server-rpms    # cat /etc/rsyslog.d/xdr.conf  # Forward all log messages to Taegis XDR  # AWS Collector  #*.*    @@aws-v-xxxxxx-xxxxxx-xxxxxxxxxxxxx.elb.us-east-1.amazonaws.com:601    # On-Prem Collector  *.*    @@scwx-collector.xxx.local:601  

The endpoint listed in xdr.conf is reachable from each respective instance on port 601. I confirmed independently through a quick telnet session.

# telnet scwx-collector.xxx.local 601  Trying 10.100.11.37...  Connected to scwx-collector.xxx.local.  Escape character is '^]'.    # telnet aws-v-xxxxxx-xxxxxx-xxxxxxxxxxxxx.elb.us-east-1.amazonaws.com 601  Trying 10.200.2.89...  Connected to aws-v-xxxxxx-xxxxxx-xxxxxxxxxxxxx.elb.us-east-1.amazonaws.com.  Escape character is '^]'.  

The AWS instance is working fine. Syslog messages are delivered to the collector and to /var/log/messages. The on-premise server fails to deliver messages to both locations.

On the on-premise server, if I rename xdr.conf to xdr.conf.bak and restart the rsyslog service, /var/log/messages immediately starts populating. With xdr.conf enabled they are empty - no further entries show up. The external syslog collector is not showing any received events and tcpdump does not show any packets transmitted between the syslog endpoint.

Why is rsyslog not sending messages to /var/log/messages nor the external collector? The only difference is the endpoint it's sending messages to, which are both reachable and functioning normally from what I can tell. Even the syslog collector endpoints are the same configuration. Both operating systems are the same, and rsyslog is the same version. How can I troubleshoot this further?

How to stop LibreOffice Draw from crashing in Debian Bullseye?

Posted: 13 Jul 2022 02:23 PM PDT

After I switching from Debian 10 to 11, LibreOffice Draw 7.0 can no longer open.

I tried opening an existing file and starting a new file, no matter how I open Draw, it crashes with this message:

"Due to an error, LibreOffice crashed. All the files you were working on will now be saved. Next time the LibreOffice is launched, your files will be recovered automatically."

If I open an existing file, or try to create a new one, it crashes, then immediately tries to pull up a document recovery for the blank file, then crashes again, no matter which open I choose.

"Please ensure that a JVM and the package libreoffice-java-common  is installed.  If it is already installed then try removing ~/.config/libreoffice/4/user/config/javasettings_Linux_*.xml  Warning: failed to read path from javaldx    (soffice:4787): dbind-WARNING **: 14:29:52.992: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files"  
  • The errors above appear on another Debian computer where Draw does work, so I think these have nothing to do with the error.

I tried several things:

  • Tried purging the entire LibreOffice install, and reinstalling.
  • Tried deleting the .config files related to LibreOffice.
  • Tried running in command line, but there are no messages shown related to its crashing.
  • Tried running in Safe Mode, no change.
  • Installed "libreoffice-gtk3" (some said it crashes without this installed).
  • LibreOffice Write and Calc work fine.

How can I fix LibreOffice Draw from crashing?

Update:

journalctl reports this every time I try to open Draw, but not when opening a tool that does work, like Write:

Jul 08 15:35:20 debian audit[2833]: AVC apparmor="ALLOWED" operation="open" profile="libreoffice-soffice" name="/home/village/Projects/Textbooks/Popups/Core/2022-07-05_glossary.data" pid=2833 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000  Jul 08 15:35:20 debian kernel: audit: type=1400 audit(1657316120.083:15): apparmor="ALLOWED" operation="open"  

Update: I found if I run libreoffce --norestore to disable crash handling, it prints this error:

Fatal exception: Signal 6  

Stack: /usr/lib/libreoffice/program/libuno_sal.so.3(+0x3dc53)[0x7f3a8d719c53] /usr/lib/libreoffice/program/libuno_sal.so.3(+0x3ddc2)[0x7f3a8d719dc2] /lib/x86_64-linux-gnu/libc.so.6(+0x3bd60)[0x7f3a8d547d60] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x141)[0x7f3a8d547ce1] /lib/x86_64-linux-gnu/libc.so.6(abort+0x123)[0x7f3a8d531537] /usr/lib/libreoffice/program/libmergedlo.so(+0x1188b91)[0x7f3a8e8cab91] /usr/lib/libreoffice/program/libmergedlo.so(+0x2255cf0)[0x7f3a8f997cf0] /usr/lib/libreoffice/program/libmergedlo.so(+0x32fcfb9)[0x7f3a90a3efb9] /usr/lib/libreoffice/program/libuno_sal.so.3(+0x17412)[0x7f3a8d6f3412] /usr/lib/libreoffice/program/libuno_sal.so.3(+0x3dd2f)[0x7f3a8d719d2f] /lib/x86_64-linux-gnu/libc.so.6(+0x3bd60)[0x7f3a8d547d60]

How to know the V4L2 camera's exposure time in ms?

Posted: 13 Jul 2022 01:21 PM PDT

with v4l2-ctl, one can know camera-parameters with following:

$ v4l2-ctl -d2 --list-ctrls                   brightness 0x00980900 (int)    : min=0 max=255 step=1 default=128 value=128                     contrast 0x00980901 (int)    : min=0 max=31 step=1 default=16 value=16                        gamma 0x00980910 (int)    : min=0 max=127 step=1 default=64 value=64                         gain 0x00980913 (int)    : min=1 max=33 step=1 default=0 value=33         power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=2 value=2 (60 Hz)                    sharpness 0x0098091b (int)    : min=0 max=15 step=1 default=1 value=1                exposure_auto 0x009a0901 (menu)   : min=0 max=3 default=3 value=1 (Manual Mode)            exposure_absolute 0x009a0902 (int)    : min=1 max=1856 step=1 default=2500 value=2500  

I understand last one exposure_absolute is the exposure, but I'm not sure whether this is always in ms. Or some other unit (perhaps specific for each cam) that has to be converted to ms?

How do I replace leading tabs with 4 spaces with sed?

Posted: 13 Jul 2022 01:34 PM PDT

In vim it seems possible to do like this :

:s/^\t\+/\=repeat('    ',len(submatch(0)))  

I didn't find out how this translates into sed. I tried the following :

sed -ri "s/^\t\+/\=repeat('    ',len(submatch(0)))/g" test.txt  

The command seems to have no effect.

redirecting output to 'wget-log.1'

Posted: 13 Jul 2022 10:58 AM PDT

I am trying to download the Linux version of Gdrive from GitHub using this command

wget https://docs.google.com/uc?id=0B3X9GlR6EmbnWksyTEtCM0VfaFE&export=download

It's getting stuck with this output.

[1] 869 pi@raspberrypi:~ $ Redirecting output to 'wget-log.2'

Getting values from comma seperated file

Posted: 13 Jul 2022 01:21 PM PDT

I have a file structured like this:

[IP ADRESS], [ID-Number], [Name]  [IP ADRESS], [ID-Number], [Name]  [IP ADRESS], [ID-Number], [Name]  ...  

(The actual values are not in brackets)

How do I get (print) a specific value (either IP-Adress, ID or Name) while looping through the lines (preferably with 'sed' since I already started looking into that)?

My objective is to send an SSH command to each server by grabbing the IP Address with a script, and then having the ID Number and Name for another program which displays the output of each command in combination with the name (I'm trying to build a monitoring service for our servers). So I need to be able to only grab one or two of those values.

How to completely disable light-locker and replace it with GDM lockscreen

Posted: 13 Jul 2022 02:01 PM PDT

I am using cinnamon and I really like it but the only problem I have is I do not want light-locker every time I do ctrl + alt + l I want the gdm lockscreen to show when I press those keys. I tried to disable the lightlocker systemctl but it doesn't have one. How do I get rid of it? I did install gdm just want to make it replace lightdm completely.

gdm greeter configuration: Exclude all *except* for one specific user

Posted: 13 Jul 2022 11:06 AM PDT

I have Googled this one and tried so many combinations, with no success.

I need the GDM login greeter to display one and only one username. In effect, what I need is something like this in /etc/gdm/custom.conf:

[greeter]  ExcludeAll=true  Include=guest  

This does not work, however, because ExcludeAll is not a valid option. IncludeAll=false does nothing either. I've tried every combination that I can think of.

Despite being discouraged, I modified /etc/gdm/gdm.schemas, trying a variety of combinations similar to the above. No go.

I am aware of:

gconftool-2 --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --direct --type bool --set /apps/gdm/simple-greeter/disable_user_list true  

but this is not an applicable solution, as it removes the user list completely. I need one specific username to appear.

The only practical solution I can find is to, upon user login, run a script which will append that username to the "Exclude" list in /etc/gdm/custom.conf. This is hacky, and not preferable.

This is for a public-use machine. People can log in with their LDAP accounts if they have them, or they can select "Guest" from the login screen. The people who log in with their LDAP accounts should NOT have their names visible on the login screen, but the "Guest" option must remain.

Using gnome 2.28.

How to make log-rotate change take effect

Posted: 13 Jul 2022 11:41 AM PDT

I followed this link to change log-rotate configuration for RHEL 6

After I made the change to config file, what should I do to let this take effect?

WBC_ERR_DOMAIN_NOT_FOUND only for a specific account

Posted: 13 Jul 2022 10:00 AM PDT

Platform: RHEL 5.10

Version: Samba 3.6.6-0.136

Only on a single VM, one of my co-workers is able to log into the VM using his AD credentials without issue, whereas my account appears to have trouble locating user information:

[root@ncxxxlwb05 ~]# wbinfo -i myDom.mjplakus  XXX.mjplakus:*:16777224:16777229::/home/XXX/mjplakus:/bin/bash  [root@ncxxxlwb05 ~]# wbinfo -i myDom.jadavis6  failed to call wbcGetpwnam: WBC_ERR_DOMAIN_NOT_FOUND  Could not get info for user xxx.jadavis6  

Thinking that winbind could have just cached a negative return (for instance AD wasn't available when it had to refresh its cache entry for my user account) I set both winbind cache time and idmap negative cache time to be 1 second but I got the same results. Same results with above cache values and doing net cache flush several times.

I didn't find anything in /var/log/samba/* under normal debug levels so I set debug level = 8 and this started being printed in the logs when I tried to resolve my name:

[2013/12/05 14:21:59.795061,  3] winbindd/winbindd_getpwnam.c:56(winbindd_getpwnam_send)    getpwnam myDom.jadavis6  [2013/12/05 14:21:59.795161,  1] ../librpc/ndr/ndr.c:414(ndr_pull_error)    ndr_pull_error(13): value out of range  [2013/12/05 14:21:59.795219,  5] winbindd/winbindd_getpwnam.c:137(winbindd_getpwnam_recv)    Could not convert sid S-1-5-21-652622394-3291385539-1351089441-10771: NT_STATUS_INVALID_PARAMETER  [2013/12/05 14:21:59.795391,  6] winbindd/winbindd.c:869(winbind_client_request_read)    closing socket 29, client exited  

Which seems like it contains the actual problem but I don't know how to read the error and would like some guidance on this. It seems like it doesn't like the SID associated with my AD account for some reason, but I don't know why or how to work around it.

I'm present in the active directory domain referenced, but for some reason it's unable to pull only my account's information.

How to change desktop environment in Raspbian?

Posted: 13 Jul 2022 12:09 PM PDT

I'm running Raspbian "wheezy", a Debian based Linux distribution for the Raspberry Pi and I would like to know where I can change the desktop environment that boots with the OS. In particular, how can I replace LXDE with a custom QT or Java program?

No comments:

Post a Comment