Mounting NTFS partitions as regular user

New to SolydXK? This is the place to start.
Please check the other subforums to see if there's a more suitable place for your question.
pnbalaji
Posts: 7
Joined: 29 Sep 2016 07:50

Mounting NTFS partitions as regular user

Postby pnbalaji » 03 Oct 2016 12:00

Hi,

Based on the responses that I received from my previous post https://forums.solydxk.com/viewtopic.php?f=4&t=6584, I went ahead and replaced my Ubuntu Mate with Solydx. The distribution is really solid and stable. However, I do need some help.

My NTFS partitions are showing up in Thunar and they get mounted when I click on them. However, it is asking for root password. How do I mount the NTFS partitions as a regular user? I try to avoid automatically mounting the NTFS partitions by adding new entries in fstab. I just want the NTFS partitions to show up in Thunar with out mounting. When I click on them, they should get mounted, but should not ask for root password.

Can some one help?

Thanks,
Balaji.

User avatar
san-claudio
Posts: 209
Joined: 28 Dec 2015 20:26
Location: Paris, France

Re: Mounting NTFS partitions as regular user

Postby san-claudio » 03 Oct 2016 14:04

C'est sûrement possible puisque j'ai accès à Windows 7 en dual-boot direct sans mot de passe, je suis SolydX EE 9 64bits et je me rappelle plus depuis février 2016 que la distribution est installée si c'était natif ou j'ai rajouté des paquets...
https://packages.debian.org/stretch/ntfs-3g
https://packages.debian.org/stretch/ntfs-config
https://packages.debian.org/stretch/disk-manager

pnbalaji
Posts: 7
Joined: 29 Sep 2016 07:50

Re: Mounting NTFS partitions as regular user

Postby pnbalaji » 03 Oct 2016 14:07

Sorry, I don't understand the language in which you have typed.

If I remember right, stretch is "testing" repository, correct? Do I have to install ntfs-config or disk-manager from the testing repo? I have installed gnome-disk-utility, but it is buggy and doesn't show up my NTFS partition layout correctly.

Thanks,
Balaji.

User avatar
san-claudio
Posts: 209
Joined: 28 Dec 2015 20:26
Location: Paris, France

Re: Mounting NTFS partitions as regular user

Postby san-claudio » 03 Oct 2016 14:19

gnome-disk-utility OK for me :

Code: Select all

san-claudio@solydxk ~ $ apt-cache policy gnome-disk-utility
gnome-disk-utility:
  Installé : 3.22.0-1
  Candidat : 3.22.0-1
 Table de version :
 *** 3.22.0-1 500
        500 http://httpredir.debian.org/debian testing/main amd64 Packages
        100 /var/lib/dpkg/status
san-claudio@solydxk ~ $
With the 3 links above...for Debian 9 testing...


Debian stable Jessie 8
https://packages.debian.org/jessie/gnome-disk-utility
https://packages.debian.org/jessie/ntfs-3g
https://packages.debian.org/jessie/ntfs-config
https://packages.debian.org/jessie/disk-manager

I will not be able to tell you more...

kurotsugi
Posts: 2214
Joined: 09 Jan 2014 00:17

Re: Mounting NTFS partitions as regular user

Postby kurotsugi » 03 Oct 2016 21:15

ntfs-3g, ntfs-config, thunar, and gvfs is enough. no need to use external tools. the password were a security mechanism to prevent hacks. it was needed for server (turned on by default on pure debian) but supposed to be turned off by solydxk. please give the result of

Code: Select all

inxi -Fxz
dpkg -l |grep solydxk

User avatar
san-claudio
Posts: 209
Joined: 28 Dec 2015 20:26
Location: Paris, France

Re: Mounting NTFS partitions as regular user

Postby san-claudio » 04 Oct 2016 07:35

for me :

Code: Select all

san-claudio@solydxk ~ $ inxi -Fxz
System:    Host: solydxk Kernel: 4.7.0-1-amd64 x86_64 (64 bit gcc: 5.4.1)
           Desktop: Xfce 4.12.3 (Gtk 2.24.30) Distro: SolydXK
