Welcome to gattis.org!

 

adduser: The --group, --ingroup, and --gid options are mutually exclusive.

posted May 5, 2018, 11:27 AM by Allen Gattis

You may go to create a service account with a known UID and GID like so:

sudo adduser --system --no-create-home --disabled-login --uid 112 --group --gid 117 some-service

However, that command can't be done on one line.

adduser: The --group, --ingroup, and --gid options are mutually exclusive.

You might be tempted to just omit the group. However, that command attempts to create a group if that matches the user id, and you may find you have more groups than users.

adduser: The GID 112 is already in use.

So make it a two-liner

sudo addgroup --gid 117 some-service
sudo adduser --system --no-create-home --disabled-login --uid 112 --gid 117 some-service

Dynamic Address Static DNS Order

posted Apr 7, 2017, 10:38 AM by Allen Gattis

By default, you can add name servers to your /etc/networking/interfaces file, but you'll still get the DHCP supplied ones first. To change that, you must supercede that in the /etc/resolv.conf options.

http://unix.stackexchange.com/questions/136117/ignore-dns-from-dhcp-server-in-ubuntu

Unknown USB bridge

posted Feb 16, 2017, 10:01 AM by Allen Gattis   [ updated Mar 14, 2017, 5:12 AM ]

When checking a disk with smartmontools, you may get this 

allen@work:~$ sudo smartctl -a  /dev/sdc

/dev/sdc: Unknown USB bridge [0x0bc2:0xab28 (0x100)]
Please specify device type with the -d option.

Use smartctl -h to get a usage summary

Check the page below and add the -d option.
https://www.smartmontools.org/wiki/Supported_USB-Devices

allen@work:~$ sudo smartctl -d sat -a  /dev/sdc

=== START OF INFORMATION SECTION ===
Device Model:     ST4000LM016-1N2170
Serial Number:    W8009R7T
LU WWN Device Id: 5 000c50 08ba9a185
Firmware Version: 0002
...
...
...

If that fails, you may need to switch from the newer 'uac' usb driver back to the old one


HPDBA0235I The server lost the client's authentication

posted May 17, 2016, 1:17 PM by Allen Gattis

When configuring ISIM to talk to ISAM, you have to deploy and configure the Java Run Time. If you get the above exception when issuing the 

com.tivoli.pd.jcfg.SvrSslCfg it's likely because your local copy of PD.jar is out of date. 


The answer is to download the most recent pdjrte from the ISAM appliance and redeploy.


https://www-304.ibm.com/connections/blogs/havan/entry/debugging_an_isam_java_runtime_ssl_handhake_in_websphere?lang=en_us

NXLOG Couldn't read next event

posted May 16, 2016, 6:34 AM by Allen Gattis   [ updated May 16, 2016, 6:37 AM ]

If you see this error message from nxlog:

ERROR Couldn't read next event, corrupted eventlog?; The data is invalid.

Congrats - you've hit a bug.

https://nxlog.org/support-tickets/immsvistalog-maximum-event-log-count-support

The work-around is to limit your log event subscriptions on the input side by using a query.  Example:

<Input in>
  Module im_msvistalog
  Query <QueryList><Query Id="0" Path="Microsoft-Windows-PrintService/Operational"><Select Path="Microsoft-Windows-PrintService/Operational">*</Select></Query></QueryList>
  Exec if $EventID != 307 drop();
  Exec $type = "IDWorks";
</Input>


Kibana rounding to 16 significant digits

posted Apr 7, 2016, 10:00 AM by Allen Gattis   [ updated Apr 7, 2016, 10:01 AM ]

Turns out, if you have a value of type integer, that's just the limit. While elasticsearch shows you this:

curl http://localhost:9200/logstash-db-2016/isim-process/8163783564660983218?pretty
{
  "_index" : "logstash-db-2016",
  "_type" : "isim-process",
  "_id" : "8163783564660983218",
  "_version" : 1,
  "found" : true,
  "_source":{"requester_name":"8163783564660983218","request_num":8163783618037078861,"started":"2016-04-07 15:16:16:139 GMT","completed":"2016-04-07 15:16:16:282 GMT","subject_service":"Service","request_type":"EP","result_summary":"AA","requestee_name":"Mr. Requester","subject":"mrRequest","@version":"1","@timestamp":"2016-04-07T15:16:16.282Z"}
}

Kibana shows you this



View: Table / JSON / Raw
FieldActionValue



request_num  8163783618037079000




Looking at the JSON will give you the clue - it's being treated as an integer and not a string.


"_source": { "requester_name": "8163783564660983218", "request_num": 8163783618037079000, "started": "2016-04-07 15:16:16:139 GMT", "completed": "2016-04-07 15:16:16:282 GMT",


Mutate it to string in logstash to get your precision back.

https://github.com/elastic/kibana/issues/4356

Reset Chrome Magnet Link Handling

posted Feb 27, 2016, 10:42 AM by Allen Gattis   [ updated Feb 27, 2016, 10:43 AM ]

Picked the wrong thing when chrome first asked you, or chrome is just opening a new window on ubuntu? Have it ask you again by deleting the file that tells it what to do with external protocols 

rm  ~/.config/google-chrome/Local\ State

Ubuntu Rotate Login Screen Multiple Monitors

posted Nov 5, 2015, 11:11 AM by Allen Gattis

There's a thread from which I've tried all the methods. Only one worked with a multi-monitor setup

sudo cp  ~/.config/monitors.xml /var/lib/lightdm/.config

Booting with software raid

posted Nov 5, 2015, 10:12 AM by Allen Gattis

Since Ubuntu 12, 'fakeraid' employing dmraid on the boot disk has failed. Recent attempts to use admdm have also failed. However, if you're interested in the outcome more than file system, you can use btrfs for less configuration.
 

The encoder 'aac' is experimental

posted Sep 18, 2015, 7:33 AM by Allen Gattis

If you see this when encoding, it's because you didn't specify the Fraunhofer codec. Simply googling this error will tell you how to override it, but it turns out that doesn't lead to the best results. ffmpeg ships with several, but according to them you should use the Fraunhofer one for best results.

https://trac.ffmpeg.org/wiki/Encode/AAC

See Convert One Stream for an example

1-10 of 43

Comments