Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.

learn more… | top users | synonyms

2
votes
0answers
216 views

Solaris 9: Degraded mirror unmanageable with raidctl after drive replacement

We have a pair of Sunfire v20z's (WITH LSI MPT raid) that have each had one drive in their mirrors die. bash-2.05# cat /etc/release Solaris 9 4/04 s9x_u6wos_08a x86 ...
1
vote
0answers
35 views

Redhat quitting process never works always have to kill it

I am working on a RedHat server creating a unicorn process. I have two sets of these processes being created. I am able to QUIT one of the process fine and do so over and over again create it and QUIT ...
7
votes
4answers
2k views

Where should I place group shared files on a Linux system?

I'm migrating a lot of small custom scripts and data from a Linux system to another. On the old system we had a shared user that owned most of the files and they where located in that users /home, ...
0
votes
1answer
43 views

OSAS v4 Open Systems Accounting Software [closed]

My company recently purchased another company and along with it, came an old SCO Openserver (v5) running OSAS v4. We use TinyTerm as recommended to access this but no one knows how to use it. I've ...
1
vote
6answers
479 views

Is a Unix flavour (i.e. Solaris) any good for a VPS web server?

Lets just say I am a fanatic to using something such as this, and would be willing to purchase the appropriate licenses (or open version of Solaris maybe) and install it. My questions are, do ...
4
votes
4answers
1k views

Bash script is not working as cron job

I have the following shell script $cat capture.sh TIME=$(date +"%H-%M-%d-%m-%y") IP="203.208.198.29" PREFIX=$TIME$IP tshark -f "udp" -i eth0 -w /root/captures/$PREFIX.cap& pid=$! sleep 2m ...
0
votes
1answer
270 views

Unable to clear sendmail mqueue-client

drwxr-xr-x 2 smmsp smmsp 4.0K May 6 23:31 mqueue drwxrws--- 2 smmsp smmsp 29M May 8 10:40 mqueue-client As you can see mqueue-client is filled with 29 megabytes of unsent mail. This seems to ...
10
votes
2answers
4k views

Making libmagic/file detect .docx files

As seen elsewhere, docx, xlsx and pttx are ZIPs. When uploading them to my web application, file (via libmagic andpython-magic) detects them as being ZIP. I store the contents of the file as a blob ...
2
votes
3answers
24k views

Most simple way of extracting substring in Unix shell?

What's the most simple way to extract substring on Unix shell (with regex)? Simple means: less feature less options less study Update I realized regex itself is conflicting with simplicity, and ...
-4
votes
1answer
73 views

Server that transfers FTP to FTPS without downloading on my PC [closed]

I need to do a server to server transfer, and the data is about 1 TB in size. One server supports plain FTP, but the other mandates FTPS. Both servers are located in the US. If the data was within a ...
1
vote
1answer
63 views

How to change protected config files via web/php interface?

