Trouble with executing a bash with sudo privileges
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I wrote a script that prompts me in dmenu the availible drives to mount or unmount and I added to the with visudo
the following line
ALL ALL = NOPASSWD: /path/to/usb-mount
and the script basically takes decisions, and it executes one of this two lines
sudo mount $drive $target
sudo umount $drive
and I have a key binding that executes the command like
sudo /path/to/usb-mount
and well, It runs, it doesn't mount the drive, but if I run the script in the terminal, with sudo
, runs the script and does mount.
Any Idea what I need to do?
Supposedly (to my understanding) If I run sudo
all subsequent actions take sudo
privileges.
Any help?
bash mount sudo
New contributor
add a comment |Â
up vote
0
down vote
favorite
I wrote a script that prompts me in dmenu the availible drives to mount or unmount and I added to the with visudo
the following line
ALL ALL = NOPASSWD: /path/to/usb-mount
and the script basically takes decisions, and it executes one of this two lines
sudo mount $drive $target
sudo umount $drive
and I have a key binding that executes the command like
sudo /path/to/usb-mount
and well, It runs, it doesn't mount the drive, but if I run the script in the terminal, with sudo
, runs the script and does mount.
Any Idea what I need to do?
Supposedly (to my understanding) If I run sudo
all subsequent actions take sudo
privileges.
Any help?
bash mount sudo
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I wrote a script that prompts me in dmenu the availible drives to mount or unmount and I added to the with visudo
the following line
ALL ALL = NOPASSWD: /path/to/usb-mount
and the script basically takes decisions, and it executes one of this two lines
sudo mount $drive $target
sudo umount $drive
and I have a key binding that executes the command like
sudo /path/to/usb-mount
and well, It runs, it doesn't mount the drive, but if I run the script in the terminal, with sudo
, runs the script and does mount.
Any Idea what I need to do?
Supposedly (to my understanding) If I run sudo
all subsequent actions take sudo
privileges.
Any help?
bash mount sudo
New contributor
I wrote a script that prompts me in dmenu the availible drives to mount or unmount and I added to the with visudo
the following line
ALL ALL = NOPASSWD: /path/to/usb-mount
and the script basically takes decisions, and it executes one of this two lines
sudo mount $drive $target
sudo umount $drive
and I have a key binding that executes the command like
sudo /path/to/usb-mount
and well, It runs, it doesn't mount the drive, but if I run the script in the terminal, with sudo
, runs the script and does mount.
Any Idea what I need to do?
Supposedly (to my understanding) If I run sudo
all subsequent actions take sudo
privileges.
Any help?
bash mount sudo
bash mount sudo
New contributor
New contributor
New contributor
asked 9 mins ago
ekiim
11
11
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
ekiim is a new contributor. Be nice, and check out our Code of Conduct.
ekiim is a new contributor. Be nice, and check out our Code of Conduct.
ekiim is a new contributor. Be nice, and check out our Code of Conduct.
ekiim is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474952%2ftrouble-with-executing-a-bash-with-sudo-privileges%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password