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

0
votes
2answers
438 views

dsh (dancer's shell): is it possible to specify ports in config file?

Using dsh you can define the list of machines in ~/.dsh/machines.list in the form: <user>@<host> I'd like to have multiple hosts with different ssh ports, like this (I tried): ...
0
votes
1answer
12 views

update passwords [user's already existing in ldap]

I want to update passwords [user's already existing in ldap] of the user by importing data from /etc/passwd & /etc/shadow How to achieve this ? I will give the overview of my setup. nodes user ...
0
votes
1answer
21 views

Do we need to mount or not ? for Oracle ASM

i am comparing the differences between installing a db with its files on a traditional filesystem and on oracle asm with traditional filesystem, it seems like there is no concern for disk persistent ...
-1
votes
1answer
13 views

Can a Node.JS program write to disk if it is ran as a user without root privileges?

I am about to set up a VPS with a user that lacks root privileges. I also have a Node.JS server that writes files to the disk. If I run this program/server without root privileges, will it still be ...
1
vote
5answers
12k views

Getting full path of executables in ps auxwww output

Consider the following lines from a "ps auxwww" output: USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 4262 0.0 0,1 76592 1104 s005 Ss 10:02am ...
0
votes
0answers
16 views

How can I automate the retrieval and usage of passwords from within a script?

We have automated scripts that access certain devices and are getting the passwords for the devices from a root-read-only plain-text file. Is there some kind of architecture we can use so that we can ...
2
votes
2answers
833 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 ...
0
votes
1answer
113 views

Writing to Unix Domain Socket from rsyslog

I want to write output messages from rsyslog to a Unix Domain Socket. I want to do this so that I can read the messages from that socket using my script and parse log messages further. I try to use ...
2
votes
4answers
10k views

How to move directory from one server to other?

I have SSH access to the both servers, one of them is empty. How can I move site directory from old server to new server via SSH connection? PS: On both servers is unix
1
vote
1answer
13 views

How can I add an X-header to unix mailx?

I am attempting to add the x-header X-APP-VOLT: Yes to the header of my email with a .tar attachment. I only have access to usr/sbin/sendmail and mailx. I do not have root access so I can't download ...
8
votes
6answers
8k views

How to properly shutdown or reboot a Unix/Linux server

What is the correct way to turn off a Unix/Linux server? From my googling, I have learned (hopefully) the following: shutdown: I should use this, with the parameter -h to halt, or the parameter -r ...
6
votes
3answers
5k views

apt-get update/upgrade list without changing anything

I would like to view what packages are available for update/upgrade without actually changing any files becuase there are some packages I wouldn't like to update. Would it then be possible to apt-get ...
2
votes
1answer
6k 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 ...
0
votes
1answer
27 views

Apache Web Server Virtual Hosting

i'm making a apache web server with two virtual host, i have a DNS Server caching-only on my other centos 6 minimal VM, the IP Address of my Apache Server is 192.168.1.9, when i try to browse that IP ...
2
votes
0answers
9 views

Should I rather explicitly run programs in foreground (instead as a daemon), or `expect fork` when configuring upstart daemons?

Many programs allow to be run either in daemon mode (which is usually the default), or explicitly run it in foreground with a flag such as -f. Now when configuring upstart to run programs like this, ...
28
votes
4answers
22k views

How to read backward from the end of file in less or more?

I've found one way so far: less +G filename, but it's scroll up only with up key line by line. What's more powerful less usages which provide scrolling by page, pattern search backward and so on?
4
votes
5answers
2k views

Appending output to a file at the same time truncating it to N lines

I'm trying to find a simple way to append/write to a log, while at the same time keeping it the log trimmed to a reasonable size. I would prefer to not just append files forever, and then have to have ...
3
votes
1answer
2k views

Linux- Permission denied?

I'm installing Neo4j server as a linux service, but when I install it, I get the following message: /sbin/insserv: Permission denied What is this? What should I do? I'm running everything with ...
3
votes
3answers
2k views

How do I disable command line history in Linux?

Right now, I'm aware that for all commands typed into the console, the Ubuntu system logs it somewhere. How can I disable logging of unix commands for all users?
17
votes
2answers
14k views

SSL Certificate Location on UNIX/Linux

Is there any standard or convention for where SSL certificates and associated private keys should go on the UNIX/Linux filesystem? Thanks.
4
votes
1answer
186 views

What is a solid process for designing a monitoring system?

The short version: I've got a heterogeneous environment of ~400 hosts using Groundwork/Nagios for monitoring. The current checks, hostgroups, and servicegroups have been put together in an organic, ...
39
votes
2answers
4k views

Why do I have to edit /etc/sudoers with visudo?

I've noticed that the sudoers file and cron config files act in a special way compared to other config files on Linux. They need to be edited with a special wrapper rather than any text editor. Why is ...
1
vote
1answer
32 views

unexpected end of file error in script file

#!/bin/sh # Host = ############### Port = #### email_id="##################" email_sub="######" # if ping -q -c 5 $Host >/dev/null then result_host="Successful" else result_host="Not ...
1
vote
1answer
40 views

Restoring AIX ufsdump on another Unix system

I've previously tried to restore from an AIX mksysb image (question here). I managed to find another set of nightly AIX backups that look to have been made with ufsdump: # mt -t /dev/rmt/1h rew # dd ...
7
votes
3answers
4k 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 ...
1
vote
0answers
14 views

what is the the difference between all the NSS caching daemons?

I would like to see a comparison between nscd, unscd, nsscache, sssd and nss-pam-ldapd. Those are all the alternatives to nscd that i could find in Debian... Our setup is that we have a bunch of ...
-1
votes
0answers
15 views

Sync local dir to FTP without checking file status on server [duplicate]

I'm using Mac OS X (Yosemite) and I want to sync a local folder to remote folder over FTP. At the moment I'm using lftp, and it is syncing the directories fine, but it takes a lot of time since my ...
0
votes
0answers
38 views

Restore of AIX backup on other Unix system

I have two old AIX backup tapes box labelled "System Image" that I need to recover a few files from. I've tried to extract them using tar (Solaris and Gnu) and cpio with no success. I then ...
4
votes
1answer
67 views

Can't execute files in particular directories

We are encountering a bizarre issue were non-root users are unable to execute any files (scripts or binaries) in certain directories. This transcript demonstrates the issue: [root@b6 /]# mkdir q ...
1
vote
0answers
31 views

Sendmail is taking huge amount of CPU [duplicate]

My dedicated server is slowing down since 2 days. I checked the RPM and the CPU usage has gone from less than 10% to more than 50%. Rebooting the server didn't help. So, I tried top command: top - ...
1
vote
0answers
15 views

Unix user and group server management solution [closed]

I am looking for a piece of software designed to manage users and groups across several linux platforms. So far all I have come up with is LDAP and a GUI called phpldapadmin. Both seem really dated. ...
5
votes
7answers
10k views

Should I use a login banner and if so, what should it say?

Are interactive login banners worth having? The general consensus is that they are, but what should the banner say? Some things that are being considered (no particular order): ownership of the ...
0
votes
1answer
9 views

rsync: syncing source folders with deletion, leave existing destination folders alone

I am dealing with the following folder structures on both ends of the rsync: Source Controllers Plugins - Plugin1 - Plugin2 - Plugin3 Models Destination Controllers Plugins - Plugin4 - Plugin5 - ...
0
votes
1answer
85 views

php-fpm does not work me exec or shell_exec

I have OpenBSD 5.6 and php-fpm, nginx. Is chrooted by default on /var/www I try:(test.php) <?php if(function_exists('exec')) { echo "exec is enabled"; }else{ // it's not echo "exec is ...
2
votes
1answer
177 views

Interactive shell based on SSH and UDP [closed]

I've heard from a friend about a client-server application which initializes on top of SSH connection but implements interactive shell over UDP protocol. It is specifically designed for bad quality ...
2
votes
1answer
1k views

How can I start a shell inside a jail on FreeBSD?

I have access to a a previously set up FreeBSD box with a number of jails on it. One of the jails is an SQL server, and does not have ssh enabled on it. How can I gain access to a shell on that jail ...
0
votes
1answer
12 views

BNF diagram for sudo file

How can I generate a (BNF) railroad diagram for /etc/sudoers file? I know the sudoers manpage has Extended Backus-Naur Form informations. Also, there are some tools to generate such diagrams (see ...
6
votes
3answers
7k views

How can I rename an unix user?

I have a user named hedgehog and I want him to be named squirrel, but I don't want to change his numeric user ID. How can I accomplish this?
2
votes
2answers
54 views

AWK + Host lookup

Currently using the following line to get top 20 ips sorted by requests: grep 'GET /' /var/log/nginx/access.log | awk '{ print $1 }' | sort -n | uniq -c | sort -rn | head -20 Output: 575 ...
1
vote
2answers
2k views

Weblogic administration console way too slow

I've installed weblogic 10.3.3, configured simple domain with default configuration. And after starting weblogic I cannot use it via admin console because it is starting too slow (~10 mins). It seems ...
13
votes
4answers
4k views

A better unix find with parallel processing?

The unix find(1) utility is very useful allowing me to perform an action on many files that match certain specifications, e.g. find /dump -type f -name '*.xml' -exec java -jar ProcessFile.jar {} \; ...
2
votes
0answers
18 views

Extracting the date of the latest message from an mbox file

How would I go about extracting the "Date:" header for the latest received message in an mbox file? Note that it's not simply an issue of grep'ing for the latest occurrence of "^Date:", since it ...
0
votes
2answers
61 views

Run a script in /etc/motd [duplicate]

I'd like to run a python script when people log in to the server. I thought editing /etc/motd would be the best approach, but since it's only readable file, that won't work. I found pretty much ...
0
votes
1answer
136 views

How to convert DER formatted public key file to PEM form

I need to use the PEM formatted public key for some purpose, but not finding the command which can convert DER formatted public key to PEM formatted public key. The command I have used - openssl ...
1
vote
1answer
51 views

What rsync options to use for the below mentioned scenario?

Greetings !!! This is regarding a specific requirement about rsync that we are trying to achieve. We have tried to achieve this by using various rsync options. However, we are encountering different ...
0
votes
4answers
4k views
4
votes
3answers
2k views

ssh still accepts password authentication despite being configured for public-key only authentication (which works!)

I have configured an Ubuntu 10.04LTS desktop install to only allow public key authentication. RESULT: public key authentication works perfectly! QUESTION: The problem is that despite being ...
0
votes
3answers
62 views

sed replace unix path with variable that contain another unix path [closed]

I need to replace Unix path via sed with variable that contain another unix path in a bash script Example: another_unix_path=/another/unix/path sed -i 's/ \/some\/path\/file.txt/ ...
22
votes
6answers
3k 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 ...
8
votes
7answers
4k views

In *nix, how to determine which filesystem a particular file is on?

In a generic, modern unix environment (say, GNU/Linux, GNU/Solaris, or Mac OS X), is there a good way to determine which mountpoint and filesystem-type a particular absolute file path is on? I ...