Technical article 118362

SCO Advanced File and Print Server (AFPS) setpasswd(AS) command fails.

OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6

Written · Last revised

Problem

The command setpasswd(AS) fails with the following error:

Error: Bad section: <lmxserver> or keyword: <locale> Bad section: <lmxserver> or keyword: <locale> while executing "exec $lmpath(SRVCONFIG_PATH) -g "lmxserver,locale"" invoked from within "set locale [exec $lmpath(SRVCONFIG_PATH) -g "lmxserver,locale"]..." invoked from within "if { $user_id == "root" } {

set old_pwd ""
set locale [exec $lmpath(SRVCONFIG_PATH) -g "lmxserver,locale"]
    if { $locale == "fr_FR.ISO8859-1" }  ..."
(file "/bin/setpasswd" line 63)

After resolving this issue the command may subsequently fail with the error:

Error: can't read "lmpath(PASSWD_PATH)": no such element in array can't read "lmpath(PASSWD_PATH)": no such element in array while executing "set env(TCL_LIBRARY) $lmpath(PASSWD_PATH)..." (file "/bin/setpasswd" line 143)

Cause

The /bin/setpasswd TCL script is looking for the locale keyword in /usr/net/servers/lanman/lanman.ini file which now uses "lang" instead of "locale".

There are also several TCL environment parameters required for this script which have not been set up.

Solution

First make a backup of the current /bin/setpasswd script, for
example to /bin/setpasswd.orig.  Then using your favorite editor
amend line 67 of the /bin/setpasswd script as follows
("locale" is replaced with "lang").
Before change:
set locale [exec $lmpath(SRVCONFIG_PATH) -g "lmxserver,locale"]
After change:
set locale [exec $lmpath(SRVCONFIG_PATH) -g "lmxserver,lang"]

In addition, the following lines should be appended to the end of the /opt/K/SCO/asusrv/4.0.2/cntl/lmpaths.tcl file to define all the required parameters for this script:

set lmpath(PASSWD_PATH) "/usr/net/servers/lanman/addon/passwd"
set lmpath(PASSWD_NAME) "passwd"
set lmpath(UPASSWD_PATH) "/usr/net/servers/lanman/addon/passwd/upasswd"
set lmpath(UPASSWD_NAME) "upasswd"
set lmpath(EXPECT_PATH) "/usr/net/servers/lanman/addon/passwd/expect"
set lmpath(EXPECT_NAME) "expect"
The setpasswd(AS) command should now run OK (there is no need to
reboot or restart the AFPS server).

See also

setpasswd(AS)

ta#100012, "How can I change a lost or expired password in AFPS 3.5.x or 4.0.2?"

ta#100049, "Users get an error that upwd failed when using setpasswd, but root works fine."

From the Xinuos technical article database, record 118362. Reproduced with permission. The original is at www.sco.com/ta/118362, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.