Linked Questions

25 votes
1 answer

How to run Bash script as root with no password? [duplicate]

Possible Duplicate: How do I use sudo in my script without needing a password? I want to run a bash script as root with no password prompt. I tried visudo with no luck(your_username ALL=(ALL) ...
Vromoth's user avatar
  • 721
1 vote
1 answer

How to run a command that requires sudo at login [duplicate]

I made a script that controls my system LEDs and it works great. I saved it to /usr/local/bin/led-pattern and ran sudo chmod a+x /usr/local/bin/led-pattern so its executable simply by entering the ...
cheesits456's user avatar
  • 1,284
-1 votes
2 answers

Suspend SUDO in Bash Script? [duplicate]

I have bash-script that uses sudo commands, but in the middle I need to stop sudo-influence and then later reinstate it. Very simple version using Pseudo code sudo apt-get install -y synaptic sudo ....
LinuxFerLife's user avatar
1 vote
2 answers

How to create a script file to input password? [duplicate]

Possible Duplicate: How do I sudo a command in a script without being asked for a password? I have a small script file, to run Nautilus as root. that reads: gksu nautilus and it prompts for ...
StanP's user avatar
  • 211
1 vote
1 answer

command which takes in password as argument? [duplicate]

Is there any bash command or technique through which we can enter in password alongwith the command which requires the password of superuser? for e.g sudo apt-get install kde <password> I am ...
MKJ's user avatar
  • 1,569
1 vote
1 answer

Run part of a command with sudo [duplicate]

I want to create a keybinding Ctrl+Alt+Delete on my Ubuntu PC. It should open htop, but I want maximum priority for it. I use this command. xterm -fullscreen -fa 'Monospace' -fs 13 -e htop It works ...
FK-VH's user avatar
  • 188
1 vote
0 answers

Execute custom bash script with sudo without passwd prompt [duplicate]

I run ubuntu-12.04 desktop x86_64. I have a simple script that needs to be accessible from the Desktop and run as root: $ cat ~/Desktop/ #!/bin/bash - cd ~/tools sudo ~/tools/ ...
m-ric's user avatar
  • 345
0 votes
0 answers

Applying password with command in Terminal [duplicate]

Is there an option to apply a password with the command in the terminal? Somethhing like: sudo some-command -pass=mypass I'm just curious, I know that this is not safe.
Aleksandar's user avatar
0 votes
0 answers

Custom script not working as expected in ubuntu [duplicate]

I wrote a java application, want to register it as a service, so wrote a bash script in /etc/init.d/. Here is the script: #!/bin/sh # # chkconfig: 345 50 83 # ### BEGIN INIT INFO # Short ...
Ajay Kulkarni's user avatar
14 votes
2 answers

Running a script when connecting a USB device

I am trying to run a script whenever a pendrive is connected to my system. I followed this and this question and it is working, but there are still some problems. This is my udev rules file: ACTION==&...
Null pointer's user avatar
  • 2,547
-1 votes
2 answers

How to login in terminal as root anytime when I open terminal?

I don't want to type sudo and my password everytime.I think it is really annoying.Is there any command or option which will consider you root user when you open terminal,everytime When you open ...
4M01's user avatar
  • 553
0 votes
2 answers

execute shell script without entering password

I want to execute a script that requires root privileges without entering a password. There are similar questions/answers but non seems to work for me. I placed my script in /home/kf/bin (I added the ...
kasper Taeymans's user avatar
3 votes
2 answers

Mount samba share at login using startup script (not fstab)

Background I'm trying to automatically execute a command that mounts a password protected Samba share when my user logs in. The catch is, I share my laptop with another user, and I don't want the ...
Scott's user avatar
  • 428
6 votes
3 answers

How do I tell a shell script my password?

I've been trying to create a script that runs sudo apt-get update and sudo apt-get autoremove whenever I log in. It goes like this: #!/bin/bash (sudo apt-get update) (sudo apt-get autoremove) But ...
It's Willem's user avatar
4 votes
2 answers

Microsoft Arc Mouse (Bluetooth) stops scrolling after suspend Ubuntu 19.04

Update: Upgrading to Ubuntu 20.04.1 has now permanently resolved this issue for me. Edit: This is more complicated than I first noted. I don't only lose the scrolling capability on suspend, it is also ...
RaidPinata's user avatar

15 30 50 per page