• Password requiring for mounting a Drive of HDD


    I have several drive in my Hard Disk (without root, home & swap). When i am trying to mount those Drives it’s asking me my password. Can anyone tell me the reason? I have used several Arch Based distribution. None of them ask password at mounting drive via nautilus.

    How can i solve this. Giving password for mounting every drive is annoying

  • @ray6an1 said:

    I have several drive in my Hard Disk (without root, home & swap).

    You mean “partitions”, aren’t you?

    When i am trying to mount those Drives it’s asking me my password. Can anyone tell me the reason?

    This is the standard, default Arch behaviour. Antergos tries to be as close to native Arch as possible.

    I have used several Arch Based distribution. None of them ask password at mounting drive via nautilus.

    Those are tweaked Arch derivatives.

    How can i solve this.

    • create the simple text file
      /etc/polkit-1/rules.d/90-nopasswd.rules
      
    • place in it the following content
      polkit.addRule(function(action, subject) {
           if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) {
               return polkit.Result.YES;
              }
           }
      );
      
    • log out and back in
    • done

    Giving password for mounting every drive is annoying

    But more secure.

  • @just It doesn’t solve this :disappointed:

  • @ray6an1 Check your config against this one. It’s from the system where Antergos does not ask for password accessing foreign partitions.

    The file; mine is called 90-alexnopasswd.rules:

    $ sudo ls -lha /etc/polkit-1/rules.d
    total 16K
    drwxr-x--- 2 root polkitd 4.0K Jan 31 08:55 .
    drwxr-xr-x 3 root root    4.0K Oct 25 21:39 ..
    -rw-r--r-- 1 root root     326 Oct 25 21:39 50-default.rules
    -rw-rw-r-- 1 root root     198 Oct 24  2014 90-alexnopasswd.rules
    

    And its content:

    $ sudo cat /etc/polkit-1/rules.d/90-alexnopasswd.rules
    polkit.addRule(function(action, subject) {
            if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) {
                return polkit.Result.YES;
            }
        }
    );
    $ 
    
  • @just those are same, but still facing the issue

    [email protected] ~> sudo ls -lha /etc/polkit-1/rules.d
    [sudo] password for raihan:
    total 16K
    drwxr-x— 2 root polkitd 4.0K Feb 19 20:02 .
    drwxr-xr-x 3 root root 4.0K Oct 26 00:39 …
    -rw-r–r-- 1 root root 326 Oct 26 00:39 50-default.rules
    -rw-r–r-- 1 root root 190 Feb 19 20:02 90-nopasswd.rules
    [email protected] ~> sudo cat /etc/polkit-1/rules.d/90-nopasswd.rules
    polkit.addRule(function(action, subject) {
    if (action.id.indexOf(“org.freedesktop.udisks2.”) == 0 && subject.isInGroup(“storage”)) {
    return polkit.Result.YES;
    }
    }
    [email protected] ~>

  • @ray6an1 On the fly, I see at least two errors in your text:

    • one missing final closing curly bracket; there should three, not two
    • missing semicolon after the final, third closing curly bracket

    It’s up to you to check and double-check your typing and find eventual typos. Not to others.

  • Thank Man, it’s solve now.

  • Marked as [Solved].

Posts 8Views 990
Log in to reply