Machine:   System: LENOVO (portable) product: 4291T2M v: ThinkPad X220
           Mobo: LENOVO model: 4291T2M
           UEFI [Legacy]: LENOVO v: 8DET56WW (1.26 ) date: 12/01/2011
Battery    BAT0: charge: 36.4 Wh 100.0% condition: 36.4/52.0 Wh (70%)
           model: SANYO 42T4861 status: Full
CPU:       Dual core Intel Core i5-2540M (-HT-MCP-) cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10366
           clock speeds: max: 3300 MHz 1: 858 MHz 2: 822 MHz 3: 981 MHz
           4: 829 MHz
Graphics:  Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller
           bus-ID: 00:02.0
           Display Server: X.Org 1.18.4 drivers: (unloaded: fbdev,vesa)
           Resolution: 1366x768@60.00hz
           GLX Renderer: Mesa DRI Intel Sandybridge Mobile
           GLX Version: 3.0 Mesa 12.0.3 Direct Rendering: Yes
Audio:     Card Intel 6 Series/C200 Series Family High Definition Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k4.7.0-1-amd64
Network:   Card-1: Intel 82579LM Gigabit Network Connection
           driver: e1000e v: 3.2.6-k port: 5060 bus-ID: 00:19.0
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
           Card-2: Intel Centrino Advanced-N 6205 [Taylor Peak]
           driver: iwlwifi bus-ID: 03:00.0
           IF: wlan0 state: down mac: <filter>
Drives:    HDD Total Size: 320.1GB (25.9% used)
           ID-1: /dev/sda model: HITACHI_HTS72323 size: 320.1GB temp: 24C
Partition: ID-1: / size: 56G used: 27G (51%) fs: ext4 dev: /dev/sda6
           ID-2: swap-1 size: 4.19GB used: 0.00GB (0%) fs: swap dev: /dev/sda7
Sensors:   System Temperatures: cpu: 45.0C mobo: N/A
           Fan Speeds (in rpm): cpu: 1963
Info:      Processes: 196 Uptime: 7 min Memory: 1846.4/3838.2MB
           Init: systemd runlevel: 5 Gcc sys: 6.1.1
           Client: Shell (bash 4.4.01) inxi: 2.3.1 
san-claudio@solydxk ~ $ dpkg -l |grep solydxk
ii  firefox-solydxk-adjustments                                 2016.07.07                           all          Firefox adjustments for SolydXK
ii  solydxk-flashplugin-11                                      11.2.202.635                         amd64        Adobe Flash plugin 11
ii  solydxk-keyring                                             2016.03.29                           all          GnuPG key of the SolydXK repository
ii  solydxk-mozilla-evolvere-icon-theme                         0.1.1                                all          Evolvere desktop icon theme
ii  solydxk-softwaremanager                                     7.6.9                                all          Software Manager
ii  solydxk-system                                              2.3.6                                all          SolidXK System Base Package
ii  solydxk-welcome                                             1.2.9                                all          Welcome screen for SoldyXK
ii  thunderbird-solydxk-adjustments                             2016.07.07                           all          Thunderbird adjustments for SolydXK
san-claudio@solydxk ~ $
Merci pour les commandes au terminal.

User avatar
Arjen Balfoort
Site Admin
Posts: 9219
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: Mounting NTFS partitions as regular user

Postby Arjen Balfoort » 04 Oct 2016 08:26

Perhaps it's better to check all solyd packages (including SolydX or SolydK packages):

Code: Select all

dpkg -l | grep solyd
Could you paste the output of that?


SolydXK needs you!
Development | Testing | Translations

User avatar
ilu
Posts: 2420
Joined: 09 Oct 2013 12:45

Re: Mounting NTFS partitions as regular user

Postby ilu » 04 Oct 2016 13:55

Mounting of ntfs partitions needs password on my SolydX systems too - it has allways been like that. I think its good because that way you can't mistakenly mount and write on Windows system partitions. Whatever you want to use regularly, can be mounted in fstab.

Edit: I did not read carefully enough - of course mounting does not require root password but user password. But OP probably means user password too?
It seems he wants mounting without password and I don't think that should happen. It's already bad enough (from a security point of view) that removable media get mounted without password.

pnbalaji
Posts: 7
Joined: 29 Sep 2016 07:50

