Hot answers tagged

5

When troubleshooting problems with daemons, you should always check the system logs. In this particular case, if you check your system logs on the NAS host, you'll see something similar to: Authentication refused: bad ownership or modes for directory /home/admin The problem is shown in this output: admin@NAS:~$ ls -alh drwxrwxrwx 6 admin users 4.0K Jun ...


5

Logfiles are plain text files, and each line is appended at the end. So there is no loss of data when using non-UTC timezone. Of course, you may view the files using a tool which can get confused. However, the usual reason for using UTC is to avoid ambiguity: you do not have to know what the local timezone is to interpret the data. So yes, using UTC in ...


5

apt-get install whois Requires a network connection that can see the kali repo at http://http.kali.org/


5

I'm not sure if you're trying to convert lower to upper or remove lower all together. Give this a shot for the lower to upper conversion. tr [:lower:] [:upper:] < ws2.txt To trim out lowercase chars you can use sed sed -e 's/[a-z]//g' ws2.txt Or you can use tr as suggested by @fd0 tr -d '[:lower:]' < ws2.txt To trim out numbers and capital ...


4

Try running watch netstat -i while traffic is flowing. The active interface will have increasing counters. The command netstat -rn may give you some more information. I would expect traffic to flow on the interface with the lowest irtt value.


3

With awk $ awk '{$1=FNR-1; print}' OFS='\t' file 0 0 chr1 3000575 3000801 0 chr1 4340023 4340249 32 32 1 0 chr1 3000641 3000801 -1 chr1 3311943 3311783 32 32 2 0 chr1 3000674 3000801 -1 chr1 3001534 3001407 32 32 3 0 chr1 3000674 3000801 -1 chr1 3001534 3001407 32 32 4 0 chr1 3000674 3000801 -1 chr1 ...


3

To number lines, you may use nl. To remove columns (or rather filter out the ones you want to keep), you may use cut: $ cut -f 2- cols.txt | nl 1 0 chr1 3000575 3000801 0 chr1 4340023 4340249 32 32 2 0 chr1 3000641 3000801 -1 chr1 3311943 3311783 32 32 3 0 chr1 3000674 3000801 -1 ...


3

ss uses the AF_NETLINK socket layer to talk to the kernel. This is a lower level protocol but allows for data to be transferred very quickly and in large chunks. A quick strace on CentOS 7 shows it sets the transfer window to be 1Mb.


3

The wc (word-count) utility is able to count lines in a file: $ wc -l num.txt ... or rather, it counts the number of newlines in the file, which most of the time is the same thing (actually, on a Unix system, that is defined as the same thing). The manual (on Mac OS X) states: "Characters beyond the final <newline> character will not be ...


3

The command line history for bash shell sessions are stored in the ~/.bash_history file. If this file does not exist, it is created with no read permissions for other users. You may change the number of commands that bash saves into this file by setting the HISTFILESIZE environment variable. Setting it to zero will truncate the history file to zero size. ...


3

When you press Enter, the full command is already on the remote machine. There is no guarantee that this will not cause a disconnect but the reason it hasn't impacted your session so far is that the system didn't have time to notice the disconnection which actually happened. Processes which are receiving data while it gets disconnected will probably ...


3

Proper way of doing this is to put those commands in a simple shell script and executing this script, after transferring it to the remote machine, by a single remote ssh command rather than two commands on one line, separated by a semicolon. Normally, as Julie said, it is not something to worry about but it is not bullet-proof either. Also, consider, some ...


2

I don't think Rob's answer is right. Those mails are apparently sent by the software that you installed. You need to fix the installation. Sadly, you don't provide enough information to pinpoint the problem exactly, especially information about the failed installation of that anti-spam plugin.


2

Your shell is likely not bash. Change it with chsh. Also, there's a problem with part of the $PS1 value: PS1=" \w \u\[$(tput sgr0)\]" The $(...) will be evaluated when you set PS1, but just that one time. If you would like to execute tput sgr0 every time the prompt displays, use single quotes: PS1='\w \u\[$(tput sgr0)\] \$ ' (I have also moved the ...


2

Unix (and Linux) has the concept of real user and effective user. A setuid program such as /usr/bin/passwd will set the effective user to the owner of the file; in this case it sets the effective user to root. Now what a program does with these elevated permissions is up to the program itself. In the case of the passwd program, if you pass a username then ...


