How to use the electronic DNI or DNIe on a Mac

how to use dnie on mac Now three years ago I renewed my identity card. I had the old version, which I think I remember was a large document with a blue background and that the smallest one seemed somewhat «modern» to me, when I saw the chip of the new DNI I thought: «And what is this for?». Well, it is the chip of the DNIe and, as you all know, for example, by the "e" in "e-mail", the "e" usually means "electronic". But what is it for? How do you use the DNIe on Mac?

The DNIe is a document that serves to carry out some Internet procedures, for example. It is something like doing banking transactions online but, logically, with greater security measures. In a world of computing in which almost everyone uses Windows, getting it to work on Mac may not be that simple and that is why we decided to write this little guide. Next we will tell you everything you have to know to use the DNIe on Mac and not die trying.

Before starting the tutorial, you should know that you will need an electronic ID reader to complete the entire process. If you still do not have one, below you have a selection of the best quality-price models so that you can use your electronic ID on your Mac. If you already have one, we will start with the process step by step.

Where to download the certificate for DNIe

how to use dnie on mac

Before doing any kind of new installation (without an update, of course), it is worth making sure that we do not have any remainder of a possible previous installation. If we are sure that we have never used it, we can go directly to the installation of the new drivers. If not, we will remove any traces by doing the following:

  1. We open the Terminal. It's in the folder Applications / Utilities, from the Launchpad in the Dock or searching for it from the Spotlight.
  2. We wrote dsenableroot to activate superuser.
  3. It will ask us for the password of our user. We introduce it.
  4. It will also ask for the root password. We introduce the one we want, but it is worth it to be one that we can remember in case we ever want to do things like this again.
  5. We go to / Library and delete the Libpkcs11-dnie folder
  6. We open a terminal and enter the following:
  7. sudo rm / var / db / receipts / * dni *
  8. Now we deactivate the root account with the command dsenableroot –d
  9. Now that we have everything clean we just have to go to THIS PAGE, download the files and install them.

How to use the electronic DNI on Mac

With the file already installed, an installation as simple as double-clicking on the .pkg file and following the instructions (including putting our user password), we proceed to configure and use DNIe on Mac. We will do it by following these steps:

  1. The first thing we have to do is, if we do not have it installed, go to the page of Mozilla, download and install the Firefox web browser. Historically, Safari has not gotten along with many web pages and this is something that also happens in this type of certificates it does not work with the default browser of OS X. In any case, it is always worth having a second web browser, for what may happen, and for me Firefox is the second best option for mac.
  2. The next step is to install the certificate in Firefox. To do this, we open Firefox, we will Preferences / Advanced / Certificates and click on Safety devices. how to use dnie on mac
  3. We click on Load.
  4. We give the module a name (for example, DNIe PKCS 11 module).
  5. We manually indicate the path of the module which will be the following: Library / Libpkcs11-dnie / lib /
  6. We click accept.

how to use dnie on mac

  1. To install the root certificate we are going to Preferences / Advanced /Certificates/ See certificates / Authorities.
  2. We select Import. how to use dnie on mac
  1. We navigate to the path of the certificate that will be in / Library / Libpkcs11-dnie. In my case, it was in that folder directly. If it is not there, we look for it in the Share folder within the same path.
    how to use dnie on mac
  2. We mark the three boxes.
  3. Finally, we click OK.
    how to use dnie on mac

It is optional, but recommended, Restart your computer so as not to run into any unexpected problem. Once rebooted, everything should work without problems. It would also be interesting not to connect the DNIe reader until the Mac has started.

For, check if everything works properly, you can access this page that the National Police provides us . If the page does not load, something we have done or something has gone wrong. It may be that there is no card inserted, for example. The best thing in these cases is to remove and put the USB of the electronic ID reader, check that there is a card and restart. If we do not find the fault, it may be a good idea to start over from the beginning, but this time all the steps will be necessary, including removing the previous versions of the drivers and the certificate.

It must be remembered that the certificate will only be valid for 30 days. After that time, it will be necessary to download and install the certificate again.

Electronic DNI reader for Mac

Everything explained above will not help us if we do not have a electronic ID reader. In the same way that we will need an external reader to be able to read SD cards in an iMac, we will also need to buy an electronic ID reader.

Which reader is worth buying? Well that's the million dollar question. There are many options and many of them will serve us perfectly, but we can also find something that is not worth it online. What I usually do when I want to buy anything is look in The Amazon, which for me is the best online store that exists. In addition, although it is true that some comments can be bought or fraudulent, Amazon tries to prevent these comments from appearing on its website, so most of the reviews we read will be true.


A good option, which is in fact the number 1 seller of this type of reader on Amazon, is the Woxter Electronic DNI , but wow! It is for Windows and Linux. The CoolBox CRCOOCRE065 It has an even better rating and it is available for Mac. But be careful, always making sure that it is available for Mac.

What Do you already know how to use the electronic DNI on Mac?

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

