Linked Questions

2
votes
1answer
21k views

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 ...
1
vote
2answers
377 views

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 ...
1
vote
1answer
231 views

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 ...
1
vote
0answers
54 views

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/flash.sh #!/bin/bash - cd ~/tools sudo ~/tools/fastboot-HW.sh ...
0
votes
0answers
34 views

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.
4
votes
2answers
630 views

Run script at user login as root, with a catch

I'm trying to run a PHP script as root on user login. The PHP script adds a Samba share to the Samba config, thus the need for root privileges. The only issue here, is that the user doesn't exist ...
1
vote
1answer
923 views

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 ...
2
votes
2answers
681 views

Can I get Network Manager to unload/load the wireless driver?

Sometimes my wireless loses connection and will not reconnect. However, I find it will reconnect when I open terminal and run sudo modprobe -r nameOfDriver sudo modprobe nameOfDriver However, going ...
-3
votes
2answers
192 views

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 ...
1
vote
3answers
609 views

Running a Script on connecting USB device

Please don't mark this as duplicate as this is a different question! 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 ...
0
votes
1answer
170 views

Two users - how do I automount a Samba share for one user but not the other?

TLDR: I want to configure a box that is running Ubuntu Desktop and has two users so that it automounts a password protected Samba share when one user logs in, and doesn't when the other logs in. Long ...
0
votes
1answer
107 views

Swap drive not turning on when I log in

Recently I added a new 40GB hard drive as swap. I want the swap to be enabled when the computer logs me in. I followed the directions here to make the swap command run on start up. I added ...

15 30 50 per page