Re: Mounting NTFS partitions as regular user

Postby pnbalaji » 04 Oct 2016 14:03

Thanks for all the suggestions. I am on travel today and could not even open my laptop. I will send out the output of inxi, dpkg etc by tomorrow.

Regarding the last post from ilu, I did mean it is asking for user password. I guess it is acting like sudo, asking the user password to mount the partitions with root permission, but with the user's rights.

Thanks,
Balaji.

User avatar
san-claudio
Posts: 209
Joined: 28 Dec 2015 20:26
Location: Paris, France

Re: Mounting NTFS partitions as regular user

Postby san-claudio » 04 Oct 2016 14:05

I confirms that with SolydX EE 9 I do not need a password to have access to the partition with NTFS for Windows 7.
I have two other partitions in FAT32 whose password is requested at each session.

Code: Select all

san-claudio@solydxk ~ $ dpkg -l | grep solyd
ii  firefox-solydxk-adjustments                                 2016.07.07                           all          Firefox adjustments for SolydXK
ii  solydx-system-adjustments                                   2.6.2                                all          Adjustments specific to SolydX.
ii  solydxee-info                                               1.0.3                                amd64        Base package.
ii  solydxk-flashplugin-11                                      11.2.202.635                         amd64        Adobe Flash plugin 11
ii  solydxk-keyring                                             2016.03.29                           all          GnuPG key of the SolydXK repository
ii  solydxk-mozilla-evolvere-icon-theme                         0.1.1                                all          Evolvere desktop icon theme
ii  solydxk-softwaremanager                                     7.6.9                                all          Software Manager
ii  solydxk-system                                              2.3.6                                all          SolidXK System Base Package
ii  solydxk-welcome                                             1.2.9                                all          Welcome screen for SoldyXK
ii  thunderbird-solydxk-adjustments                             2016.07.07                           all          Thunderbird adjustments for SolydXK
san-claudio@solydxk ~ $

User avatar
Arjen Balfoort
Site Admin
Posts: 9219
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: Mounting NTFS partitions as regular user

Postby Arjen Balfoort » 04 Oct 2016 14:07

I agree with Ilu concerning safety. Strange that Stretch has a different behavior.

However, if you still would look to mount an NTFS partition without password prompt, this Fedora solution might work: https://ask.fedoraproject.org/en/questi ... -password/


SolydXK needs you!
Development | Testing | Translations

User avatar
san-claudio
Posts: 209
Joined: 28 Dec 2015 20:26
Location: Paris, France

Re: Mounting NTFS partitions as regular user

Postby san-claudio » 04 Oct 2016 14:12

It is possible that I have added a paquet but I remember more...
Has test in USB-Live.

pnbalaji
Posts: 7
Joined: 29 Sep 2016 07:50

Re: Mounting NTFS partitions as regular user

Postby pnbalaji » 04 Oct 2016 15:24

My system details are below.

inxi output is below.

Code: Select all

[bneelka@mapleton~]inxi -Fzx
System:    Host: mapleton Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4) 
           Desktop: N/A Distro: SolydXK 8 solydxk 
Machine:   System: Gateway product: NV53 v: 0100
           Mobo: Gateway model: SJV50TR v: Rev
           Bios: Phoenix v: V1.05 date: 12/07/2009
CPU:       Dual core AMD Athlon II M300 (-MCP-) cache: 1024 KB
           flags: (lm nx sse sse2 sse3 sse4a svm) bmips: 8000 
           Clock Speeds: 1: 2000 MHz 2: 2000 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] RS880M [Mobility Radeon HD 4225/4250]
           bus-ID: 01:05.0
           Display Server: X.Org 1.16.4 drivers: ati,radeon (unloaded: fbdev,vesa)
           Resolution: 1366x768@60.04hz
           GLX Renderer: Gallium 0.4 on AMD RS880
           GLX Version: 3.0 Mesa 10.3.2 Direct Rendering: Yes
Audio:     Card-1 Advanced Micro Devices [AMD/ATI] RS880 HDMI Audio [Radeon HD 4200 Series] 
           driver: snd_hda_intel bus-ID: 01:05.1 
           Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA) 
           driver: snd_hda_intel bus-ID: 00:14.2 
           Sound: Advanced Linux Sound Architecture v: k3.16.0-4-amd64
