2 Replies Latest reply on Jul 5, 2013 4:29 AM by maxperts

    fmserver sudo failure

    Paul Richardson

      FileMaker Server Mac OS X 10.7.3

      Mac OS X 10.7.x

       

      I have a system script scheduled to run as the local user fms, which is also the user for the admin console. The user is vaildated. The script aborts with the following log entry:

       

      sudo: fmserver : 3 incorrect password attempts ; TTY=unknown ; PWD=/ ; USER=fms ; COMMAND=/Library/FileMaker Server/Data/Scripts/backuptofileserver.sh

       

      the script runs in the command line; its been running on a FileMaker 11 Server since forever.

       

      Any one have a suggestion for what is going on?

        • 1. Re: fmserver sudo failure
          Paul Richardson

          This is looking very much like a bug to me.

           

          If someone would care to try and replicate the problem, as I have already done on a second machine, I'd be grateful.

           

          Here's what I did:

           

          Mac OS X 10.7.4

          FileMaker Server 12

           

          FileMaker-Server-II:~ fms$ cd /Library/FileMaker\ Server/Data/Scripts/

          FileMaker-Server-II:Scripts fms$ cat test.sh

          #!/usr/bin/env bash

          logger "Script runs: $USER"

           

          FileMaker-Server-II:Scripts fms$ ls -la test.sh

          -rwxrwxr-x  1 fmserver  fmsadmin  51 May 12 11:48 test.sh

          FileMaker-Server-II:Scripts fms$ ./test.sh

          FileMaker-Server-II:Scripts fms$ cat /var/log/system.log | tail

          May 12 12:13:01 FileMaker-Server-II fms[9648]: Script runs: fms

           

          I set up two once-only schedules to run test.sh once as default user, the second as fms (which validates).

           

          The default user runs the schedule, fms aborts:

           

          sudo: fmserver : 3 incorrect password attempts ; TTY=unknown ; PWD=/ ; USER=fms ; COMMAND=/Library/FileMaker Server/Data/Scripts/test.sh

          • 2. Re: fmserver sudo failure
            maxperts

            Hi there,

             

            I am batteling with another issue and stumbled across your problem. I'm still missing information but this /Library/FileMaker Server/Data/Scripts/backuptofileserver.sh script is it executed by your crontab-shell or by filemaker server ?

             

            From what I have deduced is that it looks like fmserver is not provide with the right credentials to execute test.sh from a command.

            I can be totally off but crontab needs to be set in the right user crontab to execute it as that user and the same is true for executing sh-scripts from fmserver. The only difference is that fmserver allows you set the user (and passwd) to execute it with.

             

            The syntax for asking fmserver to do stuff from the commandline is:

            fmsadmin -u $1 -p $2 list clients

            in which $1 is the user and $2 is the password. List clients is the thing I needed from fmserver.

             

            It's a wide shot hope I sheds some light.

             

            With regards

             

            Arjen