Category: Uncategorized
-
Regenerate grub2
Note to self; if I have changed /etc/sysconfig/grub, then run grub2-mkconfig -o /boot/grub2/grub.cfg For uefi: grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
-
No memory reserved for crash kernel
“No memory reserved for crash kernel” on RH7 Increase RAM to 2GB+. Also make sure crashkernel=auto is set in your cmdline.
-
FIX error: ‘unixd_config’ undeclared when building apache module
src/xradius_cache.c: In function ‘xrad_cache_dbm_post_config’: src/xradius_cache.c:146:22: error: ‘unixd_config’ undeclared (first use in this function) chown(path1, unixd_config.user_id, -1); ^ src/xradius_cache.c:146:22: note: each undeclared identifier is reported only once for each function it appears in src/xradius_cache.c: In function ‘xrad_cache_dbm_check’: src/xradius_cache.c:200:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘apr_size_t’ [-Wformat=] dbmval.dsize); Solution is…
-
FIX misc.py:732:_decompress_chunked:MiscError: xz compression not available
(happened in reposync) Either install pyliblzma via yum or do it yourself: easy_install pip pip install –upgrade pip pip install pyliblzma If the latest install does not work, install gcc and python-devel (and maybe @Development tools).
-
RHEL not respecting oddjob mkhomedir umask from login defs
Solution: delete the -u definitions from /etc/oddjobd.conf.d/oddjobd-mkhomedir.conf and oddjobd will use the umask from /etc/login.defs . I feel this should be default.
-
Make FreeRADIUS talk to FreeIPA / RHEL IDM
This was a challenge. So it turns out FreeIPA talks ldap out of the box. I wanted to authenticate against FreeIPA using FreeRADIUS. I am thankful to Arran Cudbard-Bell which helped me figure out some of these things in the (very active) FreeRADIUS mailing list. This will not be a nice step by step post,…
-
NTPq -p output signs before hosts
β β β No state indicated for: non-communicating remote machines, βLOCALβ for this local host, (unutilised) high stratum servers, remote machines that are themselves using this host as their synchronisation reference; βxβ β Out of tolerance, do not use (discarded by intersection algorithm); β-β β Out of tolerance, do not use (discarded by the cluster…
-
Fix RedHat IDM server problems
I was seeing this: “/var/run/slapd-*socket”}, 110) = -1 ENOENT” Unable to get connection, skipping disabling agreements: Unable to bind to LDAP server: [Errno 2] No such file or directory “Server error – while fetching master key K/M for realm After debugging, stracing, traffic dumping and generating a selinux module, the module indicated: #============= dirsrv_t ==============…
-
Rsyslog syntax error on token ‘regex’ / ‘ereregex’
Use re_match. http://www.rsyslog.com/doc/master/rainerscript/functions.html?highlight=re_match if ( $fromhost-ip startswith ‘10.0.0’ and re_match($hostname,’.*-fw[0-9]’) ) then action(type=”omfile” file=”/tmp/test.log”)
-
Postgres install on RHEL7
Install postgresql-server, do postgresql-setup initdb, change listen address in /var/lib/pgsql/data/postgresql.conf, change ident methods in /var/lib/pgsql/data/pg_hba.conf, systemctl start postgresql, ^start^enable. CREATE USER unam PASSWORD ‘123’; CREATE SCHEMA unamschema AUTHORIZATION unam; CREATE DATABASE unamdb OWNER=unam;
-
Grep color matched lines but show all
tail -f /var/log/messages | grep -E –line-buffered –color ‘.*kernel.*|$’ This will show all lines from the tail, with lines having ‘kernel’ in them colored.
-
View swap rates Linux/vm
Use vmstat . Also try vmstat -f to see # of forks (interesting). Use -w to make the output more wide.
-
Samsung-Linux HDMI fix overscan (missing 5% borders)
This is very annoying, and undocumented. Basically, you do not have to change anything on the linux side. It is just the TV that needs to know you are connecting a laptop/pc. To do this on samsung: Connect your laptop/pc to the HDMI port labeled DVI. For me, that is HDMI 4 Go to the…
-
[Fix] Disable RHEL7 tmux auto pane renaming in tmux
In .tmux.conf: set -g automatic-rename off set -g allow-rename off
-
Split files to loop devices
FILE=file_name; CHUNK=$((64*1024*1024)); SIZE=$(stat -c “%s” $FILE); for ((i=0; i < $SIZE; i+=$CHUNK)); do losetup --find --show --offset=$i --sizelimit=$CHUNK $FILE; done via http://www.commandlinefu.com/commands/view/13735/split-a-large-file-without-wasting-disk-space
-
Kobo on Linux, skip installation
Activate: Find the hidden .kobo dir after attaching the kobo to your pc/laptop Install sqlite3 sqlite3 KoboReader.sqlite INSERT INTO “user” VALUES(‘aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa’,’aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa’,’xxxx@xxxx.xx’,’xxxx@xxxx.xx’,’2aaaa aaaaaaaaaaaaa==’,NULL,NULL); sqlite> .exit Add dictionaries: http://www.mobileread.com/forums/showthread.php?t=196931
-
Changing default browser in Fedora
Open gnome-control-center, go to system, details, default applications
-
Systemctl for nfs: Failed to issue method call: No such file or directory
systemctl enable nfs Failed to issue method call: No such file or directory Solution: use nfs-server .
-
Generate crypted salted password (for kickstart / shadow file)
python -c ‘import crypt; print(crypt.crypt(“Karlo”, “$6$SaltHere”))’ If your output ends with a dot, copy that as well.
-
Fix Timeout in locking authority file */.Xauthority
When logging in (via SSH) to one of my systems, it said: timeout in locking authority file */.Xauthority When this happens: Make sure the users’ home dir is readable + writeable by the user Make sure the SELinux context is set correctly; this is usually a problem when the users’ home dir is mounted on…
-
Sestatus selinux config not read on RHEL/CentOS
If you want to change the selinux config, be aware that there are two files: /etc/selinux/config /etc/sysconfig/selinux The second one should be a symlink to the first one but I found out that this is not always the case.