Network:   Card-1: Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express)
           driver: ath9k bus-ID: 09:00.0
           IF: wlan0 state: up mac: <filter>
           Card-2: Broadcom NetLink BCM5784M Gigabit Ethernet PCIe
           driver: tg3 v: 3.137 bus-ID: 03:00.0
           IF: eth0 state: down mac: <filter>
Drives:    HDD Total Size: 500.1GB (46.5% used)
           ID-1: /dev/sda model: WDC_WD5000BEVT size: 500.1GB
Partition: ID-1: / size: 55G used: 4.3G (9%) fs: ext4 dev: /dev/sda6 
           ID-2: /home size: 35G used: 19G (55%) fs: ext4 dev: /dev/sda7 
           ID-3: swap-1 size: 4.28GB used: 0.00GB (0%) fs: swap dev: /dev/sda8 
Sensors:   System Temperatures: cpu: 78.0C mobo: 71.0C 
           Fan Speeds (in rpm): cpu: N/A 
Info:      Processes: 167 Uptime: 6 min Memory: 1173.9/3709.0MB 
           Init: systemd runlevel: 5 Gcc sys: 4.9.2 
           Client: Shell (bash 4.3.301) inxi: 2.1.28 
[bneelka@mapleton~]

dpkg output is below.

Code: Select all

[bneelka@mapleton~]dpkg -l | grep -i solyd
ii  firefox-solydxk-adjustments           2016.06.11                           all          Firefox adjustments for SolydXK
ii  solydx-info                           1.1.7                                amd64        Base package.
ii  solydx-system-adjustments             2.6.1                                all          Adjustments specific to SolydX.
ii  solydxk-keyring                       2016.03.29                           all          GnuPG key of the SolydXK repository
ii  solydxk-mozilla-evolvere-icon-theme   0.1.0                                all          Evolvere desktop icon theme
ii  solydxk-softwaremanager               7.6.9                                all          Software Manager
ii  solydxk-system                        2.3.2                                all          SolidXK System Base Package
ii  solydxk-welcome                       1.2.6                                all          Welcome screen for SoldyXK
ii  thunderbird-solydxk-adjustments       2016.06.16                           all          Thunderbird adjustments for SolydXK
ii  updatemanager                         3.0.3                                all          SolydXK Update Manager
[bneelka@mapleton~]

Code: Select all


[b]lsblk output is below[/b]. As you can see, I have mounted /dev/sda3 and /dev/sda5 as DriveC and DriveD using /etc/fstab, which is something I would like to avoid.

[bneelka@mapleton~]sudo lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0  11.7G  0 part 
├─sda2   8:2    0   459M  0 part 
├─sda3   8:3    0 199.9G  0 part /media/bneelka/DriveC
├─sda4   8:4    0     1K  0 part 
├─sda5   8:5    0 158.7G  0 part /media/bneelka/DriveD
├─sda6   8:6    0  55.9G  0 part /
├─sda7   8:7    0  35.2G  0 part /home
└─sda8   8:8    0     4G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom  
The screenshot of gnome-disk-utility is below. It appears that this package has a bug and hence not showing up the /dev/sda3 and /dev/sda5.
Image

Thanks,
Balaji.

kurotsugi
Posts: 2214
Joined: 09 Jan 2014 00:17

Re: Mounting NTFS partitions as regular user

Postby kurotsugi » 04 Oct 2016 21:01

unless something went wrong, stretch and jessie should have some behaviour. the security mechanism was disabled because we decided to customize solydxk toward home/business system. we already made the modification described in this link https://ask.fedoraproject.org/en/questi ... -password/

IIRC the file was part of solydx-system-adjustment. you can try reinstall this package or manually create the file.

User avatar
Arjen Balfoort
Site Admin
Posts: 9219
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: Mounting NTFS partitions as regular user

Postby Arjen Balfoort » 05 Oct 2016 06:45

kurotsugi wrote:unless something went wrong, stretch and jessie should have some behaviour. the security mechanism was disabled because we decided to customize solydxk toward home/business system. we already made the modification described in this link https://ask.fedoraproject.org/en/questi ... -password/

