Linux Lite Forums

Software - Support => Other => Topic started by: paul1149 on July 28, 2015, 11:52:06 PM

Title: Need to authenticate before accessing internal drives
Post by: paul1149 on July 28, 2015, 11:52:06 PM
Is there any way to get rid of the need to authenticate before accessing internal drives after each boot? I came across instructions to alter the /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy file, but there is none in LL. I trust the setting must be somewhere else.

Thanks,
Paul
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 12:01:11 AM
You shouldn't need to authenticate to access internal drives. How did you set these up? Please provide details.
Title: Re: Need to authenticate before accessing internal drives
Post by: paul1149 on July 29, 2015, 12:22:18 AM
These are other internal drives, from my previous Win7 installation. Two hard drives divided into three partitions all told. They will be owned by the old Win7 account, which I suppose is at the root of the problem.
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 12:28:57 AM
Have you read the instructions in the Help Manual regarding mounting drives and partitions?
Title: Re: Need to authenticate before accessing internal drives
Post by: paul1149 on July 29, 2015, 12:38:34 AM
No. Will do tomorrow. thanks.
Title: Re: Need to authenticate before accessing internal drives
Post by: paul1149 on July 29, 2015, 10:33:14 AM
I'm still have problems, accessing the mount folder. Here is a series of screenshots:

