Questions tagged [unix]
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.
1,957
questions
1
vote
1
answer
1k
views
Email server configuration still complaining the connection isn't secure
This is a follow up to another question I had, but its quite different so I thought I'd start a new post.
Emails bouncing - 454 TLS not available due to temporary reason
I'm trying to work out why I ...
1
vote
1
answer
2k
views
Pass parameter from Local to Sudo user [closed]
Ok if subject is not clear i will explain my doubt.I have a shell script kept at my local user called (executeAdM.sh), and when i execute this script i am connecting to SUDO user by taking commands ...
2
votes
1
answer
3k
views
During OpenBSD installation, what is "DNS domain name" for?
During the installation of OpenBSD 6.1, right after setting up network interfaces, the installer prompts me:
DNS domain name? (e.g. 'bar.com') [my.domain]
I am not sure what this setting is for, I ...
3
votes
5
answers
382
views
Zipping a folder to create tgz file
I have a folder which i want to create tgz file and compute its sha256:
The folder is converted to tgz using following command
"tar -c -C #{Shellwords.escape dir} #{Shellwords.escape basename} " \
...
1
vote
1
answer
989
views
Is it possible to pass environment variables to a newly created user?
In my GitLab CI script, I am creating a new user which then executes a command. I'm noticing that when the command is executed as this user, the CI environment variables aren't available.
Below is ...
0
votes
0
answers
216
views
Expect is prompting password twice while spawn
spawn ssh -q [email protected]
Password:
Password:
Expect is expecting null before I sent the password.
Debug info
expect: does "" (spawn_id exp6) match glob pattern "yes/no"? no
"Password: "? no
...
0
votes
1
answer
1k
views
Is it safe to give ownership of files to “daemon”?
I was having trouble uploading files using my CMS (Drupal). When I put more restrictive file permissions on, I could not upload anything. Then I changed the owner of the upload directory and all sub-...
0
votes
2
answers
380
views
how to use awk or sed command (OS level commands) in Sybase level
I have one text file in host level Ex: /tmp/file.txt. So I have one script and I need to read the line by line from file.txt, so I used sed command. So I am using while loop in the script and I have ...
0
votes
1
answer
873
views
SED not working with complicated string
I have a file that starts like this:
[global]
pid = /var/run/php-fpm/php-fpm.pid
error_log = /var/log/php5-fpm.log
and want to replace
error_log = /var/log/php5-fpm.log
with
error_log = /var/...
0
votes
3
answers
7k
views
Remake catalina.out without restart of server
Is it possible to remake a deleted catalina.out on a tomcat server without restarting the server? The catalina.out got accidentally deleted but it's needed due to a funky cluster configuration (4 ...
1
vote
2
answers
3k
views
New user added but having error in AIX 7.1
I newly add a user name perfmgr in AIX 7.1 using smitty, however when I try to change the password it output and error as below:
# passwd perfmgr
Changing password for "perfmgr"
3004-616 User "...
0
votes
1
answer
3k
views
supervisord - automatically kills its spwaned processes
I am a new bee with Supervisord. And I am on Ubuntu.
My problem is, I have a script to spawn java process using "exec java -cp ....." as the only line in the script. This particular java process is ...
0
votes
1
answer
294
views
How to do REORG command on DB2
I want to reorganize(offline) some db2 tables.
Also I want to executing runstats command after reorg command.
I have a question.
Do I need to stop db2 database or deactivate or both of them before ...
-2
votes
2
answers
110
views
Which protocol to use for a barebones LAN file upload with mixed Unix and Windows clients
I have a set of about 20 embedded Unix clients who physically move from time to time. When they move into the range of a specific wireless AP, they will push a certain set of files to a Windows file ...
7
votes
0
answers
189
views
Sunsetting Microsoft Identity Management for Unix the right way
I'd like to make sure that we don't have any connections to our AD controllers before sunsetting, but some run Microsoft Identity Management for Unix / Server for NIS. I'm having a dog of a time ...
2
votes
1
answer
3k
views
Postfix+saslauthd: pam_unix(smtp:auth): authentication failure
I'm run postfix 2.10 + Cyrus sasl 2.1 + Dovecot 2.2 on Oracle Linux 7.
Dovecot works with saslauthd normally, but Postfix always failed on authentication, wish someone can help to check what problem ...
0
votes
1
answer
111
views
How to add dynamic code/ruby code inside .conf file
I'm using Sphinx search engine for my application, and I would like to add ruby code inside the sphinx.conf file to update some values dynamically based on my application server hostname? Is it ...
0
votes
3
answers
9k
views
Pointing 2 urls to the same site on nginx server
We have this website that works well already, but I was put to the task of pointing another url to that very same site. The idea is that two urls will show in the address bar, but just one site will ...
-1
votes
2
answers
108
views
Not able to reach azure url
I am trying to reach azure url through my Unix server but not able to reach it. It is sending connection time out and not able to find server from server list every time.
Plus I have tried to ping ...
0
votes
4
answers
3k
views
Filesystem full with 'df' but seems actually not
On my AIX 6.1 server, i have a problem on a VIO LPAR.
A filesystem seams to be full with the 'df' command, but not with 'du' or 'ls' for example.
I searched but I don't understand where the problem ...
-1
votes
2
answers
380
views
How to monitor user reports through shell scripting
I want to monitor
I have 3 user in my linux machine let's say a,b,c .By Using last command I am able to identify list of last logged in user and by w command who is logged in and what they are doing ...
2
votes
0
answers
43
views
Any equivalent of Entitled Capacity in x86 systems
I've been reading a lot about IBM POWER systems lately and I've been wondering if there is any equivalent to their Entitled capacity concept in x86 architecture. Basically allowing virtual partitions ...
15
votes
1
answer
4k
views
Potential hijacked SSH session & SSH best practices
I'm freaking out a little bit at the moment. I am SSHing into a remote server that I have recently commissioned. I'm doing this as root. I have installed fail2ban and had a massive amount of banned ...
2
votes
1
answer
3k
views
Block Postgres port 5432 running on Docker container with iptables
I am using Ubuntu 14.04 desktop (Xubuntu to be exact), and trying to block outside access to a locally running Postgres port 5432 with iptables. This is my iptables -S
-A INPUT -i lo -p tcp -m tcp --...
1
vote
1
answer
100
views
Merging Large Files Chronologically (UNIX)
We are currently using syslog-ng to dump files to a network storage location. Each day there are 5 .log files that are written by various servers and at the end of the day I need to merge the 5 files ...
2
votes
1
answer
42
views
How to signal the presence of a pattern via exit code, without altering STDOUT
I need to run cmd1. If and only if PATTERN is missing from its STDOUT, i need to run cmd2 too:
cmd1 | grep "$PATTERN" || cmd2
But I'd like to see all output from cmd1, not just the lines that ...
1
vote
1
answer
865
views
Solaris 10 Memory Size different from Physical Memory Size
Why is this? I am not using any zones (global only), so memory capping doesn't seem to be the answer and all the DIMM modules show as enabled with no faults when digging into this from the ILOM.
root@...
5
votes
1
answer
8k
views
How to automatically switch to home directory when switching user?
When i ssh to my ubuntu server, i get logged in to my user's home folder.
But when i do su otheruser and enter the password, i get logged in as the otheruser but the home directory stays for the ...
0
votes
1
answer
43
views
Understanding / in crontab
I have found the following entry in our crontab, and wanted to make sure that I have interpreted it correctly:
0 */2 * * * [some command]
I am assuming that this means run the command twice a day on ...
11
votes
1
answer
8k
views
delete systemd not-found services
My server shows multiple missing services. How can i delete them from Systemd? They are not-found.
systemctl -a shows: multiple not found
systemctl reset-failed shows: still shows
These (none of ...
1
vote
1
answer
73
views
Configuring denyhosts to ignore cron-jobs
So I recently setup denyhosts for my personal server, and it's working fine, except for the fact that it seems to be processing every single cron session, rather than just external accesses.
End ...
1
vote
1
answer
444
views
Linux equivalent of Unix who -m command, to show original user ID before su?
I'm trying to find a Linux equivalent of running who -m in Unix. In Unix, who -m gives the first user ID you used to log in, before starting any new shell sessions through su, etc.
The -m switch to ...
1
vote
1
answer
585
views
Should a deployment user have his shell set to /bin/false?
I deploy web applications by "sandboxing" each application under its own UNIX
user account, behind a common nginx reverse proxy that also serves static files. Each account runs the application server, ...
-2
votes
2
answers
1k
views
Ubuntu 14 find what is consuming disk space
Have any command to see what is consuming disk space on ubuntu 14?
My Ubuntu server has left only 70MB of disk space
thank's
2
votes
1
answer
7k
views
Linux : Count Open Files for Process
How can I check how many open files are currently used?
Checking on PM2 is just an example:
I found the PID:
ps aux | grep pm2 | awk '{ print $2 }'
Checked that there is a limit of 65536 ...
1
vote
0
answers
2k
views
Apache - a sudden “Too many open files”
So we have an apache server running in Linux with no issue.
Yesterday we made a server restart and since then we noticed that the number of open files by the apache processes is keeping increasing ...
2
votes
0
answers
667
views
Unable to Access SSL-encrypted MAMP site over LAN using Squid proxy (Non-SSL sites working fine)
I've got a development site running on a host machine (mac os x) in MAMP that I want to view on a client machine (and also on mobile devices - all mac os). All are connected to the same LAN (wifi). I ...
0
votes
2
answers
368
views
How to do SSH with -i option and bypassing password entry
Using ssh, I want to access
Machine1 --> Machine2
Let's say Machine2 has IP address: 133.165.14.22.
I have copied id_rsa.pub from Machine1 to Machine2
Then in Machine2 I have already did this:
...
0
votes
1
answer
434
views
Packet Sniffer to dynamically create iptables rules
On a router running unix I wish to make monitor all outgoing packets, of these packets I want to temporarily white list IP addresses I am connecting to, to both send and receive.
Basically to create ...
0
votes
3
answers
82
views
How to output column with special patterns
I have a column, with some words:
scatman
batman
superman
scatman
scatman
batman
superman
scatman
scatman
batman
superman
scatman
batman
WWWWWWWW
superman
scatman
batman
superman
scatman
I should ...
-1
votes
2
answers
1k
views
Uniq by two columns with two conditions
i have table with columns. In first column, i have time, when the user has logged, in second column, i have a name of user.
13:15:39 fxs1cia1qulm1lk
13:15:39 fxs1cia1qulm1lk
13:15:39 ...
2
votes
1
answer
3k
views
How do I use stress-ng to simulate memory usage?
I found the command stress-ng -c 0 -l 60 which takes up 60% of the CPU. Is there a similar command for taking a certain percentage of the total memory available?
2
votes
1
answer
1k
views
Many authentication failed logins for "good" users
I have recently notice that my server was reporting at mail.log a lot of bad authentications for know users, and its not a brute force attack. And i really dont know the cause of such authentications. ...
0
votes
1
answer
46
views
Unable to confirm timezone while setting crontab for different unix users
On our production server, UCT timezone has been set for server i.e. for root user but for local technical user different timezone is set in .base_profile.
I want to set cron as per CET but server ...
1
vote
1
answer
2k
views
why /var/log/wtmp and /var/log/lastlog have read permission for other users?
In my Linux server lastlog and wtmp files have read permission set for other users (664) . Do we really need to keep the read permission for other users or can I change it to (660 or 640) . Does it ...
0
votes
1
answer
680
views
Terminate watch command after run completes
I'm using watch in a screenwindow to continually execute a PHP task which processes data every two seconds. Thus, I can logout of the server with it running and can check-in on it. I don't want to ...
-1
votes
1
answer
594
views
OpenVpn troubleshooting
I run a VPN with Openvpn on a Debian 8 server. It works kinda well.
Sometimes (once a month or every 3 weveks) the tunnel stops running and I have to reboot the server to be able to connect to the ...
6
votes
2
answers
15k
views
How to crash a single process in Linux?
I want to analyse the outcome of my application process when it crashes. How can I manually crash a single process in Linux?
0
votes
1
answer
808
views
What is the difference in restricting single user mode with password through /etc/sysconfig/init and /etc/inittab in a Linux system?
I was checking some sites for setting password protection in single user mode login in my Linux server (Oracle Enterprise Linux-OEL) .
In some places I saw the steps to add entry into inititab file ...
0
votes
2
answers
1k
views
LD_LIBRARY_PATH Configuration Setup Issues
I am facing a weird but a sensible issue, I have 2 ORACLE_HOMEs, 1st one points to ORACLE Database Software and 2nd one points to ORACLE Client Software.
Why I am forced to do this - reason is: In my ...