IIRC the file was part of solydx-system-adjustment. you can try reinstall this package or manually create the file.
Indeed, I totally forgot about that one!

For reference, it's this file:

Code: Select all

/etc/polkit-1/localauthority/50-local.d/99-mount-partitions.pkla
And enables all users in the users group for passwordless mounting.

So, make sure you are in the users group :)


SolydXK needs you!
Development | Testing | Translations

User avatar
ilu
Posts: 2420
Joined: 09 Oct 2013 12:45

Re: Mounting NTFS partitions as regular user

Postby ilu » 06 Oct 2016 00:48

When was this change done? My systems are still asking for a password for mounting. I don't mind this behaviour, I'm posting this just for troubleshooting.
All users are in the users group. The content of the file you mentioned:

Code: Select all

[Password-less mounting of local partitions]
Identity=unix-group:users
Action=org.freedesktop.udisks2.filesystem-mount-system
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Action=org.freedesktop.udisks2.filesystem-mount
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Action=org.freedesktop.udisks2.filesystem-mount-other-seat
ResultAny=yes
ResultInactive=yes
ResultActive=yes

kurotsugi
Posts: 2214
Joined: 09 Jan 2014 00:17

Re: Mounting NTFS partitions as regular user

Postby kurotsugi » 06 Oct 2016 06:28

it was on early days of solydxk. can't remember exactly when. a user complained about this issue, I give him a solution, then the team decided to make it as default. if that didn't work, perhaps you can try this one.

Code: Select all

// Password-less mounting of local partitions
polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.udisks2.filesystem-mount-system" && subject.isInGroup("users")) {
       return polkit.Result.YES;
    }
});
else, you can directly hack udisk2 polkit rule in the /usr/share/polkit-1/. you'll need to modify the policy for three action id above. make sure all policy is yes

Code: Select all

    <defaults>
      <allow_any>yes</allow_any>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>


EDIT: the trick didn't work if you have udisk installed alongside with udisk2. you'll need to uninstall udisk.

User avatar
Arjen Balfoort
Site Admin
Posts: 9219
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: Mounting NTFS partitions as regular user

Postby Arjen Balfoort » 06 Oct 2016 06:40

kurotsugi wrote:EDIT: the trick didn't work if you have udisk installed alongside with udisk2. you'll need to uninstall udisk.
I see that both udisks and udisks2 are installed on our ISOs.
Should udisks be removed?


SolydXK needs you!
Development | Testing | Translations

kurotsugi
Posts: 2214
Joined: 09 Jan 2014 00:17

Re: Mounting NTFS partitions as regular user

Postby kurotsugi » 06 Oct 2016 06:59

AFAIK udisk is now deprecated and replaced by udisk2. it should be safe to remove udisk. just to be sure, you can simulate the action as usual using -s option on apt-get. if it's not possible to remove udisk, we need to create new rules for udisk. IIRC the content is almost identical to udisk2 rule. this might work.

Code: Select all

[Password-less mounting of local partitions]
Identity=unix-group:users
Action=org.freedesktop.udisks2.filesystem-mount-system
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Action=org.freedesktop.udisks2.filesystem-mount
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Action=org.freedesktop.udisks2.filesystem-mount-other-seat
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Action=org.freedesktop.udisks.filesystem-mount-system
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Action=org.freedesktop.udisks.filesystem-mount
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Action=org.freedesktop.udisks.filesystem-mount-other-seat
ResultAny=yes
ResultInactive=yes
ResultActive=yes

User avatar
grizzler
Posts: 2139
Joined: 04 Mar 2013 15:45
Location: The Hague, NL

Re: Mounting NTFS partitions as regular user

Postby grizzler » 06 Oct 2016 17:18

Just for the record, udisks was removed from testing and unstable in June 2015. It's been gone from my main system for quite a while already (I'm not sure if it was forced off or whether I manually removed it for some reason). The EE ISOs don't have it anymore either.

Of course that's all testing, but an apt-get remove of udisks in the jessie VMs I have here doesn't produce any immediate issues, dependency related or otherwise.
Frank

SolydX EE 64 - tracking Debian Testing


Return to “Newbie Questions”

Who is online

Users browsing this forum: No registered users and 2 guests