Thanks Adam. We have no such entry in our sudoers file.
Original Message:
Sent: 03-28-2023 08:59
From: Adam Hawk
Subject: Using sudo in jBase programs
Warren,
You may want to check to see if there was a previous entry in the sudoers file.
You view/edit this using 'visudo'
Look for an entry that may need to be updated from jbase4 to jbase5
Something like
''%jbase4 ALL=NOPASSWD:/opt/jbase4/4.2/bin/SP-CLEAR.sh'
that needs to be updated to something like
'%jbase5 ALL=NOPASSWD:/opt/jbase5/5.2/bin/SP-CLEAR.sh'
Adam
------------------------------
Adam Hawk
Rocket Forum Shared Account
Original Message:
Sent: 03-27-2023 13:46
From: Warren Moriarity
Subject: Using sudo in jBase programs
Oops! Thanks for pointing that out. However, correcting the mistake in the file did not solve the problem. When I type:
sudo j4 SP-CLEAR EPSON710
on the command line I do not get an error message, but the form queue is not cleared of print jobs.
We run a program automatically every dayend to clear all the print jobs from most of our form queues.
Generally EXECUTE "SP=CLEAR form-queue" works fine in the program. But occasionally there will be a print job that did not have a "U" option when the "SP-ASSIGN" was set for that print job. When this happens the program asks for the password of the user that created the print job and someone needs to manually intervene to input the password and get our automatic dayend processes running again.
We used to incorporate sudo into the SP-CLEAR command in the program in order to delete occasional protected print jobs, but this is no longer working.
------------------------------
Warren Moriarity
IT Manager
Rocket Forum Shared Account
Original Message:
Sent: 03-27-2023 12:49
From: Mike Street
Subject: Using sudo in jBase programs
Warren,
Your new script would work better if you changed "JBCGLOBALDIR=JBCGLOBALDIR=/opt/jbase5/5.2" to "JBCGLOBALDIR=/opt/jbase5/5.2".
Otherwise, it should work on jBASE 5.2
I should also point out that the script should not be necessary if you are using EXECUTE, as your jBASE session should already be aware of its environment. It should only be necessary from a command prompt.
------------------------------
Mike Street
Technical Support Engineer
Rocket Internal - All Brands
Original Message:
Sent: 03-24-2023 16:10
From: Warren Moriarity
Subject: Using sudo in jBase programs
Hi Mike,
It's not part of jbase - it's just a text file containing environment variables that technical support at jBase came up with for us some years ago - it looked something like this:
JBCRELEASEDIR=/opt/jbase4/4.1 ; JBCGLOBALDIR=/opt/jbase4/4.1
export JBCRELEASEDIR JBCGLOBALDIR
LD_LIBRARY_PATH=$JBCRELEASEDIR/lib:/usr/ccs/lib:/usr/lib
LIBPATH=$JBCRELEASEDIR/lib:/usr/ccs/lib:/usr/lib
SHLIB_PATH=$JBCRELEASEDIR/lib:${SHLIB_PATH:-/usr/lib:/lib}
export LD_LIBRARY_PATH LIBPATH SHLIB_PATH
PATH=/opt/jbase4/4.1/bin
export PATH
I modified it for our current jBase, but it is not working:
JBCRELEASEDIR=/opt/jbase5/5.2 ; JBCGLOBALDIR=JBCGLOBALDIR=/opt/jbase5/5.2
export JBCRELEASEDIR JBCGLOBALDIR
LD_LIBRARY_PATH=$JBCRELEASEDIR/lib:${LD_LIBRARY_PATH}:/usr/lib
LIBPATH=$JBCRELEASEDIR/lib:${LIBPATH}:/usr/lib
SHLIB_PATH=$JBCRELEASEDIR/lib:${SHLIB_PATH}:/usr/lib:/lib
export LD_LIBRARY_PATH LIBPATH SHLIB_PATH
PATH=$JBCRELEASEDIR/bin
export PATH
------------------------------
Warren Moriarity
IT Manager
Rocket Forum Shared Account
Original Message:
Sent: 03-24-2023 15:27
From: Mike Street
Subject: Using sudo in jBase programs
Warren,
I am not aware of any j4 file in jBASE 4.x, so, it may have been something specific to your installation, in which case we would need to see an example before being able to provide feedback.
Mike
------------------------------
Mike Street
Technical Support Engineer
Rocket Internal - All Brands
Original Message:
Sent: 03-24-2023 13:55
From: Warren Moriarity
Subject: Using sudo in jBase programs
We are running jBase 5.2 on linux. Back when we were running 4.2 we used to use sudo to run jBase commands. For example we might have this line in a program:
EXECUTE "sudo j4 SP-CLEAR BLUE-FQ"
This would clear out all the print jobs from the BLUE-FQ form queue even if a print job was protected.
The j4 file just set up some jBase environment variables so sudo would work.
My question is - will this still work? If so, what environment variables are needed in the j4 file and where should the j4 file be placed?
Thanks for any help.
------------------------------
Warren Moriarity
IT Manager
Rocket Forum Shared Account
------------------------------