Reputation: 11
I am trying to mount a shared drive by using os.system() in python. The problem is, that the installed linux version has no sudo command. Installing a sudo-package has failed. When using the command su, I am getting an error that it must be used with suid. I can't chmod +s because I have no root.
Any ideas? Mods? Or Buffer Overflow is the only solution here? =)
Thank you in advance.
Upvotes: 0
Views: 1131
Reputation: 2830
You could try fuse: http://fuse.sourceforge.net/
It depends on what exactly you want to mount whether there is a fuse-module which is capable of doing so.
And of course it has to be installed.
Upvotes: 0
Reputation: 9487
You can't mount without root privileges (except in some circumstances, see below.) If you have no privileges on that machine, you have to ask the administrator.
What an administrator can do is insert certain mount points into /etc/fstab
and mark them user
. An administrator could also install sudo
for you and allow you to execute sudo mount
.
Python has no way (and shouldn't have a way) to circumvent these basic security features.
Upvotes: 3