47 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Miguel said

    Thank you very much for the tutorial, very useful and easy to do

  2.   AmstradUser said

    Very well done the tutorial. But ... Does anyone use the electronic DNI ?, Another failure of the administration.

    1.    aemedia said

      How can you tell that you don't live abroad 😉

  3.   Angel said

    Thanks, I had been trying to install it for a long time and there was no way. I always had it in windows and I missed it. Of course it is very useful, at least for me.

  4.   Sergio Martos Sanchez said

    Hi, I have a problem with the terminal, since it does not recognize my root password, I suppose I must have one already and I don't remember…. Is it possible to know it?
    Thank you

    1.    Edu said

      Test root or toor

  5.   Ricardo said

    Hello to me, the installer tells me that a problem has occurred and it has not just been installed

  6.   Ricardo said

    Hello, I am able to install the program, it gives me an error and the installation does not finish. Any ideas?

  7.   Javier said

    I have upgraded to macOS Sierra and trying to install the .pkg file gives me an error. I guess we'll have to wait for the Sierra package to be updated?

  8.   rfacal said

    That happens to me too. With Sierra, my DNIe has stopped working

  9.   rfacal said

    Using the DNIe with Mac is torture. Thanks to the tutorial published in Soydemac I had achieved it: but my joy in a well with the new OS Sierra. It is essential for my work to have a digital signature, be it the FNMT Certificate or the DNIe and both things fail me. I am considering buying a Windows PC (and even using Explorer, which apparently is the only thing that the FNMT and DNIe recognize well). After 25 years using only Mac I find it a bad drink, and it will surely be the joke of my fellow fish tanks. Could anyone reasonable expectations that the DNIe can work on an updated Mac? (or the certificate: it's the same: I almost prefer it. When it was casting it was faster)

    1.    mag said

      And isn't it easier and cheaper to install Windows on your Mac and use it via boot camp or create a virtual machine using VMWare? Anyway, I agree with you, using the DNIe on Mac is torture, but the fault lies with the useless of the Administration. I had achieved it a long time ago, but now I have needed to use it again and there is no way. I do not know if it is because I am using the beta of macOS, go to know. What I had no problems with in the past is with the certificate that you download from the FNMT and use it through Firefox, although they already force you to use that browser instead of Safari, which is another.

  10.   javierfc said

    Impossible with Sierra

  11.   celiamoar said

    It won't let me add the Library / Libpkcs11-dnie / lib / module

  12.   pedrazajaAngel said

    I can't do it with Sierra and I need it. Has anyone been able to install it?

  13.   Estíbaliz Ivars Miralles said

    you have to do a master to install the reader, and there is no way to get it

  14.   Paco said

    Impossible with Sierra ... there is no way

    1.    Javier said

      Solved! In order to install the .pkj package, you must have Firefox installed on the Mac, if it is not installed, it gives an error when installing the .pkj. Once the package is installed, the steps to follow to configure Firefox to use it with the electronic ID will appear. It seems that this is the only browser that works with the DNI on the Mac is Firefox

      1.    Susana said

        Hi Javier:

        Could you please indicate where the steps to follow appear when configuring Firefox to be able to use it with the DNIe?

        I have downloaded Firefox and when installing the pkg file it gives me an error.

        Thank you very much!

  15.   Ramon Martinez de Velasco said

    Hello, Everything installed and working correctly, but you say: «Remember that the certificate will only be valid for 30 days. After that time, it will be necessary to download and install the certificate again. Where is the thing to download and install again? Could you give me a link to the page not a direct download link please? Thank you very much in advance. A greeting.

  16.   Ramon Martinez de Velasco said

    @Pablo Aparicio: Could you answer my comment, please? Thank you very much in advance. Greetings.

    1.    yoshian said

      Hello! Can somebody help me? I have followed all the steps but when I enter your social security website it tells me that there are no certificates installed ...

  17.   fabiola said

    I get an error when trying to load the module file?

    Thank you very much for all the work

  18.   David said

    Good afternoon, see if you can help me, when I install the file, it tells me that "Alert, module cannot be added". Do you know what to do?

    Thank you very much.

  19.   Isabel said

    I have exactly the same problem as David, same error message when trying to load the module: "Alert, the module cannot be added"

  20.   Yesul said

    Hi there!! I think that the error that the PKG gives is because Firefox is not installed, it gave me the same error! try it !!!

  21.   zurupeto said

    I download the previous module and let me shit it again, I clean the installation and start the whole process again, but I am not able to read the DNIe.

    MacBook Pro with Sierra OS

  22.   Yesul said

    I don't know how many times I have installed, deleted and RE-installed it, following all the steps. In OSX HIGH SIERRA, I almost know it by heart !!!!…. but when I try to access the tax agency it gives me an error 403 it is desperate…. can't access the Dnie…. but for example when firefox asks me to access the certificates, it enters without a problem…. Paul!!!! do you have any idea what could happen?

    someone knows somewhere where they install it (evidently being me in front)

  23.   Joseph said

    I have followed the steps and it does not work for me, I gave an error when loading the module. The solution has been to LOGIN with the NEW PKCS # 11 MODULE. Steps to follow: open mozilla> preferences> privacy and security> security devices> select NEW PKCS @ 11 MODULE> click on START SESSION> it will ask for the ID card> accept. Then you have to completely close the mozilla> command + Q and reopen mozilla. At that moment it already recognizes the module and lets you work with the DNIe.

    1.    Ramon said


      Just this happens to me: it tells me that it cannot load the DNIE-PKCS # 11 module, then I download it (I delete it within Firefox Preferences) and reload it, but the START button is inactive.

      If I select the reader ("Generic Smart card ..." under the DNIE-PKCS # 11 module) in the specifications it says "No present" so I get stuck here.

      My reader has a classic usb connection but my MacBook Pro with OS Catalina has the smallest usb socket (oval plug that I don't remember the name) but it does recognize the reader (Ewent 1052), because in «About my Mac / Usb» it is there perfectly.

      Another thing: the certificate that expires in a month is it "ac_raiz_dnie.crt"? Is this certificate downloaded when you install the "libpkcs11-dnie-1.3.1_OSX-10.10_10.11.dmg"? So, every time you want to use the DNI-E after a while you will have to clean the Preferences and reinstall everything?

      I will appreciate the help. I don't know if the forum is still alive. I leave my email in case someone passes by and can clarify my doubts.

      Thank you.

      Ramon T.

  24.   Simon said

    there is no way to find this:
    We navigate to the path of the certificate that will be in / Library / Libpkcs11-dnie. In my case, it was in that folder directly. If it is not there, we look for it in the Share folder within the same path.

  25.   Manuel Canteli Rodriguez said

    it's a shame but… .. one ends up, going back to Windows for something so necessary in our days like using the DNI certificate. Nobody realizes that there are users who are not programmers and that we are more used to a program asking us to fill in some fields and that it ends up installing the desired program? It has been INFINITELY easier to install the entire Adobe package than to try to make the electronic ID work.
    In the end all I have to do is ask my son to let me use his PC.

  26.   Mari Cruz said

    The same thing happens to me: Alert It is not possible to add the module. Using the money in .Mac is looking impossible.

  27.   Aurelio said

    Since installing Catalina…. It is impossible to use the DNIe.

  28.   Manual said

    I upgraded to OS Catalina and had to reinstall everything.
    Thanks for the tutorial

  29.   Jesus G. said

    A lot of attention to this: regarding FIREFOX, it seems that as of today (March 2020), only the FIREFOX 68 version is valid.
    The later ones are not valid, since they do not incorporate an essential security option to correctly install the certificates.

    This is indicated on the FNMT page, in the system requirements for Mac.

  30.   Natalia said

    I can't install it …….
    I get two boxes to edit trust instead of three….
    There is no way….

  31.   mogli said

    Thank you, you saved me!

    1.    Oscar said

      Hello, I did the process from the beginning, erasing all traces of folders as Pablo says. Everything works perfectly with Catalina and a bit4u DNIe reader. Self-signature, ok. Digitally sign PDFs with adobe and the DNIe, ok.
      Thank you!

  32.   Churraco @ said

    The Mozilla Firefox route is obsolete both here and on the page of the misgovernment of Spain

  33.   anonymous said

    It does not work on MacOS Big Sur.

  34.   Joseph said


    I'm trying to install it on a Mac with Mojave (there are two versions on the police page 1.5.0 and 1.5.1, I'm trying to install 1.5.1). It seems to install without errors. At the end of the installation it opens a Firefox tab with the instructions indicated in "How to use the electronic DNI on Mac".

    However, when I load the module and go to find the path in the library to follow the steps, there is nothing, there is no folder "Libpkcs11-dnie". So I can't do the steps Firefox tells me.

    Has this happened to someone else, how can it be fixed?

    Another question that may sound absurd, is it necessary to have the reader connected to the usb during the installation process and the DNIe inserted in the reader? This may have something to do with the above.

    I am very urgent to fix this to present a document and the technical support of the police does not help me….

    Thank you very much

  35.   Alejandra said

    If I have an FNMT certificate installed, do I also have to delete it first? Or is it not necessary? Is that before I had a NIE and I had the FNMT certificate to do procedures but now I have the DNIe and I wanted to install this…. clearly technology is not my thing

  36.   Lorraine said

    HELLO. I have bought the trust reader that you recommend in the article and I have a MAC HIGH SIERRA 10.13. apparently not supported. because when I have all the map card downloaded, it does not detect the reader to start the session.
    What reader do you recommend for this version of MAC? Thank you

  37.   Anna said

    It won't let me download the program, so I can't do anything. Interpret that it is a virus or similar. I have tried it from Safari and from Chrome. Impossible.

  38.   Lola said

    I have managed to install everything, I have verified that it works following the instructions of the police but when I want to use it on any other page it gives me an error. It always asks me for the password (Please enter the password for the PKCS#11 electronic DNI token.) which I understand is the one I put on the DNIe at the police station but it doesn't work. Does anyone know what the problem is?

  39.   Javier said

    Thank you very much. You perfectly explain how to get out of hell: the IT relationship with public administrations