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,944
questions
0
votes
0
answers
42
views
Add mac address in rsyslog template
I am trying to add system/device mac address in syslog. No solution is working for me. Following command gives me mac address, just wanted to use in rsyslog template.
mac_addr=$(ifconfig en0 | awk '/...
0
votes
0
answers
12
views
Cant ssh to ec2 created from AMI of recently patched server
One of my ec2 instance "patched-server-1" was running of kernel version 4.18.0-240.1.1.el8_3.x86_64 and then I did patched the server and current kernel version is 4.18.0-425.19.2.el8_7....
0
votes
0
answers
39
views
ldap+sssd on SuSE shows only local users
Problem: Not able to list ldap users.
Hello,
I am setting up new LDAP authentication on our SuSE 12 test system. I am a LDAP newbie and following the instructions from the site https://www.port389.org/...
0
votes
0
answers
247
views
Can't enable the PHP DOM extension
I have a server that has PHP 7.4.3 installed, but it doesn't load PHP-DOM.
It's not listed in php -m or php -i, nor when I load PHP on a page.
Here's what I tried so far:
Ran sudo apt-get install php-...
0
votes
1
answer
34
views
How to protect Jenkins from super users?
Any super user who has access to the Jenkins running on a Linux server can easily disable security authentication from config.xml file; then log in and can also decrypt sensitive passwords from ...
1
vote
1
answer
151
views
'mail' not working in Script same way it is working from command line
The below line of code/command is working as expected if I run it from Unix terminal, but not if I include it in a script and run the script - exact same.
I am expecting the X-Priority to show the ...
0
votes
0
answers
64
views
How do you get resize2fs to actually fit to your filesystem?
Using Ubuntu Mint here, 20.1 Cinnamon.
I'm trying to reduce a SD partition as much as possible, but when use resize2fs
sudo e2fsck -f /dev/sdb2
sudo resize2fs -M /dev/sdb2
it resizes the partition to ...
0
votes
1
answer
103
views
Adding users to Unix groups only if said groups exist (puppet)
I tried using the 'group' attribute of the 'user' resource like so :
user {
"user":
group => ["docker", "www-data"]
}
If the groups 'docker' and 'www-data' exist ...
0
votes
0
answers
80
views
mysql_upgrade / mysql_check fails with unknown database; where are database names stored (capitalization inconsistency)?
Just upgraded my server machine from freebsd 11.4 to freebsd 12.4.
Then ungraded the installed packages, in particular mysql57-server.
The server is started from a particular user account.
When I try ...
-2
votes
1
answer
65
views
transfer file from Unix to a writeable Windows share, if I don't have direct login rights to the latter
I'm an sa on Unix side, and there is a writeable Windows share, which I can access from my desktop using an AD service account.
How can I batch a file transfer from Unix over to that mount (it's not ...
0
votes
1
answer
47
views
Way to know the current shell in a given terminal
I have a shell on a Unix system.
Is there a command that can tell me which shell I am working ? (bash, zsh, etc. )
-1
votes
1
answer
26
views
Linux analyze and monitoring log tool?
I have a server using OS centos-7, but sometimes my server got slow with some processes. I want to check which service or process makes the system slow. how to check the percentage of CPU, ram, or ...
0
votes
0
answers
328
views
linux/unix/macos - net group command equivalent
I'm trying to query a group in the active directory domain.
net group "groupName" /domain
On windows I can use this command and find all the members of that group. is there an equivalent ...
0
votes
0
answers
144
views
Failed to connect to remote MySQL server via proxy
I am trying to use an R tool in which RMySQL is one of the package being used. I am working this on ubuntu behind a corporate proxy but having the following issue for three days persistently.
Error ...
0
votes
1
answer
480
views
Does information piped through a Unix socket touch disk?
I'm trying to understand how fast different IPC mechanisms are, and I know it's possible to create a Unix Socket as a "file" in a directory on a filesystem, but what I don't understand is ...
2
votes
0
answers
109
views
Is there a utility for detecting temporary system freezes?
Is there a (unix) utility which is able to detect temporary system freezes by observation?
E.g. I could imagine an utility which continuously fetches the system time, sleeps for a specific amount of ...
0
votes
0
answers
88
views
gpart: arg0 'da1' invalid argument
I'm getting an error creating a disk partition when i type the command
gpart create -s GPT da1
it through an error saying invalid argument
0
votes
0
answers
89
views
How to troubleshoot a hung php process on epoll_wait(fd, EPOLLHUP?
On one of the Linux jenkins agent node, there are some PHP jobs that get stuck for days and I tried to troubleshoot that using strace command and I see the following output
epoll_wait(8, [{EPOLLHUP, {...
0
votes
1
answer
34
views
Single SSH login for multilpe machines?
I have a number of physical (desktop) machines running at the office as part of a new network to handle processing & serving Open Source data; some of these machines also house VMs.
At the moment, ...
0
votes
1
answer
227
views
Geting UNIX Timestamp while logging history
I am running below bash script which is saving the history in a file, however it is logging the history with Unix epoch timestamp. I need the timestamp in human readable format.
_who_am_i=$(who am i|...
1
vote
1
answer
728
views
Why some companies like cisco follow different syslog messaging format rather than rfc 3164 (BSD syslog) and rfc 5424 (IETF syslog)?
According to my understanding the popular syslog formats are:
RFC 3124 (BSD syslog):
Format: < priority >timestamp hostname application: message
Example: <133>Feb 25 14:09:07 webserver ...
-2
votes
1
answer
236
views
Why an operating system would like to be POSIX compliant? [closed]
What's the big deal around POSIX and how it interferes in the overall usage of an Operating System?
0
votes
1
answer
280
views
Nginx reverse proxy when port is already in use?
i am trying to close port with basic authentication (for pushgateway of prometheus), so not a big specialist in nginx, so could someone please give me and advice where i am is wrong?
I have 9091 port, ...
0
votes
2
answers
96
views
Issue using dd to write 1GB file to zfs dataset on FreeBSD 13
Hey guys I am turning up a little FAMP stack on an Azure VM. 4 Xeon cores 16GB ram. Second SSD is using ZFS and the boot drive is UFS2 (Default). When I dd if=/dev/zero of=testfile bs=1024 count=...
0
votes
0
answers
727
views
Replace a string from the cat output
I need to replace a string with the string which is mentioned in a file abcd.txt in all files in a folder.
For eg: I want to replace a string 'apple' with whatever the cat output of this file abcd.txt
...
1
vote
0
answers
630
views
Copying files from remote to local using lftp in unix
I'm trying to write a script to copy some files from a remote ftp server to a local directory. I have seen lots of examples using the mirror command of lftp but so far none of them seem to work. ...
0
votes
0
answers
110
views
NextCloud : Can you use encrypted drives / file level encryption?
I am evaluating NextCloud for a solution for which I have a requirement that files cannot exist on non encrypted disks or the files themselves cannot be individually read or cached.
I have read a lot ...
0
votes
1
answer
293
views
What is the maximum value acceptable for xargs -P argument? [duplicate]
In this answer they mention 10
I did man xargs and couldn't find what's the maximum limit.
Is it possible to send 10000 cURL requests per second?
How about 50000 cURL requests per second? I mean all ...
0
votes
1
answer
153
views
What was linux/unix time standard before inventing epoch? [closed]
As in the title, I was looking for, but hadn't found. How were time stored and processed before epoch standardizing in 2000?
0
votes
2
answers
997
views
How to edit the middle of host name (%h) in ssh config?
In ssh config you can easily edit a hostname by appending or prepending it with something. For example, when you want to connect to server with ssh test5, but actually the server name is test5.mail, ...
0
votes
0
answers
430
views
change fastcgi directory in nginx configuration
i am not sure how to write the proper title
i have 5 ajax requests that gonna execute postgresql query in php
here is the directory
/var/www/webgis.com:
1. webgis.html
2. php(directory)
-query1....
0
votes
1
answer
277
views
finding docker images with tag and name
when I do docker images I have below docker images as list where there are images with multiple tag and also image with latest tag value.
REPOSITORY TAG ...
0
votes
1
answer
491
views
What is igrid server - port 19000?
Recently our monitoring tools is reporting a port as down, the port number is 19000.
I have never seen this port before and I don't find out good information. Doing some tests, I've seen I can telnet ...
0
votes
1
answer
405
views
Samba username mapping not working as desired
I have the following username mapping in Samba:
master = johndoe user2 user3
regular = user5 user6
restricted = johndoe user8 user9
By default, Samba will always map johndoe to the last entry in ...
0
votes
0
answers
324
views
lsyncd include specific files exclude rest
I am using lsyncd version 2.2.2. here is my current code.
settings {
logfile = "/etc/lsyncd.log",
statusFile = "/etc/lsyncd.status",
insist = true,
}
sync {
default.rsyncssh, ...
0
votes
2
answers
122
views
Is SSH remote execution more secure as local non-root?
Is there a security benefit running a command remotely via ssh as a local non-root user? In other words, is this actually more dangerous compared to executing the ssh command as non-root:
root@local:~#...
1
vote
0
answers
49
views
How to ensure execution of time consuming task on reboot/shutdown?
I have a bash script that is supposed to execute on reboot/shutdown of a remote Ubuntu server, connected over SSH:
ls /etc/rc{0,6}.d/k99*
/etc/rc0.d/k99_stop_all /etc/rc6.d/k99_stop_all
The script ...
3
votes
0
answers
242
views
Configuring Solaris audit to include username into his events
Need to configure audit logging in Solaris but I have a problem. There are two SunOS servers which were configured before. When I started analysing logs I found out that in Solaris 10 I can see the ...
0
votes
1
answer
182
views
TC Corruption of Packets Ingress
I’m new to tc & this may be naive question but correct me if I’m wrong
tc qdisc change dev eth0 root netem corrupt 5%
Does above command corrupt ingress packets only ?
If Yes, does outgress ...
0
votes
1
answer
27
views
Group of new file created by the webserver is always set to sudo
I am running a magento 2 project on Apache 2 Webserver.
There is a logfile folder at var/log
I have set the permission, user and group of the folder to drwsrwxr-x 2 company www-data by using chmod ...
2
votes
1
answer
482
views
Extract a ids from text file
I have a text file live below
{
"data": {
"assigned-entity-id": null,
"assigned-entity-type": null,
"availability-domain": null,
"...
1
vote
2
answers
577
views
Security: Linux - Postfix/dovecot - Roundcube - unix permissions for the mail user
Background:
I am running a working mail server with a postfix/dovecot on debian buster as in this guide. Like in the guide, I installed roundcube on the frontend.
The last chapter of the guide ...
0
votes
0
answers
214
views
Add IPV6 range / block on network debian configuration
I am configuring a network interface on my server, editing this file /etc/network/interfaces.d/50-cloud-init.cfg
I need to have a list of IP address configured which all are in the same ip-block.
For ...
0
votes
0
answers
107
views
When a solaris server has 2 SSHs installed, how to choose which one client is connected to
Currently my solaris server has 2 SSH installed:
/usr/bin/ssh (Sun_SSH_1.1.6)
/usr/local/bin/ssh (OpenSSH_5.1p)
When I SSH this solaris server from another, /usr/bin/ssh is responding.
I would like /...
0
votes
0
answers
273
views
IPtables rules in python using bash script
Here is my python script in bash, I am using subprocess.run to call iptables command , but I am getting an error
subprocess.run(["/usr/sbin/iptables", "-A", "INPUT", &...
0
votes
1
answer
282
views
Renaming a tar file in unix script
cd /var/opt/sw/e4/data/dev/e4_dev/DEVL3/EW/EWD1/DATA/AED/INPUT
for file in *;do tar -czf ../OUTPUT/"${file}".tar; done
According to the above code the files in input path eg. aedlog, aaalog....
0
votes
1
answer
226
views
Security implications of having less permission restrictions on a group than owner in Unix?
I have an Ubuntu server that's currently hosting a WordPress site using an Apache web server, MySQL and PHP etc. Additionally I have configured VSFTPD and SSH to handle FTPS (implicit FTPS) and SFTP ...
0
votes
1
answer
334
views
Exclude subdirectory from host resolution set in /etc/hosts (with dnsmasq, or anything else)
I have a local development tool (LocalWP) that sets the path to my local environment by modifying /etc/hosts.
For example, if I set my site in Local to www.foo.com, it'll append the following to the ...
0
votes
1
answer
319
views
Rsyslog using more memory on CentOS 7
I see rsyslog is using more memory on my EC2 instance. Is there a way we can fix it?
I tried cat /proc/<pid_of_rsyslogd>/limits and tried changing the limit value but no luck.
Max stack size ...
0
votes
0
answers
139
views
AWK to read multiple files in linux without duplicates
I have a task to merge three files in linux, so i used awk to achieve this task.
hostsfiles is a variable which has test.txt test1.txt and test3.txt
awk 1 {{ hostsfiles | join(' ') }}
I get below ...