(SOLVED) blkid behavior has changed

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
Larry78723
Level 8
Level 8
Posts: 2144
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

(SOLVED) blkid behavior has changed

Post 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.
Image
User avatar
ricardogroetaers
Level 4
Level 4
Posts: 374
Joined: Sat Oct 27, 2018 3:06 am
Location: Rio de Janeiro, Brasil

Re: (SOLVED) blkid behavior has changed

Post 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.
tenfoot
Level 6
Level 6
Posts: 1067
Joined: Sun Jun 03, 2007 4:12 am
Location: Waipapa, Bay of Islands, New Zealand

Re: (SOLVED) blkid behavior has changed

Post 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\
tenfoot
"Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds darkness always got there first, and is waiting for it." Terry Pratchett (Reaper Man)
User avatar
AndyMH
Level 13
Level 13
Posts: 4534
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: (SOLVED) blkid behavior has changed

Post 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 :)
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate
User avatar
Larry78723
Level 8
Level 8
Posts: 2144
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: (SOLVED) blkid behavior has changed

Post by Larry78723 »

Andy, that would explain what happened to me. I tried to do a blkid shortly after clearing my cache. :oops:
Image
gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: (SOLVED) blkid behavior has changed

Post 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 ;)
User avatar
AndyMH
Level 13
Level 13
Posts: 4534
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: (SOLVED) blkid behavior has changed

Post by AndyMH »

Okay, I was half right :)
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate
User avatar
Larry78723
Level 8
Level 8
Posts: 2144
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: (SOLVED) blkid behavior has changed

Post 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.
Image
gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: (SOLVED) blkid behavior has changed

Post 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
User avatar
Larry78723
Level 8
Level 8
Posts: 2144
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: (SOLVED) blkid behavior has changed

Post by Larry78723 »

gm10, thanks for that. Much easier to remember. :D
Image
Post Reply

Return to “Newbie Questions”