(http://i.imgur.com/geuxQsn.png)


(http://i.imgur.com/14zH3FJ.png)


(http://i.imgur.com/vKEFGQI.png)


(http://i.imgur.com/807TbId.png)

I also (think) i set TRIM for my SSD, which I was not aware needed to be done.
Also don't know why SMF is adding/showing all the resize info. I did not change any sizes of font or pics.
Trying again using imgur.
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 10:37:00 AM
I really don't know what to do with your post. Paul please read here - https://www.linuxliteos.com/forums/introductions/forum-posting-guidelines/ (https://www.linuxliteos.com/forums/introductions/forum-posting-guidelines/) and edit your last post.
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 10:39:06 AM
Avoid using any size or color on the text. Just type your message and post your images. K.I.S. :)
Title: Re: Need to authenticate before accessing internal drives
Post by: paul1149 on July 29, 2015, 10:43:18 AM
That is precisely what I did.
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 06:47:25 PM
Looks much better, thanks. Also in future when posting the contents of a file or terminal, use the code brackets, this allows responders to copy your code and paste the changed code eg. with the above fstab file, someone would have to type out those lines again to provide a solution for you, which would take much longer.

Start with giving all of those extra drives unique names, at the moment 2 of them have the same name 'ntfsfiles'. May I suggest each mount is called by its drive name, eg. 'segate400' 'seagate520' ,wd2tb'. So first, rename those old mount points in your home folder, then change your fstab file to reflect the new names. Use lowercase only. When you've finished, open a terminal and do:

Code: [Select]
sudo mount -a
to mount the newly named mount points without having to reboot.

Then right click on those folders you have mounted, and screen shot each of the 3 mounts Permissions tabs.
Title: Re: Need to authenticate before accessing internal drives
Post by: paul1149 on July 29, 2015, 06:59:56 PM
Ok, I can see how text/code would be much better than a pic.

Using multiple folders makes a lot of sense. That clears that up for me. I will try this and get back.

Thank you.

The only thing I can add about the first version of that post is that I used the forum url links directly from postimage, and probably they conflicted with SMF somehow.
Title: Re: Need to authenticate before accessing internal drives
Post by: paul1149 on July 29, 2015, 07:19:46 PM
Ok, I still have a problem. Here is the mount output:

Code: [Select]
paul@Precision:~$ sudo mount -a
[sudo] password for paul:
[mntent]: line 17 in /etc/fstab is bad
[mntent]: line 19 in /etc/fstab is bad
[mntent]: line 21 in /etc/fstab is bad
paul@Precision:~$


Here is the fstab (it had a blank line at the bottom):


Code: [Select]
# /etc/fstab: static file system information.
#MUST HAVE BLANK LINE AT BOTTOM
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
#noatime, added for SSD TRIM by pb, 7/2015
UUID=821f7efc-9a0e-482a-a750-0a393503d99e /               ext4    noatime,errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=f0a720b2-5678-48de-b5f4-088e0e8d3e2c none            swap    sw              0       0
#
#NTFS Partitions automount:
# Seagate 400:
UUID=A0103FFB103FD74E /home/paul/seagate400 ntfs defaults,umask=007, uid=1000, gid=1000 0 0
#Seagate 520:
UUID=60426C51426C2E4A /home/paul/seagate520 ntfs defaults,umask=007, uid=1000, gid=1000 0 0
#WD 2TB:
UUID=D872AA8A72AA6D46 /home/paul/wd2000 ntfs defaults,umask=007, uid=1000, gid=1000 0 0


And here is a pic of the permissions (all three folders had exactly the same permissions):


(http://s5.postimg.org/dgrw9zdev/perms.png)


If this prints well then the problem was with postimage's forum url.


Thanks for your time.
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 07:29:45 PM
Those UUID's don't look right at all. They should be something like '4f9e3858-d3f2-49da-8504-c728c7ccee88' instead yours are like 'A0103FFB103FD74E' Can you check again with the sudo blkid command please. Also check the formatting of your fstab. Each block of info should be proceeded by a tab eg.

You have: UUID=A0103FFB103FD74E /home/paul/seagate400 ntfs defaults,umask=007, uid=1000, gid=1000 0 0

Should be: UUID=D872AA8A72AA6D46    /home/paul/wd2000    ntfs        defaults,umask=007,uid=1000,gid=1000    0    0

looks like you've just put a space instead of a tab.

You also have spaces after these: umask=007, uid=1000, gid=1000
when there should be none. Should be: umask=007,uid=1000,gid=1000

Much to work on here.
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 07:34:38 PM
Permissions look good, just need to change the above mentioned fstab.
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 07:35:53 PM

If this prints well then the problem was with postimage's forum url.


Try to use imgur.com instead as the Guidelines state. Then you wont have any issues :)
Title: Re: Need to authenticate before accessing internal drives
Post by: paul1149 on July 29, 2015, 07:49:36 PM
Ok, bingo. I hadn't realized that lines in fstab must be contiguous, delimited only by tabs. Once I substituted tabs for spaces, and took out the spaces after the commas, I was in. Two folders were already mounted so I just rebooted to wipe the slate clean, and it's perfect now.


I did note that the UUIDs looked different from those of the ext4 partitions on the system, so I double checked and it is accurate.


If imgur is a hard and fast rule here let me know and I will comply. But I have to say that I detest the interface there. Postimage.org is so very simple. To get it to work one has to use the Direct Link, though, and then submit it to this forum's image insert facility.


Thanks so much for lending me your valuable time.


BTW, I installed LL on an HP netbook today. Went very well. Speaking of fstab, though, is it necessary to go through the TRIM procedure there and via command line for the sake of the SSD?


Paul
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 07:56:34 PM
fastb - glad it's working. Only reboot once the sudo mount -a stops producing errors. If you try to reboot on a broken fstab, you won't be able to boot your pc :(

Imgur - it's not a hard and fast rule, but it would have saved you and I some time. We always try to give the best advice for members :)

Trim SSD - use this command to check if Trim is supported:

Code: [Select]
sudo hdparm -I /dev/sda | grep "TRIM supported"
If it is, follow the guide in the Help Manual :) If you don't Trim, your SSD life will be reduced, so it's a must do given their cost.

Type carefully in the fstab and always check with sudo mount -a before rebooting :)
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 08:03:07 PM
Also re. postimage.org the quality is terrible:

Your image on postimage.org:

(http://s5.postimg.org/dgrw9zdev/perms.png)

Same permissions tab on imgur.com:

(http://i.imgur.com/RtpcwEi.png)
Title: Re: Need to authenticate before accessing internal drives
Post by: paul1149 on July 29, 2015, 08:03:35 PM
Thanks again. Yes, I did find out the hard way that fstab really is finicky. But it was easy to go in and edit it via the install disk.


I will continue then with postimage, but I will preview each post before sending it in.


Thanks for that TRIM command. I don't think I saw that in the manual, and will save it in my notes.


And thanks for your work on LL.


BW,
Paul
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 08:05:15 PM
You're welcome Paul. I cringe at your choice of postimage.org, but we can't force you not to use it.

Happy computing :)
Title: Re: Need to authenticate before accessing internal drives
Post by: paul1149 on July 29, 2015, 08:05:32 PM
That is a good point about pic quality. I will look into that.




Ok, I'm an imgur convert...  8)
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 29, 2015, 08:11:15 PM
That is a good point about pic quality. I will look into that.

Thank you, it will certainly motivate people to help you more when you provide good quality, clear images :)
Title: Re: Need to authenticate before accessing internal drives
Post by: N4RPS on July 30, 2015, 12:13:49 AM
Hello!

Trim SSD - use this command to check if Trim is supported:

Code: [Select]
sudo hdparm -I /dev/sda | grep "TRIM supported"
If it is, follow the guide in the Help Manual :) If you don't Trim, your SSD life will be reduced, so it's a must do given their cost.

Type carefully in the fstab and always check with sudo mount -a before rebooting :)

