Page 1 of 1

(SOLVED) blkid behavior has changed

Posted: Sun Sep 15, 2019 5:34 pm
by Larry78723
I used to be able to open a terminal and run blkid and get the results, suddenly I'm forced to use sudo blkid to get any output. Can anyone explain what might have changed?

TIA,
Larry

EDIT: I checked my .sudo_as_admin_successful file and it had changed from Binary type to Text type. Copied it from another machine with the same login credentials and now back to retrieving data with just blkid.

Re: (SOLVED) blkid behavior has changed

Posted: Mon Sep 16, 2019 1:13 am
by ricardogroetaers
Note:
On my Mint 18.3 XFCE 64-bit system, using blkid with sudo or no sudo is the same.
The file ".sudo_as_admin_successful" is an empty file with no content, zero bits.

Re: (SOLVED) blkid behavior has changed

Posted: Mon Sep 16, 2019 4:18 am
by tenfoot
Which version of LM are you using?

I'm using LM v19.2 MATE and blkid works and displays correctly without having to use sudo

Code: Select all

lm-19:~$ blkid
/dev/sda3: UUID="a18e3871-043e-46c7-a757-29c27c3a29a8" TYPE="swap" PARTUUID="3d603f5d-03"
/dev/sda5: LABEL="LM 19.1 Mate" UUID="760c4bc1-3248-4161-9fdd-9d47b7d14da8" TYPE="ext4" PARTUUID="3d603f5d-05"
/dev/sdb1: LABEL="Data" UUID="70783429-bd9d-467f-ad32-682fd3768c93" TYPE="ext4" PARTUUID="0000ba78-01"
/dev/sdc1: LABEL="USB-HDD" UUID="F869-5144" TYPE="vfat" PARTUUID="5f1c9600-01"[/code\

Re: (SOLVED) blkid behavior has changed

Posted: Mon Sep 16, 2019 5:30 am
by AndyMH
There was a recent post, might have been gm10, that suggested without sudo it just reads the cache whereas with sudo it rereads the physical devices. Of course could have got this completely wrong :)

Re: (SOLVED) blkid behavior has changed

Posted: Mon Sep 16, 2019 8:26 am
by Larry78723
Andy, that would explain what happened to me. I tried to do a blkid shortly after clearing my cache. :oops:

Re: (SOLVED) blkid behavior has changed

Posted: Mon Sep 16, 2019 8:39 am
by gm10
AndyMH wrote:
Mon Sep 16, 2019 5:30 am
There was a recent post, might have been gm10, that suggested without sudo it just reads the cache whereas with sudo it rereads the physical devices. Of course could have got this completely wrong :)
Nope, that was it, the post was here and in it I quoted the blkid manual, which explains all this. So, RTFM. SCNR ;)

Re: (SOLVED) blkid behavior has changed

Posted: Mon Sep 16, 2019 11:07 am
by AndyMH
Okay, I was half right :)

Re: (SOLVED) blkid behavior has changed

Posted: Mon Sep 16, 2019 12:34 pm
by Larry78723
BTW, I find that the following command will work best for me:

Code: Select all

lsblk -o NAME,SIZE,FSTYPE,UUID,MOUNTPOINT
It gives me all the info I need in most situations and doesn't rely on the cache.

Re: (SOLVED) blkid behavior has changed

Posted: Mon Sep 16, 2019 12:41 pm
by gm10
Larry78723 wrote:
Mon Sep 16, 2019 12:34 pm
BTW, I find that the following command will work best for me:

Code: Select all

lsblk -o NAME,SIZE,FSTYPE,UUID,MOUNTPOINT
It gives me all the info I need in most situations and doesn't rely on the cache.
nearly the same but much easier to write and remember:

Code: Select all

lsblk -f

Re: (SOLVED) blkid behavior has changed

Posted: Mon Sep 16, 2019 2:19 pm
by Larry78723
gm10, thanks for that. Much easier to remember. :D