WDProxKey Token Tool doesn't work in Jammy
$ cat /etc/os-release
lsb_release -a
hostnamectl
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_
ID=ubuntu
ID_LIKE=debian
HOME_URL="https:/
SUPPORT_URL="https:/
BUG_REPORT_URL="https:/
PRIVACY_
UBUNTU_
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
I was using NICDSign package with terminal. When double clicking on 'install.sh' it always opens with "Open with Text Editor". There is no Terminal in 'Open with Other Application'. 'Allow executing file as programme' is ticked as default. 'Run as a program' is working. Terminal Version 3.44.0 for GNOME 42 doen't give any information or Gtk:message about the file and it directly asks sudo password without any command. So installation doesn't work properly.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- MadhuSoodanan
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Last lines:
jre-x64/
jre-x64/
Installing JRE Completed..
Installing NICDSign as Startup Service..
Running NICDSign.....
(Reading database ... 263273 files and directories currently installed.)
Preparing to unpack .../nicdsign-
Unpacking nicdsign-cert (1.9.3) over (1.9.3) ...
Setting up nicdsign-cert (1.9.3) ...
.......
No other line appeared in the Terminal. But appeared a pop up window to press 'ok' and 'NICDSign verion' window appeared at the right top when waited a few seconds.
In 18.04 this worked properly. So there is no problem with the package downloaded.
'NICDSign verion' window appears at the right top corner when reinstalled USB in 22.04.
Revision history for this message
|
#2 |
Somebody has posted similar issues in askubuntu.com https:/
Revision history for this message
|
#3 |
while doing with similar package from another site, the following lines also appeared before stopping the process:
chown: cannot access '/home/
dpkg: error processing package nicdsign (--install):
installed nicdsign package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
nicdsign
Revision history for this message
|
#4 |
nicdsign seems to be a program from a foreign source outside Ubuntu.
I suggest that you try getting help at the address where you got it.
And generally, for security reason doing a double-click on a shell script in the file explorer window does not execute it, but opens it in the editor. If you want to run that script, you have to give it execute permissions and use the right mouse click and select "run it". the probably even better possibility is opening a terminal window and then starting the script with a command like
sh ./name_
Revision history for this message
|
#5 |
This is difficult for me. So I shall wait until the provider suggests any solution if there is no error in GNOME Terminal. It worked in 18.04. So I doubt the package installation process in Jammy. I had tried using nicdsign without install.sh. from another source. But that also didn't work.
Revision history for this message
|
#6 |
This is the content in install.sh
I want only the proxkey
#!/bin/bash
dskeys=(TRUSTKEY PROXKEY ePass)
token=$(zenity --entry --title "Digital Signature" --entry-text "${dskeys[@]}" --text "Choose your Token")
if [ $(dpkg-query -W -f='${Status}' nicdsign 2>/dev/null | grep -c "ok installed") -eq 1 ]; then
sudo apt-get purge --force-yes -y nicdsign
sudo rm -rf $HOME/.
sudo rm -rf $HOME/Desktop/
sudo rm -rf /opt/nic/
fi
if [ $token = "TRUSTKEY" ]; then
sudo dpkg -i files/wdtokento
sudo dpkg -i files/NICDSign1
sudo dpkg -i files/nicdsign-
mkdir -p $HOME/Documents
cp -r /usr/local/
mkdir -p $HOME/.
if [ ! -f $HOME/.
if [ -f /opt/nic/
cp /opt/nic/
fi
fi
(zenity --title "Digital Signature" --info --text "Remove the token and restart Computer")
elif [ $token = "PROXKEY" ]; then
sudo dpkg -i files/wdtokento
sudo dpkg -i files/NICDSign1
sudo dpkg -i files/nicdsign-
mkdir -p $HOME/Documents
cp -r /usr/local/
mkdir -p $HOME/.
if [ ! -f $HOME/.
if [ -f /opt/nic/
cp /opt/nic/
fi
fi
(zenity --title "Digital Signature" --info --text "Remove the token and restart Computer")
elif [ $token = "ePass" ]; then
if [ $(uname -m) = 'x86_64' ]; then
sudo dpkg -i files/epass-
sudo dpkg -i files/NICDSign1
sudo dpkg -i files/nicdsign-
sudo /usr/lib/
cp -r /usr/lib/
mv $HOME/config-new $HOME/ePass-
else
sudo dpkg -i files/epass-
sudo dpkg -i files/NICDSign1
sudo dpkg -i files/nicdsign-
sudo /usr/lib/
cp -r /usr/lib/
mv $HOME/config-new $HOME/ePass-
fi
mkdir -p $HOME/Documents
cp -r /usr/local/
mkdir -p $HOME/.
if [ ! -f $HOME/.
if [ -f /opt/nic/
cp /opt/nic/
fi
fi
(zenity --title "Digital Signature" --info --text "Remove the token and restart Computer")
else
(zenity --title "Digital Signature" --error --text "No valid token selected")
fi
Revision history for this message
|
#7 |
I do not understand:
Which kind of information do you expect in the terminal?
The output in comment #1 does not show an error. What else do you need?
Revision history for this message
|
#8 |
#6 was not about the command. It was about the content in install.sh
If there is any slight error in that file that might be the reason for the defect in the installation. I don't know the command for running .sh file
I don't know whether sh./install is the command you intended. Name of the script and the filename, are they the same?
Revision history for this message
|
#9 |
I already wrote it in comment #4:
If you want to execute a shell scrip, the best way is doing this from a terminal window.
Open a terminal window (e.g. by simultaneously pressing ctrl-alt-t)
Change to the directory where the shell script is located (if it is not in your home directory), e.g.
cd Downloads
and the execute the script
sh ./install.sh
(Note the space character in third position).
I would have expected that there is some kind of "How to install" instruction at the source where you got that file, that tells you what exactly has to be done. What I wrote above is just a guess that works in many similar cases, but not all of them.
And yes, "filename", "name of the file" and "name of the shell script", these words describe the same, in your case "install.sh"
Revision history for this message
|
#10 |
USB token Authentication 01
User PIN Status
User PIN Modified
Internal CSP Name
USB token file structure integrity
All these 5 shows ......... Failed to retrieve configuration.
Revision history for this message
|
#11 |
Before you posted #10 I tried using
./install.sh
sh install.sh
bash install.sh
2 of these commands gave the same result.
Revision history for this message
|
#12 |
sh ./install.sh
./install.sh: 2: Syntax error: "(" unexpected
Revision history for this message
|
#13 |
I have no idea what this program should do, and so I do not know what to do with that error.
You have to ask the provider of that piece of software, and that is not Ubuntu.
Revision history for this message
|
#14 |
About #11
I meant , in the case of
./install.sh and
bash install.sh
Terminal worked; but didn't get a good end result. Both of the asked for selecting token and at last asked to remove the USB and restart. But not as given in the manual. May be because of the version. The installation is almost over. It is running. But the problem is that it couldn't identify me in the token even after the installation. I mean my name is not in the token (as in the earlier version) even after I plugged the USB. Sorry, If I confused you. When I used the 18.04 all the other data was almost the same. The differences are mentioned in #10. Don't know whether it is because of the difference in the token tool package or in the certificate storing path or something else.
Another problem that may occur is with the Java Version. Java 8 is the required one.
The certificate and software was for providing Government services. It is free.
java ~version
Error: Could not find or load main class ~version
Caused by: java.lang.
But even when it gave 'a result' it didn't work properly.
Revision history for this message
|
#16 |
The correct command for verifying java is not
java ~version
(with a tilde) but
java -version
(with a minus).
You cannot expect that anybody helping here has got experience with that local government application.
I assume that you know https:/
On the page https:/
Revision history for this message
|
#17 |
Yes, of course. It was a typo. I had done it previously correctly and got the correct output. Now I could found it.
openjdk version "11.0.17" 2022-10-18
OpenJDK Runtime Environment (build 11.0.17+
OpenJDK 64-Bit Server VM (build 11.0.17+
In 18,04 it it was openjdk version 1.8.0-191. I think that system is working with this version ( openjdk version 1.8.0-191)
If so do I need to change the default version to this? I don't know how to make it default without removing 11.0.17.
I had read it before installing.
That means I can't use it if it is 11.0.17 ?
I didn't try using the package in the second link. I think that one also will be the same.
Revision history for this message
|
#18 |
I could find the packages in jvm folder
/usr/lib/
/usr/lib/
I don't know whether I should make this one default or working.
Revision history for this message
|
#19 |
If so,
If I did ... sudo update-alternatives --config java ... will it work with the higher version also?
Do I need to make any other changes?
Revision history for this message
|
#20 |
sudo update-alternatives --config java
*0 /usr/lib/
1 /usr/lib/
2 /usr/lib/
Press <enter> to keep the current choice[*], or type selection number:
Now the asterisk is against '0'
If I entered 2, will it use the higher option also?
Revision history for this message
|
#21 |
I tried using Java 8 after got the output
java -version
openjdk version "1.8.0_352"
OpenJDK Runtime Environment (build 1.8.0_352-
OpenJDK 64-Bit Server VM (build 25.352-b08, mixed mode)
And after that I followed as given in a trouble shoot tutorial.
https:/
Another thing is, after changed the java version to Java 8 DiagnosticTool didn't work.
Revision history for this message
|
#22 |
When I tried the last section in the link I got the output
sudo mkdir /home/user/
[sudo] password for
mkdir: cannot create directory ‘/home/
Up to this, I tried to solve the problem at my own risk ......If I can, I wish to proceed if I get some help.
Revision history for this message
|
#23 |
Who tells you to execute the command "sudo mkdir /home/user/
That's nonsense and valid only when your username is "user".
In your case, when you username is "madhu" (at least that is what I suppose), the command must be
sudo mkdir /home/madhu/
I suggest that you contact the author of that instruction to tell him about that error.
Revision history for this message
|
#24 |
It says in the last section of the tutorial in https:/
Thanks a lot. I shall try. I also didn't notice the difference. I didn't doubt since it is seen in two places in that document. So I just pasted it in the terminal...and got into trouble.
Revision history for this message
|
#25 |
Since the issue is 98% same as mentioned in the tutorial I am still following that tutorial as per your instructions. I am trying to shorten this thread. That is why I am doing before you post your instructions. I got even the window at the right top corner that shows it is running (when plugged in the token). But..... :(
(When followed the tutorial ) Since the pasted icon disappears after reboot, I created even an empty icon using touch command. An empty directory appeared on the desktop.
Output
touch NICDSign.desktop
~/Desktop$ sudo mkdir /home/madhu/
[sudo] password for madhu:
mkdir: cannot create directory ‘/home/
~/Desktop$
Revision history for this message
|
#26 |
I tried this also:
Copied the content in NICDSign.desktop with a lock sign in 18.04 (which is working perfectly) and pasted it on my Jammy desktop.
the content in it was ........
[Desktop Entry]
Type=Application
Exec=sh /opt/nic/
Hidden=false
NoDisplay=false
Icon=/opt/
Name[en_
Name=NICDSign
Comment[
Comment=NICDSign Manual Startup
Appeared the icon ..... rebooted ..... but still not working. The two applications ProxKey Digonostic Tool and ProxKey Token Tool is working since I went back to Java 11. (from my searching I realised *0 /usr/lib/
NSDSIgn.deskto Icon is still there without any response to my Token Tool :(
Revision history for this message
|
#27 |
The provider didn't give correct information about the changes. Their advice was to return to the older version-18.04. But I wish to stick on to Jammy.
Revision history for this message
|
#28 |
Manfred Hampl, thanks a lot for your help. You taught me some important things. At last I got it worked in Jammy. The problem was with the version.