2
votes
1answer
118 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 ...
-1
votes
0answers
20 views

What exactly is a “SWAP FILE” when dealing with RAM in a Linux machine? [duplicate]

What is a swap file and what does it do? How do it increase the RAM and are there any downsides? Why use swap file vs. getting more RAM? Does swap file hurt the CPU IOPS? I understand that it some how ...
0
votes
2answers
85 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
47 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
207 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
29 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
20 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
19 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
67 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
194 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
31 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
106 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
74 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
116 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
54 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
640 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 ...
0
votes
1answer
109 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
149 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
45 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?
12
votes
3answers
390 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
462 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
56 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.
22
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
73 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
388 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
105 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
56 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
37 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
45 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
217 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
291 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
132 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
140 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
181 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
90 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
123 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
115 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
71 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
204 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
240 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
215 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
921 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 ...
0
votes
1answer
146 views

Do any Unix/Linux FTP daemons allow users to be “jailed” without using chroot?

When setting up an FTP account for a specific purpose - e.g. as a drop-point for sharing data files - it seems sensible to give the user access only to the particular directory, and no view of a wider ...
0
votes
1answer
152 views

How to mention the prefix directory path in CURL command

I am new to Linux, i want to write the perl script to download the files from FTP sites but here i want to use curl command to download the files. which is working fine in wget command but not working ...
2
votes
3answers
187 views

how to convert a running process into a nohup and keep a logfile

I have a process currently occupying a terminal ]$ command some_argument I want to exit from the terminal and go home, but in the mean time I don't want to kill this running process. For the ...
2
votes
2answers
62 views

Can `top` show average data?

top shows instant resource usage. Also it has -d option that sets refresh rate. But how can I get average %CPU for processes for 1 minute?
-1
votes
2answers
54 views

Insight Into System CPU Usage [closed]

We've noticed that top doesn't give much insight into sys CPU usage. It only appears to give CPU percentages for user. Are there any tools out there that give more insight into System CPU usage?
3
votes
3answers
189 views

Cleaning up junk and logs on unix/linux

I manage some unix systems, and users on my system are creating a lot of junk and littering their work areas. I am running into filesystem full every day. There are many terabytes locked up and is ...
0
votes
1answer
283 views

NGINX Reverse Proxy Sharepoint 2010 authentication fails

When presented with the Windows forms based authentication after entering the users credentials I am prompted again for a username and password. This just keeps prompting you, I see no errors in the ...