Jump to content

Sorry if this is trivial and not worth a topic but i've searched online and asked chatgpt for quite a bit and don't seem to be able to solve this issue. Appreciate if anyone here can help.

I know it might not be secure, yeah vibecoding is cool but we shouldnt do smt unless we understand it and etc. thx but these disclaimers get old quick. maybe we shall be reminded frequently for we are stupid but i dont work at a nuclear powerplant.

Link to comment
https://linustechtips.com/topic/1617667-mount-drives-without-root-on-linux/
Share on other sites

Link to post
Share on other sites

1 hour ago, Dutch_Master said:

Short answer: you can't.

 

Long answer: try explaining what you want to achieve and why.

basically i have to enter my password whenever i wanna mount the drives and thats annoying 

I know it might not be secure, yeah vibecoding is cool but we shouldnt do smt unless we understand it and etc. thx but these disclaimers get old quick. maybe we shall be reminded frequently for we are stupid but i dont work at a nuclear powerplant.

Link to post
Share on other sites

1 hour ago, apoyusiken said:

basically i have to enter my password whenever i wanna mount the drives and thats annoying 

So you know the password? Why not set it to automount on boot? 

| Intel i7-3770@4.2Ghz | Asus Z77-V | Zotac 980 Ti Amp! Omega | DDR3 1800mhz 4GB x4 | 300GB Intel DC S3500 SSD | 512GB Plextor M5 Pro | 2x 1TB WD Blue HDD |
 | Enermax NAXN82+ 650W 80Plus Bronze | Fiio E07K | Grado SR80i | Cooler Master XB HAF EVO | Logitech G27 | Logitech G600 | CM Storm Quickfire TK | DualShock 4 |

Link to post
Share on other sites

9 hours ago, Dutch_Master said:

Short answer: you can't.

Yes you can. Just use udisks and set the correct polkit permissions.

 

https://wiki.archlinux.org/title/Udisks

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to post
Share on other sites

13 hours ago, xAcid9 said:

So you know the password? Why not set it to automount on boot? 

 

13 hours ago, Thomas53 said:

Depending on which version of Linux you're using, names differ, but under Settings, there should be something like 'Drives and Devices" which lets you automount external drives and gives you some options on what happens when they do.

yea but i dont exactly wanna automount.

I know it might not be secure, yeah vibecoding is cool but we shouldnt do smt unless we understand it and etc. thx but these disclaimers get old quick. maybe we shall be reminded frequently for we are stupid but i dont work at a nuclear powerplant.

Link to post
Share on other sites

6 hours ago, Sauron said:

Yes you can. Just use udisks and set the correct polkit permissions.

 

https://wiki.archlinux.org/title/Udisks

chatgpt mentioned this and i tried it but doesnt seem to work. 

I know it might not be secure, yeah vibecoding is cool but we shouldnt do smt unless we understand it and etc. thx but these disclaimers get old quick. maybe we shall be reminded frequently for we are stupid but i dont work at a nuclear powerplant.

Link to post
Share on other sites

All that automount does is tells you that the disk is there and ready to use.

You have the ability, using permissions to limit access to anyone you can simply change the permissions to the drive and allow only root to access it, allow only a certain group of users, or an individual user to access it.  You can also,allow read only to non-root users so that they can't add, edit or remove files.

Link to post
Share on other sites

1 hour ago, Ralphred said:

Define "without root" in more depth pls, like do you have no root access, or just want it to happen transparently?

i dont wanna enter my password everytime i wanna mount basically

29 minutes ago, Thomas53 said:

All that automount does is tells you that the disk is there and ready to use.

You have the ability, using permissions to limit access to anyone you can simply change the permissions to the drive and allow only root to access it, allow only a certain group of users, or an individual user to access it.  You can also,allow read only to non-root users so that they can't add, edit or remove files.

i dont care about security i would completely terminate the root thing if i could. (I tried but couldnt succeed)

