Linked Questions

1 vote
2 answers
3k views

How to give a non sudoer access to a kernel module special device file?

Is it possible to access a kernel module if a user is not sudoer? I am trying to access a KVM, which is kernel module, as non-sudoer but I am getting an error: Could not access KVM kernel module: ...
user298350's user avatar
0 votes
3 answers
6k views

How to run a python script with sudo without being prompted for a password [duplicate]

I have a python script that restarts the mouse driver import os os.system("sudo modprobe -r psmouse") os.system("sudo modprobe psmouse") since my mouse doesn't always show up on start. What is a ...
Chase Mussleman's user avatar
5 votes
2 answers
2k 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 ...
nwalke's user avatar
  • 366
1 vote
5 answers
1k views

Download aborted when computer went to sleep

I was downloading a large file in my browser when my computer went to sleep. The download was lost. Any way to prevent that?
fixit7's user avatar
  • 3,117
2 votes
2 answers
3k 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 ...
Colin Matheson's user avatar
1 vote
1 answer
3k views

Sudo execute command in Pythonscript

I want to sudo a command from a pythonscript without hardcoding my password in it. The Pythonscript is part of a webservice on Apache2. Since it is part of a webservice, asking the user each time for ...
SgtPepper88's user avatar
0 votes
1 answer
2k views

After using tablet mode touchpad and keyboard not responding on Aspire R13 - Ubuntu 15.10

I am working on an Acer Aspire R13 and everything is working fine until I close my lid to tablet (so the lid is closed but the screen is on top). After I do, touchpad and keyboard are not responding ...
narranoid's user avatar
2 votes
1 answer
2k 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 ...
Scott's user avatar
  • 428
0 votes
1 answer
320 views

How to bypass sudo password for everything inside a script?

I have a PADD setup on my Raspberry Pi 3 running on Ubuntu Server 20.04. I can successfully bypassed sudo password authentication by adding: pihole_display ALL=(ALL) NOPASSWD:ALL But when I try to ...
YamiYukiSenpai's user avatar
0 votes
1 answer
295 views

What are the files needs to be edit to add a user? and what to be write?

I am trying to write a C program to add a new user to my Ubuntu 14.04. I edited 1) /etc/passwd sachin:x:65535:1:sachin:/home/sachin:/bin/bash 2) /etc/shadow sachin:$6$VwBWgroA$t4KXLWIf81sWtiA1/a....
mr.Cracker's user avatar
0 votes
1 answer
280 views

run ap-hotspot commands from a saved file

How can I create a text file to automatically run these commands: sudo ap-hotspot start sudo ap-hotspot configure sudo ap-hotspot stop sudo ap-hotspot restart One file for each command. I tried ...
Ciprian's user avatar
1 vote
0 answers
264 views

Problem with gnome-terminal, but not with xterm?

I have a script called start-hotspot-terminal.sh. The text in it is: #! /bin/bash x-terminal-emulator -e "sudo /home/user/tools/start-hotspot.sh; read -p 'Press [Enter] to close terminal.';" There ...
John Red's user avatar
  • 869
1 vote
3 answers
200 views

How can i make a selfstarting script [duplicate]

I have an TL-WN727N wireless adapter connected to my laptop. Every time I start my laptop I must manually enter those two commands in a terminal: echo 'install rt2800usb modprobe --ignore-install ...
KralingenC's user avatar
0 votes
1 answer
169 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 swaps....
Blue Ice's user avatar
  • 381

15 30 50 per page
1
2