2

ip route will show you where your system is sending packets. man ip-route will start you on a path to controlling where the packets go.


2

The strings aren't actually ANSI sequences. Rather, they started as ANSI sequences, but are translated (due to some scripting error) on your remote machine so that most of the characters are converted to a different form. An ANSI sequence for instance would have escape[A possibly with an optional ; before the A, but the problematic output shows a 133 ([ ...


2

Logfiles do not "handle" time zones, they just record what some application or service wrote there. So if an application writes "just the messages" and "directly to the log file", you're out of luck. Some syslog servers (like syslog-ng) allow you to "decorate" the "raw" log data by time stamps, where you can choose to use UTC or local time with or without ...


2

You can use a parallel shell such as clustershell or pdsh. This way, assuming you already set up a passwordless SSH authentication from a central machine, you can run a command on each of the 100 servers at the same time. You can also go further and do various groups in order to organize them logically. Lets assume your machines are named aws0, aws1, aws2, ...


2

If you create a "logical" partition then the tool will automatically create an extended partition for it and this will be reflected in the screen display after you create the logical partition. This won't work if you've already created 4 primary partitions because the extended partition needs one of those slots, but as long as you've only created 1->3 ...


2

The Unix kernel has traditionally included some assembly language code.  I haven’t looked at its source code recently, but I suspect that that’s still true. See How does a driver actually communicate with a hardware device? for an overview of that topic.  The answers to that question discuss two kinds of computer architecture.  On a system that uses port-...


2

May be you shoul try to add first start after boot, like this: [Timer] OnBootSec=15min OnUnitActiveSec=2m


2

Unfortunately, that's just not going to work well—not because of the IP being on both interfaces, but because the subnet is. If your device needs to talk to 192.168.1.2, which interface should it send that traffic on? Maybe that's the customer's device trying to talk to your device, maybe it's your device trying to talk to one of your other devices. The ...


2

GTK 3.20 made some significant changes to the way that themes are handled. Unfortunately, the Delorean theme has not been updated to support GTK 3.20. You need to use a theme that is GTK 3.20 compliant like the Vertex or Arc themes (or petition the Delorean theme author to make the theme GTK 3.20 compliant).


2

I'm sure someone is still doing this, but back in the days before stuff like ILO/DRAC/etc. became cheap and ubiquitios the best way to get "out of band" access to the console in case of emergencies or an oops was over the serial port. You would mount a Terminal Server in the rack, then run cables to the serial port of your servers. Some BIOSs supported ...


1

In order to truly understand, I'd recommend some reading about I/O operations in the C programming language. I find it easiest to understand that from a programming perspective when you deal with devices, socket, pipes, etc just as you do with files just like the Linux/Unix OSs do. Moreover you can read this value in wikipedia.


1

Any chance you created a password for your private key while creating it using ssh-keygen. Following is the workflow I use: ssh-keygen ssh-copy-id root@remote_host scp /test.text root@remote_host:/opt/application/


1

$ echo 3.14 >> /tmp/numbers $ echo 2 >> /tmp/numbers $ echo 4.0 >> /tmp/numbers $ awk '{print $1 * $1}' < /tmp/numbers 9.8596 4 16 $ awk '{print $1 * $1}' < /tmp/numbers > /path/to/OutputFile


1

With ed (using a literal tab, composed as Ctrl-V+TAB, in the substitution) $ ed -s file << EOF ,s/0 // ,n q EOF 1 0 chr1 3000575 3000801 0 chr1 4340023 4340249 32 32 2 0 chr1 3000641 3000801 -1 chr1 3311943 3311783 32 32 3 0 chr1 3000674 3000801 -1 chr1 3001534 3001407 32 32 4 0 chr1 3000674 ...


1

Maybe you are looking for a "chroot jail for ssh", if the users require a terminal. Otherwise, if you just need they can access to their homes, configure sshd to jail stfp users in their homes: add to sshd_config: Match group myGroup //Also can match users ChrootDirectory %h ForceCommand internal-sftp -u 0007 AllowTcpForwarding no ...



Only top voted, non community-wiki answers of a minimum length are eligible