General :: Startup - Automate "sudo Chmod A+r /dev/usb/hiddev0" Upon Start?
Oct 22, 2010
I have a footpedal and fortunately there is a software for using it under linux (see [URL]). The author of that software already solved an issue for me (see issues there), but there is no option to ask simpler questions.
Unfortunately prior to use the software I have to change the device permission each time I start linux. How could I change that to be done automatically at startup?
View 4 Replies
ADVERTISEMENT
Jul 27, 2010
Recently i was fixing a permissions error on my home folder. In the process i ran accidentally chmod 777 in the root directory. BIG mistake. Now i cant run sudo, or start network manager. I am currently on vacation and made a bootable version ov ubuntu on my flash drive, but i wouldn't boot. I think it is because i chmod'ed the grub folder (with is in the root) I have a boot CD a home, but is there anyway to fix it beforehand?
View 7 Replies
View Related
Feb 9, 2011
i want to automate sudo su - user command from a script...it will then ask for a password...how do i automate this?
View 3 Replies
View Related
May 31, 2011
I have written a script to run commands on remote servers, it is working fine. But when I am running "sudo commands" on the remote servers, it asks for me password after prompting for ssh password. I am unable to automate this password prompt (which is just after ssh password prompt). This is the function I am using to provide passwords
Code:
pass ()
{
cd $DIR/"$dt1"_"$dt"
/usr/bin/perl << 'EOF'
use strict;
[code]....
I want the same function to be used , when it expects for sudo passwords for any of the below lines:
Code:
[sudo] password for vikas: orPassword: This is my "cmd" file passed in pass () function.
Code:
ssh -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 192.168.1.100 "bash rcmds"
This is my script output
Quote:
[vikas@box1 ~]$ ./rscript.sh
++ rm -rf /home/vikas/May_31
++ mkdir -p /home/vikas/May_31
++ set +x
[code]....
how to automate the password prompt required for sudo commands.
View 8 Replies
View Related
Mar 7, 2010
In a rage of anger against VI I decided to open my firewall config file in gedit, made some changes and was then confronted by the fact that it was read only. I decided to change the permissions for the whole of the /etc folder with:
Code:
sudo chmod 777 /etc/*
This also changed /etc/sudoers so that now whenever I try to use sudo I get the error:
sudo: /etc/sudoers is 0777, should be 0440
segmentation fault
I cannot change it back to 440 because I need sudo to do that.
View 4 Replies
View Related
Nov 28, 2010
For test purposes I'm running Ubuntu 10.10 from a USB stick with a USB WLAN stick.The system finds the WLAN router and acquires an IP6 address, but no IP4 address.With "dhclient wlan0" though it does get an IP4 address and connects o.k.How do I setup the system so that this dhclient call is done by the system at startup (or whenever it is necessary)?
View 1 Replies
View Related
Jul 17, 2010
I accidentally did a 'chmod +x foo' when i meant to do a 'chmod a+r foo'.
-rw-r--r-- 1 casper trad 53 Jul 17 22:41 filegore
-rw-r--r-- 1 casper trad 13 Jul 17 22:41 filelemme
-rw-r--r-- 1 casper trad 24 Jul 17 22:41 nix
[code]....
View 1 Replies
View Related
Jan 26, 2015
I'm trying to automate two command lines, a synclient and a syndaemon. They both work well if I type them manually in a terminal, but if I do a littre script to do this, tap to click and scrolling don't work anymore.
This is the script I wrote:
Code: Select all#!/bin/bash
synclient VertEdgeScroll=1
syndaemon -d -t -K
exit 0
So I made a chmod +x on the file, placed it in ~/bin then change PATH to include the directory. Then I added this file in "Startup applications".
The scripts run ok, mais it has a different effect than if I run the commands manually.
View 10 Replies
View Related
May 28, 2011
I'm setting up a Python-based webserver on my Debian box. Setup: The Debian OS is VM based, but I've switched the VirtualBox from NAT to Bridged. IP of the VM setup = 192.168.1.7 (per my router's admin screen or ifconfig). I've succesfully set up my router's port forwarding for both ssh and HTTP. I've successfully set up my router's dynamic dns using [URL].
Regardless of the specific Python webserver I'm using (Django, CherryPy, standard library), I have to start the webserver @ 192.168.1.7:80 using sudo. Otherwise I get an error about not having permission to access the port. None of the webserver tutorials mention needing to use sudo when specifying an ip:port.
Question: why do I need to use sudo to start these webservers? Is it an indication that I shouldn't be using 192.168.1.7? Or that I'm not setting a config file properly somewhere?
View 2 Replies
View Related
Jun 9, 2011
I'm having a weird problem, eth0 does not start neither on bootup nor ifup...not even issuing /etc/init.d/networking restart...i will show you some info just to check
[Code]...
View 6 Replies
View Related
Sep 21, 2010
what is the easiest way to add single command to startup? (has to be run as root)
View 1 Replies
View Related
Oct 13, 2010
Im trying to run synergy on startup. This works fine on the client, but it wont start automatically on the server. I put this line in an entry in startup applications:
[code]...
but still no dice.
View 9 Replies
View Related
Apr 14, 2009
I just moved my / from sda1 to an ide drive, hde1. i dont see how this could have caused any of these issues, but it did.
First my network card failed to start. i added a line in my rc.local file (where i put all of my additional programs, etc i want to start):/etc/rc.d/rc.inet1
The above now starts my network card with my static ip configured. dhcpcd also worked but i wanted this static.
Now samba will not start. i have the following line in my rc.local: /etc/rc.d/init.d/samba start
This used to work just fine. at first i thought that samba may be trying to start before my network card gets an ip, but the line is *after* the network startup line. just to make sure, i made an additional script called startsamba which contained a sleep 60 followed by samba start, to delay the startup of samba even further.
The message samba reports is very vague, something like failed - core dumped. most of the core dump log is garbage characters, but here is the beginning which seems like it might contain some info:
Code:
ERROR: Can't log to stdout (-S) unless daemon is in foreground (-F) or interactive (-i) after the system starts, i can drop to a console and type "/etc/rc.d/init.d/samba start" and the service starts just fine. i've also tried starting samba manually with "smbd -d" which also produces the core dump when started from rc.local, but not when started from a console after startup.
View 8 Replies
View Related
Sep 29, 2010
I am using a headless server with virtualbox installed on it. A second box is a LAMP server from which I have phpvirtualbox installed to give me a remote connection to the headless server. In order to get a connection made between the 2 boxes I need to start a program called vboxwebsrv, this being on the headless box. I therefore need to ssh into the server and startup the program. What I'd like to do is have this program launch on startup, and the folks at phpvirtualbox has a sample script available that will do that. Unfortunately the script uses a su command, not sudo. Since I am using Ubuntu, the su command doesn't work, but using sudo requires a password response. How do I deal with this?
Here's a snippet from the script:
# Function that starts the daemon/service
#
do_start()
{
if [ "$VBPID" != "" ] && [ "$VBPID" -gt 0 ]; then
[code]...
What I currently do is: sudo /usr/bin/vboxwebsrv -b --logfile /dev/null >/dev/null.(The script file sets up the path earlier on).What I don't want to do is have any interaction during startup, and frankly, I can't see how to avoid the password thing.
View 5 Replies
View Related
Jan 6, 2011
I need to add a program to my startup menu (webserver which needs sudo for port80). I follow their directions, but it breaks the program and no pages are served. I will not be home to guide wife and kids every time they boot the machine to sudo start the program. How do you start a program at boot, as root or sudo start.
View 2 Replies
View Related
Feb 2, 2010
I cannot figure how to make a program start-up when Ubuntu boots. I want the "sudo firestarter" command to run so the firestarter icon appears in the panel.
View 7 Replies
View Related
Jan 6, 2011
Kernel 2.6.21.5, Slackware 12.0
Code:
Code:
On the other hand
Code:
So, I do not understand why the notification "sudo: cd: command not found", considering cd is a bash built-in command.
View 3 Replies
View Related
Jul 18, 2010
I seem to only be able to start checkgmail as root. I have it listed as a startup application, and in the command line I entered gksudo [path to file]. How do I make it remember the password at each startup?
View 9 Replies
View Related
Jun 7, 2011
I currently have a setup which allows me to connect to all computers on my home network via SSH and RSA keys. I'm very security-conscious, so all of my keys are passphrase protected. I'd like to essentially set something up where I'm running Unison on a cron job to back up to a file server on my network, which we'll call timmy. I've noticed that the first time I try to use a key on my Ubuntu laptop teeks, I get a dialog which pops up asking me to type in my key passphrase. I've heard that for servers needing to make automated backups like this that one should use ssh-agent to ask for the key passphrase on login/server start. How can I set this up on teeks?
I'd essentially like to have the following happen:When I boot and come into the OS, prompt visually for the passphrase as is done when I first use a key.If I SSH into this computer (as it's internet-facing) and I haven't provided the SSH passphrase yet, then prompt for it. (Sometimes, I might need to remotely reboot the machine over SSH, so I'll be SSH'ing into it after it reboots and I'd like to be able to authenticate the key without having to VNC in and do it manually.)
View 2 Replies
View Related
Feb 10, 2011
I'd like to get the information about automatization of the tasks in Linux, more specifically in Fedora with minimal installation (without graphical interface and so on).The application (developed in C) needs to be started automatically when the computer is initialized. I've read about cron but I guess it's not a solution in this case because whenever computer starts the application must run once.I also have read about the/etc/ rc.local file but I made some tests changing it and they didn't work, the computer starts asking me the login and password but nothing run after that.The inittab was the same. In this way, someone know how to initialize an application developed in C when the computer starts?
View 6 Replies
View Related
May 24, 2011
I would like to automate a definition process. I have 11,581 to define. :|
I would like to read each word, copy the definition(s) and append it next or below the word or save definitions to file.
The word list has one word per line.
Python script?
Bash?
Perl?
Its an interesting project but I cant seem to figure it out. Lack of programming skills.
View 2 Replies
View Related
Feb 25, 2010
I have RHEL Machine in production server where we gets usual alerts that logs filling up spaces. We archive those logs but in case it grows maximum we delete the old ones. Any idea how can we autiomate the process.
View 1 Replies
View Related
Mar 29, 2011
I need to tar this logs, but i dont how to make it simplier to me. Everyday there are created this five logs. I need to make five tar files from every day from this files at the end of the month
For example
Till now i have tar it manualy (copied every file)
View 2 Replies
View Related
Oct 16, 2010
I need to source the my /home/me/.bashrc file every time I "su -" to root. Is there any way to automate this? I cannot edit any thing in the root's environment as it is shared by people.
View 7 Replies
View Related
Mar 11, 2010
I need to ftp some files nightly from my linux box to an arbituary ftp server not controlled by me.
The ftp server admin has granted me an account for the purpose, but do not wish me to store the plain username or password in any script files for security reasons. How can I do that?
the wrong way would be:
Code:
$ cat my_script
open server_address
user plane_ftp_username plane_ftp_password
put a.txt
[Code].....
View 8 Replies
View Related
Apr 19, 2010
I have a heavily used file server that I want to restart, then if it requires e2fsck's on any volume to run them after it restarts. The only problem is that the server is rarely rebooted, and they said it might kernel panic because its been so long. I've heard there's a way to have it go past the kernel panic if it does happen, but I'm not sure how to do that or the other stuff.If it was a Windows server, I would schedule a shutdown with the force switch, and have the chkdsk's already scheduled for each volume on reboot. But for RHEL, I really don't know.I'm hoping this can be done, so that way I can have it kick off at say 7am, then when I get in at 8am it will probably be near the end of the e2fsck's so I can see what's going on.
View 11 Replies
View Related
Jun 11, 2009
i'm using Fedora 11 which i installed a couple of days back... i added my user name to the sudoer list but everytime i run the sudo command it takes at least 20 + seconds before anything happens... this happens everytime i run sudo... in comparison to running su things happen immediately... anyone else experiencing this? now everytime i install or run a command requiring root access i just use su...
View 7 Replies
View Related
Sep 14, 2010
Install wireshark and added it to visudo. But wireshark refused to start in konsole
Code:
# sudo wireshark
(wireshark:7493): Gtk-WARNING **: cannot open display:
However, wireshark will start without problem when in root.
View 6 Replies
View Related
Feb 2, 2011
I am trying to use wireshark on my ubuntu 10.10 laptop. However I have found out that wireshark will only detect my network cards when it is started with root permissions. How would I make it automatically start with root permissions?
View 2 Replies
View Related
Jun 1, 2011
I have been using ubuntu or a derivative distro and perhaps I grew too used to sudo. If it matters I am on Slackware 13.37 and xfce4. I was able to adjust sudoers to allow sudo but I am having difficulties running some progs as root. The biggest concern is trying to start thunar as root. It wont run after sudo, su, or su -l. What am I doing wrong?
View 10 Replies
View Related