After carefully following the Help Manual instructions on how to do this, at the next reboot, booting stopped at this point:

"Starting Bridge socket events into upstart".

I had to restore from a backup to be able to boot again. This time, I skipped the log creation in rc.local, and it booted.

I thought I had typed all that verbatim, leaving out the partitions I didn't have. I only have one partition here, '/', to make things easier.

I'm not sure that the additional command in rc.local will work for me, but to reduce typos, can it be made to 'cut-and-paste'? I could then cut/paste it into a text editor to make my changes...

73 DE N4RPS
Rob
Title: Re: Need to authenticate before accessing internal drives
Post by: Jerry on July 30, 2015, 04:11:30 AM
Here's my rc.local:

Code: [Select]
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

LOG=/var/log/trim.log
echo “*** $(date -R) ***” >> $LOG
fstrim -v /boot >> $LOG
fstrim -v / >> $LOG
fstrim -v /home >> $LOG
fstrim -v /sparessd >> $LOG
echo " " >> $LOG

exit 0
Title: Re: Need to authenticate before accessing internal drives
Post by: N4RPS on July 30, 2015, 05:54:20 AM
Hello!

Thanks, Jerry. We'll give it another shot.

If it doesn't work for me again, it's no big deal. Redo and 25 minutes are all I need to be 'back on the air'. SSD + USB3 external HD = AWESOME!

73 DE N4RPS
Rob
Title: Re: Need to authenticate before accessing internal drives
Post by: Wirezfree on July 31, 2015, 02:50:37 PM
The SSD Trim came up in one of my post's, can't find it.
Here's how I do trim on my SSD's, see the
"Using a daily cron job - recommended" method in this link

http://www.webupd8.org/2013/01/enable-trim-on-ssd-solid-state-drives.html (http://www.webupd8.org/2013/01/enable-trim-on-ssd-solid-state-drives.html)

I read doing it in fstab causes a "trim" on each file delete, probably a bit excessive

Dave
Title: Re: Need to authenticate before accessing internal drives
Post by: paul1149 on July 31, 2015, 04:23:11 PM
To my eye, this is a better method, not least because it has a positive test that it is working. But I'm stuck in this line:

Code: [Select]
gksu gedit /etc/cron.daily/trim
What is the equivalent of that in LL? Leafpad only creates a text file, rather than a script.

Thanks.
Title: Re: Need to authenticate before accessing internal drives
Post by: Wirezfree on July 31, 2015, 04:50:14 PM
Hi,

Use:
Code: [Select]
gksu leafpad /etc/cron.daily/trim
Leafpad is LL text editor
Title: Re: Need to authenticate before accessing internal drives
Post by: paul1149 on July 31, 2015, 05:07:56 PM
Ok, I think I have it now. Will check the log in a few days to verify.

Thanks much.