-2
votes
0answers
16 views

Terminal menu for SSH config shortcuts? [closed]

I've got thousands of SSH shortcuts in my .ssh/config file. I'm looking for a way to easily go through and/or search the list of servers/shortcuts. Ideally I'm looking for a terminal application ...
-1
votes
0answers
21 views

How to kill all process for a given user that take longer then x time

When I list processes with ps auxf I often see some that are stuck and I need to manually kill them. How can I do it with one command? Example ps result: $ ps auxf USER PID %CPU %MEM VSZ ...
2
votes
1answer
53 views

chattr - How to change file +i attribute without using chattr

Here`s the problem. My server got probably hacked. I would like to change a config file, but it is immutable (has the +i attribute), so I can't edit it. trying to execute a "chattr -i" on the file ...
-1
votes
1answer
98 views

Routing traffic through different interfaces based on incoming IP

I am trying to setup a unique setup where I have to route traffic that's incoming to one server and have the traffic based on the incoming IP address get routed through to different interfaces and ...
3
votes
1answer
54 views

screen in screen, detach only last one

I have strange issue on my hands. I have opened (GNU) screen for one serial console and in that same console I have opened another screen to another serial console. It was working but I am now ...
1
vote
1answer
39 views

Upload files from vsftpd ftp client in /tmp and once they are uploaded, move them to original folder

I'm having issues with my application. The scenario is that, there is a php cron which is running every 1 minute and it processes the uploads folder, wherein, files are uploaded via ftp ...
-1
votes
4answers
97 views

need to make password less login for same linux server with same user [duplicate]

I need to make passwordless login for same linux server with same user. [airwide@eir ~]$ hostname -i 10.3.7.73 [airwide@eir ~]$ ssh airwide@10.3.7.73 airwide@10.3.7.73's password: how can make to ...
3
votes
2answers
143 views

Is “sudo su -” considered a bad practice?

Background I know the difference between su -, sudo su -, and sudo <command>: su - - switches user to root, requires the root password sudo su - - switches user to root, requires only the ...
2
votes
1answer
195 views

sudo still ask for password when NOPASSWD is used

I read all sudo posts on serverfault, but I still cannot figure out what I'm doing wrong. Normally I finally find the solution but not this time : I want apache user to be able to execute this ...
0
votes
2answers
153 views

I'm on Windows. How to get time of a remote linux host [closed]

I'm trying to find a Windows command that retrieves the current time of a remote Linux\UNIX host. I know I can use ssh but I'd like to know for alternatives that do not require user and password. ...
2
votes
1answer
56 views

Unix hosts file order

For a long time I never even noticed but I made wrong /etc/hosts configuration on many machines. The order by the manual: 127.0.0.1 localhost 192.168.1.10 foo.example.org foo ...
7
votes
1answer
224 views

Linux/Unix - /etc/sudoers - host definition

can anybody tell me in which case the sudo host definition is useful? I mean this part of a line in the sudoers file: bob host1 = NOPASSWD: reboot In which environment (except sudo via LDAP) do I ...
1
vote
1answer
31 views

Minicom Successive Address Dialing

I've been tasked with writing a script for the minicom connection utility that tests a series of numbers in its dialing directory, I have found the baked in scripting language to be near useless. I've ...
0
votes
1answer
78 views

Using pppd with a serial port?

I just need to send/receive a messages through a unix-socket with PPP. But at first I want to launch the pppd with an usual serial port to make sure I know how it works. As I see, if I bind a pppd to ...
0
votes
2answers
28 views

updating, upgrading debian linux server except a package

I was looking for a command line to update/upgrade my VPS with the exception of the web server software. I have Nginx v.1.4.7 on my VPS and don't want it to get updated/upgraded when I run any ...
2
votes
1answer
410 views

How do you configure X11 forwarding over SSH on AIX?

Here is what I've tried. I've edited /etc/ssh/sshd_config on the remote AIX system X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes as well as set $DISPLAY DISPLAY=localhost:10.0 export ...
3
votes
2answers
949 views

Why would chmod give “No such file or directory” when running recursively?

I can change the permissions of the file directly: # chmod --changes --recursive ug+rwX /var/www/shared/tmp/cache/assets/BA0/280/sprockets%2F286302903364106648b609d708884f78 and I can also ...
0
votes
2answers
39 views

If a web root directory has a simlink that points to a folder one-level up, does that pose a security risk?

Assuming a Linux/Unix system. Not asking about any particular server software, just wondering in general. I want to use this to include javascript libraries or things like that in multiple sites or ...
0
votes
2answers
352 views

Environment variables are unavailable when running scripts over ssh

Suppose I have two hosts: A and B with users a and b. B is Windows machine with Cygwin installed, if this matters. B is configured to be accessed from A through SSH without password (it contains A's ...
2
votes
1answer
115 views

How can I make my own linux distro? [closed]

My question is bit off-topic or may be impractical. The thing is, on the web too many material available to download customized linux distro. But what if I want to make my own linux distro ? ...
0
votes
3answers
174 views

Exclude with the find command [duplicate]

I need some help getting the find command to work right in a script working on. I need to be able to exclude some directories. Below I have what I'm doing as a work around. sudo find / ( -name ...
1
vote
2answers
59 views

How do I show listening open ports from the shell?

I always have to google this and ServerFault is never the first result. Typically I want to do this on a unix box, but I'd also like to know how to do it on a Windows machine from CMD.exe.
3
votes
1answer
1k views

Can't log in to FTP on Debian with vsftpd

Linux noob here so please bear with me :) I'm trying to setup FTP access to my Apache server but I'm receiving a 530 Login Incorrect error. I installed the vsftp package via sudo apt-get install ...
1
vote
1answer
172 views

dmesg time vs system time time isn't correct

I hope that here is somebody that can help me with this strange problem. I think that i know why it is happening but i don't know how to solve it. Maybe it is because the BIOS time isn't set correct ...
1
vote
2answers
277 views

How do you tell if a user is “allowed to log in” on Linux?

The question is simple, I want to list all the user accounts which can log in to my system, but I'm not sure if that all the users in /etc/passwd are "could login" users? Details: I can see users ...
1
vote
1answer
48 views

How to delete special character in linux

By mistake I made a file with the name \. How do you delete something like that? I've tried rm --\ rm "\" rm -- -\and nothing seems to work. I bet it's so simple but I'm stumbled - any suggestions?
13
votes
3answers
584 views

Is there a mechanism in Unix (or Linux) to stop an in-progress core dump?

Let's say a (very) large process is crashing and dumping core, and we know the cause from other information (possibly an assert message, maybe something else). Is there a way to stop the core dump ...
-1
votes
1answer
882 views

KVM-Host OS recommendation [closed]

I am about to migrate a server installation (one OS) to a newer hardware and wish to enable/use KVM. So the hardware is fixed (https://www.hetzner.de/hosting/produkte_rootserver/ex40) , now I got the ...
-2
votes
2answers
66 views

How to block access to a local user to a local port?

How to block access to a local user to a local port? Example: user Elvis should not have access to the port 25600 on the same server.
23
votes
5answers
2k views

Can a program tell it is being run under sudo?

I have a program that should behave differently if it is being run under "sudo". Is there a way it can find out if it was run under sudo? Update: Someone asked why would I want to do this. In this ...
0
votes
0answers
110 views

Write failed: Broken pipe even if I use ServerAliveInterval?

This is my ~/.ssh/config file - Host 10.2.1.1 ServerAliveInterval 120 ProxyCommand ssh 10.1.1.1 nc -w1 10.2.1.1 22 I've configured it so that I can bypass the jump server each time I need to ssh ...
0
votes
2answers
446 views

How to kill the process using the name of the program instead of PID?

I started my Python program in the background using nohup as mentioned below - nohup zook.py & Now I am trying to kill this process so I did the ps command as mentioned below ...
1
vote
2answers
128 views

How do I iterate bash arrays and make an SCP command efficiently?

I need to scp the files from machineB and machineC to machineA. I am running my below shell script from machineA. I have setup the ssh keys properly. If the files are not there in machineB, then it ...
-1
votes
2answers
115 views

How to transfer file(s) from a Unix system to a DOS system? [closed]

What is the simplest way to transfer files from a Unix system to a DOS system? Preferably without any "extra" tools on the DOS side.
0
votes
0answers
38 views

Balancing server bandwith

I am working on a file uploading website. It will be run on dedicated server with 1GBPS connection. I wanna offer visitors max download speed possible at the current moment. So lets say server can ...
1
vote
1answer
54 views

cp/rsync command with destination as symlink to a directory

I am working on a cPanel backup solution at the moment. We are now informed about this exploit. Exploit : Full ROOT ACCESS to server 1.) create malicious file from, normal user account: mkdir root ...
2
votes
2answers
307 views

RHEL 5 list missing critical patches/packages

Im trying to figure out if there is an easy way to identify the missing critical patches/packages on my RHEL5 boxes. This is for audit purposes and was trying to figure out if there was an RPM command ...
1
vote
1answer
479 views

What are main differences between Linux and FreeBSD system from sysadmin point of view? [closed]

What are main differences between Linux and FreeBSD system from sysadmin point of view ? What specifically and significantly differs Linux from BSD (memory/resources/users management, other ...
-1
votes
1answer
50 views

Differences between UNIX and Linux Drivers [closed]

I've been trying to find an answer to this, been on a wild goose chase. Since UNIX and Linux have different system architectures. My question is on the differences between the drivers for the SPARC ...
-1
votes
2answers
182 views

how I can get the value of JAVA_HOME from my client

I have nagios client and server, how I can get the value of JAVA_HOME from my client? I have use to set shell command in script that is running from remote host: echo $JAVA_HOME and printenv | grep ...
0
votes
1answer
187 views

pbs check how much cpu a job is using / job % cpu usage

On a cluster a job is submitted to run on N CPUs. qstat -f doesn't show how much CPU resources the job is using other than the time. How does one check whether 100% of each CPU power is used? It is ...
1
vote
1answer
263 views

Sftp download directory while excluding files with certain extension

So I know I can download a whole directory like this: sftp> get -R * How can I exclude all files with .ipa extension though? I want to download everything except .ipa or .ipa.* files from a ...
1
vote
1answer
116 views

How to prevent users from renaming files while providing write permissions on Linux [closed]

For some special purpose, I want to prevent non-root users of the Linux Server from changing/renaming the filenames. However, they can modify and write to the contents of the file. How to do this from ...
-2
votes
1answer
142 views

Need help finding (linux compatible) source code for 'pathchar' program

Am unable to locate the source for pathchar (Van Jacobson's wonderful hack - http://www.caida.org/tools/utilities/others/pathchar/) inspite of searching over many places. What happened to it and is it ...
2
votes
3answers
118 views

Why use /home instead of /var?

I have seen many tutorials and real life configurations using /home to keep logs or even websites instead of leaving things in /var/logs or /var/www. Why?
0
votes
1answer
100 views

Debian mysql-proxy reserved connections

I was looking in too the mysql-proxy configuration, and decied to install it in order to make an access point to my servers whenever they reach high peak, however i want to have 5-10 reserved ...
2
votes
3answers
299 views

Is there a utility to read environment variables from an env file and then run a command (more lightweight than foreman)?

foreman can read .env files and set environment variables from the contents, and then run a program e.g. foreman run -e vars.env myprogram ...but it does a lot of other things (and is primarily ...
5
votes
2answers
241 views

Why are Unix applications documented with an number in parenthesis with man?

When I try to get help on a Unix command, I get reference to say tar(1) or lsof(8). Why is there a number within parenthesis and what does it refer to exactly ?
0
votes
2answers
280 views

Terminal output being cut off

I'm using ZSH as my shell and running a Debian 7 installation on a Linode box. When I ssh into this box and run any command where the output is larger than the window, the output that extends beyond ...
0
votes
2answers
1k views

can you help me setup DNS forwarding

I have a dns server in a subnet of the corporate network and i want to tell it to forward to the main dns servers when it cannot resolve this is my file: // // named.conf // // Provided by Red Hat ...