ldapscripts 2.0.1 awk errors in runtime.debian

Bug #1225440 reported by Ilya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ldapscripts (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I had ldap setup and ldapscripts working in 10.04LTS. After upgrading to 12.04LTS, ldapscripts (all commands) bork out with these errors:

sudo ldapaddgroup testgroup
awk: cmd. line:1: /^[ \t]*host/ sub(/^[ \t]*host[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*host/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*host/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*host/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*host/ ""); print $0
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*uri/ sub(/^[ \t]*uri[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*uri/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*uri/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*uri/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*uri/ ""); print $0
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*rootbinddn/ sub(/^[ \t]*rootbinddn[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*rootbinddn/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*rootbinddn/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*rootbinddn/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*rootbinddn/ ""); print $0
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*base/ sub(/^[ \t]*base[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*base/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*base/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*base/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*base/ ""); print $0
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*nss_base_group/ sub(/^[ \t]*nss_base_group[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_base_group/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*nss_base_group/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_base_group/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*nss_base_group/ ""); print $0
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*nss_base_passwd/ sub(/^[ \t]*nss_base_passwd[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_base_passwd/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*nss_base_passwd/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_base_passwd/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*nss_base_passwd/ ""); print $0
awk: ^ syntax error
awk: cmd. line:1: /^[ \t]*nss_base_hosts/ sub(/^[ \t]*nss_base_hosts[ \t]*/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_base_hosts/ ""); sub(/[ \t]*(#.*)?$/
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: cmd. line:1: /^[ \t]*nss_base_hosts/ ""); sub(/[ \t]*(#.*)?$/
awk: cmd. line:1: ^ unexpected newline or end of string
awk: /^[ \t]*nss_base_hosts/ ""); print $0
awk: ^ syntax error
awk: each rule must have a pattern or an action part
awk: /^[ \t]*nss_base_hosts/ ""); print $0
awk: ^ syntax error
Error adding group testgroup to LDAP

After that I purged ldapscripts, reinstalled/reconfigured from scratch, checked and rechecked everything, but awk errors remain and ldapscripts don't work.

I also removed gawk package (falled back to mawk package), and errors changed verbosity but did not clear up.

Tags: ldapscripts
Revision history for this message
Ilya (iva2k) wrote :

I found a fix - edit file /usr/share/ldapscripts/runtime.debian
find line:
 local value="$(awk "/^[ \t]*$field/ {sub(/^[ \t]*$field[ \t]*/,\"\"); sub(/[ \t]*(#.*)?\$/, \"\"); print \$0}" "$conffile")"

and replace with:
 local value=$(awk "/^[ \t]*$field/ {sub(/^[ \t]*$field[ \t]*/,\"\"); sub(/[ \t]*(#.*)?\$/, \"\"); print \$0}" "$conffile")

(remove quotes around "$(...)")

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ldapscripts - 2.0.5-1ubuntu1

---------------
ldapscripts (2.0.5-1ubuntu1) trusty; urgency=low

  * Merge from Debian unstable. Remaining changes:
    - debian/runtime.debian: replaced /etc/libnss-ldap.conf references by
      /etc/ldap.conf, many thanks Ahmed El-Mahmoudy.

ldapscripts (2.0.5-1) unstable; urgency=low

  * Imported Upstream version 2.0.5
  * Removed 06_builtin_locale.patch: fixed upstream.
  * debian/control: Update description. (Closes: #686140)
  * 02_debian_config.patch refreshed.
  * New patch 06_fix_logname.patch fixes logname invocation issues.
    (Closes: #719295)
  * debian/runtime.debian: Fix awk invocation. Should fix (LP: #1225440).
  * New patch 07_fix_log_perm.patch fixes permissions of log file.
  * New patch 08_fix_log_entry.patch fixes log entry when runtime is sourced
    from file with whitespaces.
  * debian/control: Bump Standard's version: no changes needed.
 -- Bhavani Shankar <email address hidden> Sun, 24 Nov 2013 20:48:27 +0530

Changed in ldapscripts (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.