I know it might not be secure, yeah vibecoding is cool but we shouldnt do smt unless we understand it and etc. thx but these disclaimers get old quick. maybe we shall be reminded frequently for we are stupid but i dont work at a nuclear powerplant.

Link to post
Share on other sites

7 minutes ago, apoyusiken said:

i dont wanna enter my password everytime i wanna mount basically

You should be able to do this using udev rules to slacken the security permissions on drives when they are added, but you *do* want to be careful about not slackening static system drive security

Add a drive, use dmesg to get its sd<X> designation, the post the output of ls -l /dev/sd<X>*

Also post lsblk output with no extra drives attached, so this "dodgy security hack" isn't hackier than it needs to be, then we can start on a udev rule.

Link to post
Share on other sites

15 minutes ago, Ralphred said:

You should be able to do this using udev rules to slacken the security permissions on drives when they are added, but you *do* want to be careful about not slackening static system drive security

Add a drive, use dmesg to get its sd<X> designation, the post the output of ls -l /dev/sd<X>*

Also post lsblk output with no extra drives attached, so this "dodgy security hack" isn't hackier than it needs to be, then we can start on a udev rule.

this should do?

Screenshot_2025-07-15_00-19-25.png

I know it might not be secure, yeah vibecoding is cool but we shouldnt do smt unless we understand it and etc. thx but these disclaimers get old quick. maybe we shall be reminded frequently for we are stupid but i dont work at a nuclear powerplant.

Link to post
Share on other sites

Let me see if I'm understanding what you want to, 

You don't want the drive to automount, while not needing root access to mount the drive, but you want to be able to access an unmounted drive. 

 

It's impossible as no OS allows for that.

 

Your only choices is to use udev commands, as stated above, or go into your settings and follow the instructions I've given. 

 

Depending on WHICH flavor or Linux your using, you can either have the drive appear on your home screen on remain hidden, requiring you to go into your file manager and mount the drives. Again as root you can make the drives inaccessible to the user, by not giving them access.

 

The easiest way is to boot as the root user and right click on the drives icon and under Properties click the Permissions tab and, if you want only Root to have access the drive, in Others choose 'None'.

 

But, since you're hopefully not using root as your daily user. under Group, find the name of the user and give yourself read & write privileges to make it available for your daily use. 

 

Then depending on the Owner, you can change the name, with the chown command. 

 

You can do this also if you're the user listed as Owner

 

ROOT WILL ALWAYS HAVE ACCESS, REGARDLESS OF WHAT YOU WANT, the system is made that way and there's nothing that can be done.

Link to post
Share on other sites

32 minutes ago, Thomas53 said:

Let me see if I'm understanding what you want to, 

You don't want the drive to automount, while not needing root access to mount the drive, but you want to be able to access an unmounted drive. 

 

It's impossible as no OS allows for that.

 

Your only choices is to use udev commands, as stated above, or go into your settings and follow the instructions I've given. 

 

Depending on WHICH flavor or Linux your using, you can either have the drive appear on your home screen on remain hidden, requiring you to go into your file manager and mount the drives. Again as root you can make the drives inaccessible to the user, by not giving them access.

 

The easiest way is to boot as the root user and right click on the drives icon and under Properties click the Permissions tab and, if you want only Root to have access the drive, in Others choose 'None'.

 

But, since you're hopefully not using root as your daily user. under Group, find the name of the user and give yourself read & write privileges to make it available for your daily use. 

 

Then depending on the Owner, you can change the name, with the chown command. 

 

You can do this also if you're the user listed as Owner

 

ROOT WILL ALWAYS HAVE ACCESS, REGARDLESS OF WHAT YOU WANT, the system is made that way and there's nothing that can be done.

ok hold up.

you got me wrong, i just wanted to mount without password, but it's irrelevant cuz hear me out here. i didnt realize i could boot as root and now im totally tempted to do it 😅. so it is discouraged because i can brick my system? well i would rather be extra careful than having to enter my password all the time. im not afraid to brick it anyways, i wont render my pc useless anyways will i? 

