Manjaro Difference between revisions of "Access Partitions Without Entering a Password"

Difference between revisions of "Access Partitions Without Entering a Password"

From Manjaro
imported>Fhdk
m (added category)
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
= Overview =
{{Out of date|This information is now obsolete but kept for historical reasons! [[User:Fhdk|Fhdk]] ([[User talk:Fhdk|talk]])}}
 
==Overview==
{{warning|This information is now obsolete but kept for historical reasons!}}
 


A particular nuisance for many users is the need to enter a password in order to access other partitions present on their hard disk. In addition, those who installed Openbox 0.8.3 have also encountered the additional issue of having to enter a their passwords in order to eject removable media such as USB sticks and CD/DVDs.  
A particular nuisance for many users is the need to enter a password in order to access other partitions present on their hard disk. In addition, those who installed Openbox 0.8.3 have also encountered the additional issue of having to enter a their passwords in order to eject removable media such as USB sticks and CD/DVDs.  
Line 8: Line 6:
This is due to the default policy/permissions settings implemented by a program called ''UDisks2'', which itself is responsible for mounting partitions and removable media. In essence, permissions for mounting are set by default to Root / Administrator level only, rather than the user. Fortunately, this issue can be easily --and permanently-- resolved by creating a special file called '''99-manjaro.rules''' to override the default permissions, consequently resulting in no further need to enter a password.
This is due to the default policy/permissions settings implemented by a program called ''UDisks2'', which itself is responsible for mounting partitions and removable media. In essence, permissions for mounting are set by default to Root / Administrator level only, rather than the user. Fortunately, this issue can be easily --and permanently-- resolved by creating a special file called '''99-manjaro.rules''' to override the default permissions, consequently resulting in no further need to enter a password.


= Step 1: Creating the ''99-manjaro.rules'' File =
==Create 99-manjaro.rules file==
 
You will need to first open your terminal in order to create the ''99-manjaro.rules'' file. The syntax of the command to edit the rules file:
You will need to first open your terminal in order to create the ''99-manjaro.rules'' file. The syntax of the command to edit the mirrorlist is:
 
sudo [text editor] /etc/polkit-1/rules.d/99-manjaro.rules


{{UserCmd|command=sudo [text editor] /etc/polkit-1/rules.d/99-manjaro.rules}}


For example, if you wish to edit the file within the terminal using nano (a standard terminal-based text editor) then enter:
For example, if you wish to edit the file within the terminal using nano (a standard terminal-based text editor) then enter:


sudo nano /etc/polkit-1/rules.d/99-manjaro.rules
{{UserCmd|command=sudo nano /etc/polkit-1/rules.d/99-manjaro.rules}}
 


Otherwise, if you have installed the full version of Manjaro (i.e. not the NET-Edition), you may find it easier to use a text editor like ''Gedit'' or ''Leafpad'' instead. This will create and open the ''99-manjaro.rules'' file up as a document, making it easier to read and edit. To use ''Gedit'' instead, the command is:
Otherwise, if you have installed the full version of Manjaro (i.e. not the NET-Edition), you may find it easier to use a text editor like ''Gedit'' or ''Leafpad'' instead. This will create and open the ''99-manjaro.rules'' file up as a document, making it easier to read and edit. To use ''Gedit'' instead, the command is:


gksu gedit /etc/polkit-1/rules.d/99-manjaro.rules
{{UserCmd|command=gksu gedit /etc/polkit-1/rules.d/99-manjaro.rules}}
 
=Step 2: Editing the ''99-manjaro.rules'' File=


{{warning|If you decide to manually type in the necessary command yourself, ensure that it is entered <u>exactly</u> as illustrated below.}}
==Edit ''99-manjaro.rules''==


{{BoxWarning|Warning|If you decide to manually type in the necessary command yourself, ensure that it is entered <u>exactly</u> as illustrated below.}}


Once the blank file has been opened, copy and paste in the following command to override the default permissions used by ''UDisks2'':
Once the blank file has been opened, copy and paste in the following command to override the default permissions used by ''UDisks2'':


polkit.addRule(function(action, subject) {
{{File|file=/etc/polkit-1/rules.d/99-manjaro.rules|content=
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) {
<pre>
return polkit.Result.YES;
polkit.addRule(function(action, subject) {
}
if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) {
}
return polkit.Result.YES;
);
}
 
});
 
</pre>
}}
Once you have completed the new file, save the changes and close it by:
Once you have completed the new file, save the changes and close it by:


* '''nano''': Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
* '''nano''': Press <kbd>CTRL</kbd> and <kbd>x</kbd> to exit, <kbd>y</kbd> to save, and <kbd>enter</kbd> to finish
* '''Gedit or Leafpad''': Select the 'save' option and then close the window.
* '''Gedit or Leafpad''': Select the 'save' option and then close the window.


'''Now reboot your system for the changes to take effect.'''
'''Now reboot your system for the changes to take effect.'''


[[Category:Contents Page]]
[[Category:Contents Page]]
[[Category:Outdated Page]]

Latest revision as of 22:01, 4 September 2021

Tango-dialog-warning.png This article or section is out of date.
Reason: This information is now obsolete but kept for historical reasons! Fhdk (talk) (Discuss)
Tango-dialog-warning.png

Overview

A particular nuisance for many users is the need to enter a password in order to access other partitions present on their hard disk. In addition, those who installed Openbox 0.8.3 have also encountered the additional issue of having to enter a their passwords in order to eject removable media such as USB sticks and CD/DVDs.

This is due to the default policy/permissions settings implemented by a program called UDisks2, which itself is responsible for mounting partitions and removable media. In essence, permissions for mounting are set by default to Root / Administrator level only, rather than the user. Fortunately, this issue can be easily --and permanently-- resolved by creating a special file called 99-manjaro.rules to override the default permissions, consequently resulting in no further need to enter a password.

Create 99-manjaro.rules file

You will need to first open your terminal in order to create the 99-manjaro.rules file. The syntax of the command to edit the rules file:

user $ sudo [text editor] /etc/polkit-1/rules.d/99-manjaro.rules COPY TO CLIPBOARD


For example, if you wish to edit the file within the terminal using nano (a standard terminal-based text editor) then enter:

user $ sudo nano /etc/polkit-1/rules.d/99-manjaro.rules COPY TO CLIPBOARD


Otherwise, if you have installed the full version of Manjaro (i.e. not the NET-Edition), you may find it easier to use a text editor like Gedit or Leafpad instead. This will create and open the 99-manjaro.rules file up as a document, making it easier to read and edit. To use Gedit instead, the command is:

user $ gksu gedit /etc/polkit-1/rules.d/99-manjaro.rules COPY TO CLIPBOARD


Edit 99-manjaro.rules

Warning
If you decide to manually type in the necessary command yourself, ensure that it is entered exactly as illustrated below.

Once the blank file has been opened, copy and paste in the following command to override the default permissions used by UDisks2:

/etc/polkit-1/rules.d/99-manjaro.rules
polkit.addRule(function(action, subject) {
	if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) {
		return polkit.Result.YES;
	}
});

Once you have completed the new file, save the changes and close it by:

  • nano: Press CTRL and x to exit, y to save, and enter to finish
  • Gedit or Leafpad: Select the 'save' option and then close the window.

Now reboot your system for the changes to take effect.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.