I'm looking for way to modify configuration file that resides below /etc directory via web (in particular case PHP) interface. While it's not a problem to read (if you set up file permissions ...
0
votes
2answers
44 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 ...
-1
votes
2answers
70 views

Security in users having sudo access

How to protect my passwords list (in different databases for example) in a UNIX environment where most of the users have sudo access to other user IDs? I have a script (main.sh) with the following ...
7
votes
5answers
17k views

How to get pid of just started process

I want to start process (eg. myCommand) and get its pid (to allow to kill it later). I tried ps and filter by name, but I can not distinguish process by names myCommand ps ux | awk ...
0
votes
1answer
59 views

Give user permission to create/delete particular file?

Is it possible to give a user permission to create/delete a file at a certain path, but not to modify other files in the same directory?. I'm using Ansible to provision a CentOS 6.4 box. I'd like to ...
27
votes
4answers
25k views

How to convert text file from Windows line breaks to Unix ones on Unix/Linux?

Is there a quick way to convert text file from Unix line breaks to Windows ones in Unix environment? I thought there could be a standard utility.
2
votes
1answer
234 views

Create a link to the Unix socket [duplicate]

Is there a possibility to create a hard link for an unix socket? I'm creating a jail and symbolic links won't work, so I'm looking for a solution, how to provide an unix socket inside chrootted ...
21
votes
8answers
12k views

Is there a way to redirect output to a file without buffering on unix/linux?

I have a long running batch process that outputs some debug and process information to stdout. If I just run from a terminal I can keep track of 'where it is' but then the data gets too much and ...
2
votes
3answers
126 views

How do i change the global login shell on a unix system?

I want to set the login shell (the shell they get when they log in) of all existing and future users. The correct way to change the login shell seems to be chsh. But this only allows me to change the ...
2
votes
3answers
339 views

ssh but keep current working directory

I often want to ssh into a different server, but retain my working directory. (All our servers have the same NFS and thus the same directory path usually exists on all servers.) Is it possible to do ...
0
votes
2answers
815 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 ...
1
vote
2answers
739 views

I can run a script locally, but cannot do “ssh HOSTNAME /path/to/script.sh”

I have a linux server, and a linux desktop. I have written the following simple script to dump the database of a django web application: #! /bin/bash set -o errexit cd $(dirname $0) . ...
2
votes
1answer
134 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 ? ...
2
votes
3answers
6k views

How can I schedule a cron job that runs every 10 seconds in linux?

I know how to do every minute, but how about every 10 seconds?
7
votes
4answers
4k views

How big (in bits) is a Unix UID?

I understand that unix user IDs (UIDs) are usually 16 or 32 bit unsigned integers but how can I find out for any given system (in a shell)?
4
votes
1answer
750 views

Can i call pushd/popd and prevent it printing the stack?

After calling pushd/popd in bash, it will print off the current directory stack. Is there any way to prevent this behaviour, so that it will act 'quitely'? This sort of noise in a command is uncommon ...
0
votes
0answers
20 views

Process identifier mask in z/OS

I've noticed a curious pattern to process identifier numbers on the z/OS system I'm working on (uname reports it as OS/390), they're either 1-4 digits long or 8 digits long but never in between. The ...
6
votes
3answers
3k views

Directory that a user can read, but root can't?

There's a directory underneath my homedir called ".gvfs". As my regular user account, I can read it just fine: ~ $ ls -lart ~raldi/.gvfs total 4 dr-x------ 2 raldi raldi 0 2009-05-25 22:17 . ...
0
votes
2answers
146 views

Using Jenkins to access mysql files on the same instance

I have a Jenkins installation and running mysql server on the same box. One of my jenkins jobs is supposed to tar up the /var/lib/mysql folder but I get the following error tar: ...
0
votes
3answers
367 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
1answer
41 views

How do I accept two different types of network connections using iptables

I need to setup iptables for a mongodb database server, such that it allows only two types of INPUT connections: one connection to port 27017, monogdb's default port, from our main web-app one ssh ...
0
votes
2answers
643 views

CPU usage command for monitor script

Is there a command for FreeBSD (except the top -P) I could use to monitor my dedicated server CPU usage? I am in progress of writting my bash script which will notify me as soon as any of the CPU core ...
1
vote
2answers
65 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.
1
vote
1answer
45 views

Viewing the packet-size of an incoming IP

I have been looking for a sulution to this for a few hours. after no avail im asking for help here. I need to watch my incoming packets by Size. in a format similar to: IP SIZE I have tried ...
0
votes
1answer
3k views

Hosting Folder in the home directory using nginx

I would like to add a condition in an adduser script to update nginx.conf for it to load ~/www as http://ipaddress/~user whenever I create a new user. And when a user is named www.domainname it will ...
0
votes
2answers
717 views

Logging ssh info using syslog-ng daemon in Cygwin

I have setup the syslog-ng daemon using Cygwin in Windows 7. What I want to do is to log all of the ssh failed passwords, etc to /var/log/sshd.log. I tried to do this by adding the following line: ...
1
vote
1answer
228 views

Can sftp check for existing data?

I have 700 binary files (pdf) to download and right now only 400 are available on a sftp server. Can sftp, from the cli, determine what files exist in the local directory so it doesn't need to ...
1
vote
2answers
5k views

Fixing Shared PCRE Library on CentOS

This is less a question about PCRE, and more a question about updating shared libraries. The distribution of CentOS I'm running only allows for yum upgrades to version 6.6, or somewhere similar. I'm ...
3
votes
6answers
429 views

Server monitoring for medium scale UNIX network [duplicate]

I'm looking for suggestions for a good monitoring tools, or tools, to handle a mixed Linux (RedHat 4-5) and HPUX environment. Currently we are using Hobbit which is working reasonably well but it is ...
3
votes
1answer
3k 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
2answers
111 views

How to block rejected messages I did not send?

In exim mainlog I see a lot of rejected messages I did not actually sent (they were send from spammers). 2014-02-20 23:42:47 H=a94-132-158-40.cpe.xxxxxxx.pt (zonhub) [94.132.xxx.xxx] ...
1
vote
2answers
785 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 ...
0
votes
2answers
301 views

Portforwarding with IPTABLES and Remote IP detection

I was able to forward 80 port from my primary server 192.168.90.1 to the second one 192.168.90.2 with IPTABLES The primary server has a public address X.X.X.X so I forwarded X.X.X.X:80 -> ...
2
votes
1answer
320 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 ...
0
votes
1answer
146 views

Fix Solaris 11 GNU tools location for RVM

I am trying to install RVM on a Solaris 11 system, the curl -sSL https://get.rvm.io | bash -s stable went through, but when I actually try to use rvm, it simply stats "ERROR: Missing GNU tools: grep ...
1
vote
1answer
211 views

chcore command not taking effect

I am trying to change the behaviour of where core dump files get written to, as described here: ...
1
vote
1answer
51 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?
1
vote
2answers
279 views

SSH Tunnel or Reverse Tunnel

I'm trying to establish a SSH tunnel to allow VNC/ARD connections (ports 5900 and 3389). However I'm uncertain about a certain thing: Let's say machine A has IP 192.168.103.1 and has services running ...
2
votes
1answer
750 views

pam_exec.so PAM module does not export variable PAM_USER as stated in the documentation

I'm trying to use the pam_exec.so PAM module to execute a script which needs to know the username/password coming from the application (OpenVPN in this case). I have a script that executes printenv ...
1
vote
1answer
108 views

RDP forwarding on HP/UX machine

I have a setup that consists of a HPUX machine that acts as a router and has a set of windows machines sitting behind it. I have given the HPUX box 3 external IP address on our main network so we can ...