I know it might not be secure, yeah vibecoding is cool but we shouldnt do smt unless we understand it and etc. thx but these disclaimers get old quick. maybe we shall be reminded frequently for we are stupid but i dont work at a nuclear powerplant.

Link to post
Share on other sites

9 hours ago, apoyusiken said:

ok hold up.

you got me wrong, i just wanted to mount without password, but it's irrelevant cuz hear me out here. i didnt realize i could boot as root and now im totally tempted to do it 😅. so it is discouraged because i can brick my system? well i would rather be extra careful than having to enter my password all the time. im not afraid to brick it anyways, i wont render my pc useless anyways will i? 

Aside from being a really bad idea because yes, you can easily destroy your operating system by logging in as root and it leaves you wide open to all sorts of security exploits, many programs will just refuse to run as root for security reasons.

 

Causing physical damage accidentally is difficult but nonetheless POSSIBLE as root. If you run a malicious program as root it can absolutely kill your system by overvolting your cpu or gpu.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to post
Share on other sites

1 hour ago, Sauron said:

Aside from being a really bad idea because yes, you can easily destroy your operating system by logging in as root and it leaves you wide open to all sorts of security exploits, many programs will just refuse to run as root for security reasons.

 

Causing physical damage accidentally is difficult but nonetheless POSSIBLE as root. If you run a malicious program as root it can absolutely kill your system by overvolting your cpu or gpu.

still a risk i would be willing to take. 

 

as far as i see the whole root thing is meant for servers not desktop users.

1 hour ago, Sauron said:

many programs will just refuse to run as root for security reasons

i dont completely understand wym, will booting as root bring new ux issues?

I know it might not be secure, yeah vibecoding is cool but we shouldnt do smt unless we understand it and etc. thx but these disclaimers get old quick. maybe we shall be reminded frequently for we are stupid but i dont work at a nuclear powerplant.

Link to post
Share on other sites

39 minutes ago, apoyusiken said:

still a risk i would be willing to take. 

 

as far as i see the whole root thing is meant for servers not desktop users.

i dont completely understand wym, will booting as root bring new ux issues?

Give it a try and maybe you will understand. 

| Intel i7-3770@4.2Ghz | Asus Z77-V | Zotac 980 Ti Amp! Omega | DDR3 1800mhz 4GB x4 | 300GB Intel DC S3500 SSD | 512GB Plextor M5 Pro | 2x 1TB WD Blue HDD |
 | Enermax NAXN82+ 650W 80Plus Bronze | Fiio E07K | Grado SR80i | Cooler Master XB HAF EVO | Logitech G27 | Logitech G600 | CM Storm Quickfire TK | DualShock 4 |

Link to post
Share on other sites

51 minutes ago, apoyusiken said:

as far as i see the whole root thing is meant for servers not desktop users.

No. It's fundamental to the way Linux user management works.

52 minutes ago, apoyusiken said:

i dont completely understand wym, will booting as root bring new ux issues?

Some programs will _literally_ not work if you try to run them as root, at least not without tinkering. This includes most web browsers.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to post
Share on other sites

On 7/14/2025 at 2:16 AM, apoyusiken said:

basically i have to enter my password whenever i wanna mount the drives and thats annoying 

By the way if this is the only problem then you can just disable sudo password authentication for your user

 

https://wiki.archlinux.org/title/Sudo#Example_entries

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to post
Share on other sites

Think of Linux this way.

You live in a HOA with strict laws that forbid you to do anything outside your home and limit you to what you can do to the inside of your home that can be seen as unsightly from the outside. 

 

You can, do normal household chores and do some interior redecorating, but you need permission to do things like re-plumb, add exterior walls, plants and such, even as a professional, without asking for and getting getting explicit permission.

 

Windows is like, Hey do whatever you want, you're the boss. What to build a slaughterhouse in the middle of the neighborhood, go for it, we don't care, you're the boss and don't need permission to do anything, including doing things that will make your house collapse in on itself, by severing the main beams the hold the house up.

 

Apple is the same way, but makes you go through a couple more steps.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×