title: How customize initrd via linuxrc

text: I have the need to use the same disk and so the same bootloader on devices with different motherboard. Each motherboard has it's own way of mapping devices so sometime the bootdisk is mapped ad hda other as hdc. I already try to manage this boot with different device assigning and before start check how thw board mapped the boot device ( hda, hdc , ecc... ) and based on that mapping fix the boot parameter. I already try to manage the boot from dom with different device replacing the device name with the LABEL option ( grub bootloader ). But it didn't works This works               title Linux 2.4.37.9             root (hd0,0)             kernel /boot/vmlinuz-2.4.37.9 ro root=/dev/hda1  console=ttyS0,9600 console=tty0 apm=off      This didn't works ( kernel unable to find root=LABEL=Flash-Root )               title Linux 2.4.37.9             root (hd0,0)             kernel /boot/vmlinuz-2.4.37.9 ro root=LABEL=Flash-Root  console=ttyS0,9600 console=tty0 apm=off      Some guys suggested my as an alternative solution to manage initrd and so I now trying to manage and fix the boot parameter through the script linuxrc Mi first question is about documentation about nash, the scripting interpreter used by linuxrc. I haven't found documentation about how use nash and most important how use nash for linuxrc. Does someone known how can I find some documentation and samples ? My second ( and last ) question is about how can I check from insice linuxrc what device ( hda1, hdc1, ecc.. ) is valid and based on that set the right value for the /proc/sys/kernel/real-root-dev variable. I think to check the disk using fdisk, but this program require some library to be loaded inside initrd and so I'm looking for a solution which need less space.


title: Vim, netrw plugin tmp files not uploaded at server

text: If I connect via sftp with netrw plugin and open the file, filepath looks like `sftp://..` In current session if I close this file and reopen it, netrw loads file from `/tmp/..` and after saving this file is not uploaded to server. How can I delete temp file after closing?


title: Unable to add ubuntu to windows domains? using centrify

text: I'm using this guide to add my linux (10.04 lucid) ubuntu machine to domain. First I tried using likewise, but couldn't do this apparently due to some compatibility issues with 10.04 kernel. I had downloaded the 25 Mb size centrify agent. I run the command using this command: `./install-express.sh` Everything works fine. As i stumble on these sets of input               Active Directory domain to join  : example.com     Active Directory authorized user : administrator     computer name                    : dev     container DN                     : Computers     domain controller name           : domain-controller.example.com      In container DN name i have found a vbscript on the internet which allows me to retrieve given user name DN. E.G.: DN: CN=George Jetson, OU=Vehicles, OU=Engineering, DC=YOURDOAMIN,DC=COM I enter Vehicles since this is the most specific of the OU definition. I'm doing this fine? Or i need to add like Vehicles.Engineering. ? Do i have to goto node level or just parent-node or sub-parent node. However, as I enter the domain user/password and I accept Y at the end. It goes through couple of checks it says (PASS) to all of them until i'm echohed with the error. Its related to krb5 or some kind of authentication. This error is also seen in `var/log/centrify.log` with error code 26. This is not an authentication error because I have tried it with giving wrong credentials and the output given then is of incorrect user/password. I want to know if I need to add some other packages of kerberos. Since I'm using backtrack 5 its not what you call a standard/Off the shelf ubuntu installation. Its most customized and built for security products integration. Please guide me in troubleshooting this problem.


title: Realize a multiseat system with a polarized 3D-monitor

text: Besides playing 3D-material, modern 3D-TV-sets (using polarization technology) offer the possibility of dual-play. While 3d-playback works with different polarization for the left and the right eye, with dual play 2 users can watch completely different 2d-material at the same time on the same screen. To make it work, each of the 2 users gets different glasses: one is horizontally polarized on both eyes, the other is only vertically polarized. By now, this technology is primarily used for 2 player games, to replace split screens. My idea is to use this technology for a multiseat system (I would prefer using Debian). For a multiseat-setup, one usually needs 2 keyboards, 2 mice, 2 video-cards and two screens, but when using a 3D-TV-set, one video card (and of course just one screen) should be sufficient. Therefore, apart from the "normal" setup of a multiseat system, the major difficulty would be to get the two different video-signals to the TV-set like if they were just one stereoscopic signal. One possibility would be to send the two signals side-by-side or over-under. So basically, the goal could be achieved with a setup like in this video but with display settings for a 3D-TV (and with a modern operating system, best would be debian with gnome 3). Finally, I want to add that I don't own a 3D-TV yet, therefore I cannot verify your answer. Still I would be glad if somebody could discuss the feasibility of such a system.


title: How can I set left alt + right shift keyboard layout switch in xubuntu?

text: From what I found from xkeyboard-config man page there is no such combination, which is very upset. Is there any workaround for that? Because I want layout change to be as in winXP.


title: How can I access a linux box at home in my browser at work?

text: I want to be able to use taskwarrior at work. But the computers at work don't allow me to install anything, they all run Win XP, and IE... So, I would like to somehow SSH to a linux box at home, and do it through a browser. I should mention that I'd be working with a dynamic IP. Is this possible? If so, what is the simplest way to do this?


title: Setting up enviroment variables in Ubuntu

text: I am trying to setup up my enviroment variable in my Ubuntu machine. Now i did some research and tryed the method on this question Set environment variable in Ubuntu Similar question but the thing is I already wrote up the "etc/enviroment" the "etc/profile" and the "etc/bash.bashrc" file to include my variables:               JAVA_HOME=/home/glv/information/jdk1.6.0_25/     export JAVA_HOME     BASEDIR=/home/glv/apache-tomcat-6.0.29/       export BASEDIR      However the problem is when i run the startup.sh on apache it still says that the BASEDIR enviroment variable is not setup right and for all I know the JAVA_HOME may not be correct as well. I am using the latest Ubuntu not sure if that a problem or not or if i have to go another way around it. Any help would be appreciated.


title: What's the right way to sort a associated array in bash or zsh?

text: I'm wondering how should I sort the associated array in bash? I tried the manual, but seems nothing related to sort. The current solution is echo everything out, and use external program i.e `key value | sort -k2` That looks inefficient to me. An example of array was:               A['192.168.2.2']=5     A['192.168.3.2']=1     A['192.168.1.1']=9      And I'll be looking for the top 2 used IP address, which is 192.168.1.1 and 192.168.2.2, that is, I need to sort this array by it's value.


title: Nginx not available from localhost, but available by network

text: Have server with installed nginx and php-fpm. Some sctript need access to part of site via curl. But it fails. I tried to run curl on server :               curl -v -i alexcoder.info     * About to connect() to alexcoder.info port 80 (#0)     *   Trying 88.198.156.238...     * Connection refused     * couldn't connect to host     * Closing connection #0     curl: (7) couldn't connect to host      But from network sites available :               curl -v -i alexcoder.info     * Rebuilt URL to: alexcoder.info/     * Adding handle: conn: 0x702b10     * Adding handle: send: 0     * Adding handle: recv: 0     * Curl_addHandleToPipeline: length: 1     * - Conn 0 (0x702b10) send_pipe: 1, recv_pipe: 0     * About to connect() to alexcoder.info port 80 (#0)     *   Trying 88.198.156.238...     * Connected to alexcoder.info (88.198.156.238) port 80 (#0)     > GET / HTTP/1.1     > User-Agent: curl/7.32.0     > Host: alexcoder.info     > Accept: */*     >      < HTTP/1.1 200 OK      HTTP/1.1 200 OK nginx logs does not contain any errors aboout this. I tried to flush iptables rules but it take no effect. What it may be?


title: How do I open all files in the current directory and all subdirectories using vim?

text: So far I've been using `vim */**` which seems to open all files in subdirectories but _not_ those in the current directory, and `vim *` which opens all files in the `current` directory. But how do I open all files in the current directory _and_ all subdirectories?


title: How to get Debian to detect my Audigy 2

text: I started my PC this morning and noticed that I had no sound. Since last using the sound card successfully, I had installed `openssh-server`, but I suspect this is unrelated. I think my PC isn't picking up the sound card. Typing `lspci -nn | grep -i audio` produces the following: > 04:00.1 Audio device [0403]: Advanced Micro Devices [AMD] nee ATI Device > [1002:aab0] I don't know what that is, but it's not my sound card (I do have an ATI video card though). I tried taking out the physical sound card, cleaning the PCI slot, and putting it back in, to no effect. I do kick the case by accident sometimes, and it is an old card, so I wouldn't rule out that it just died, but I'd like to be sure (I have no other PC on which to check the card, and I don't have Windows installed...). When I go to `System Tools -> Preferences -> System Settings -> Sound` I see only a `Dummy Output` device. I tried following these instructions and ran the following:               aptitude install alsa-base alsa-utils     adduser yourusername audio #this said I've already been added      Then I ran `alsamixer` and confirmed that nothing was muted, and tried running `speaker-test -t sine -f 440 -c 2` but couldn't hear anything. Running `lspci` produced the same output as before. Does anyone have tips on how I can further diagnose this and track down the problem to hopefully confirm whether this is a software issue or not?


title: How to get back from "testing" to "stable" - Kernel downgrade

text: currently I am having lot's of fun with `apt-get` - and the bad thing is, it was my own fault. I had enabled the `testing` packages in `/etc/apt/sources.list` to install a certain package. And I told my system do `apt-get dist-upgrade`. Everything worked fine, but now I am trying to get back to the `stable`updated - and I fail... When trying to do the `apt-get dist-upgrade`, i get the following information:               The following packages will be REMOVED:       linux-image-3.10-3-amd64     The following NEW packages will be installed:       libcgi-fast-perl libfcgi-perl libyaml-syck-perl     The following packages will be DOWNGRADED:       initramfs-tools libdate-manip-perl munin munin-common      Well, that's okay, but when I am try to do this, I get a warning in bold friendly red letters:               You are running a kernel (version 3.10-3-amd64) and attempting to remove the same version.     ...     It is highly recommended to abort the kernel removal unless you are prepared to fix the system after removal.      Well, I like to follow the recommendmend. The correct kernel version for the `stable` release would be `linux-image-3.2.0-4-amd64` and it is already installed. Probably the downgrade would be no problem if I was working under the older kernel? Actually, I have no clue how to enable the kernel `3.2.0` instead of `3.10`.


title: Broken libglib on debian 6

text: So, some time ago I wanted to update mpd from 1.5 to 1.6 which required a newer version of libglib( >= 2.31.8) on amd64, so I compiled them from source as I was on debian oldstable and couldn't find an easier way of doing that. For various reasons I didn't have access to that system again until now. When I tried to run mpd it gave me the following error:               mpd/usr/bin/mpd: symbol lookup error: /usr/bin/mpd: undefined symbol: g_malloc_n failed!      I tried reinstalling mpd but to no result, so then I tried to install the old libglib from the package manager this time. The installation didn't do much as it reported libglib to be the newest version and then when it tried to install some additional packages (such as libglib2.0-dev or libglib2.0-doc) it failed giving this error:               * Installing 1 assembly from libglib2.0-cil into Mono     /usr/bin/mono: symbol lookup error: /usr/bin/mono: undefined symbol: g_malloc0_n     Use of uninitialized value $_ in scalar chomp at /usr/share/cli-common/runtimes.d/mono line 144.     Use of uninitialized value $fullname in concatenation (.) or string at /usr/share/cli-common/runtimes.d/mono line 113.     /usr/bin/mono: symbol lookup error: /usr/bin/mono: undefined symbol: g_malloc0_n      So then I tried my luck with apt-get --reinstall libglib2.0 and the output was this:               Reading package lists... Done     Building dependency tree     Reading state information... Done     Note, selecting 'libglib2.0-0' for regex 'libglib2.0'     Note, selecting 'libglib2.0-dev' for regex 'libglib2.0'     Note, selecting 'libglib2.0-doc' for regex 'libglib2.0'     Note, selecting 'libglib2.0-cil' for regex 'libglib2.0'     Note, selecting 'libglib2.0-0-dbg' for regex 'libglib2.0'     Note, selecting 'libglib2.0-dbg' for regex 'libglib2.0'     Note, selecting 'libglib2.0-0-refdbg' for regex 'libglib2.0'     Note, selecting 'libglib2.0-data' for regex 'libglib2.0'     Note, selecting 'libglib2.0-cil-dev' for regex 'libglib2.0'     0 upgraded, 0 newly installed, 8 reinstalled, 0 to remove and 0 not upgraded.     7 not fully installed or removed.     Need to get 0 B/6,964 kB of archives.     After this operation, 0 B of additional disk space will be used.     (Reading database ... 55452 files and directories currently installed.)     Preparing to replace libglib2.0-0 2.24.2-1 (using .../libglib2.0-0_2.24.2-1_amd64.deb) ...     Unpacking replacement libglib2.0-0 ...     Preparing to replace libglib2.0-data 2.24.2-1 (using .../libglib2.0-data_2.24.2-1_all.deb) ...     Unpacking replacement libglib2.0-data ...     Preparing to replace libglib2.0-dev 2.24.2-1 (using .../libglib2.0-dev_2.24.2-1_amd64.deb) ...     Unpacking replacement libglib2.0-dev ...     Preparing to replace libglib2.0-doc 2.24.2-1 (using .../libglib2.0-doc_2.24.2-1_all.deb) ...     Unpacking replacement libglib2.0-doc ...     Preparing to replace libglib2.0-0-dbg 2.24.2-1 (using .../libglib2.0-0-dbg_2.24.2-1_amd64.deb) ...     Unpacking replacement libglib2.0-0-dbg ...     Preparing to replace libglib2.0-0-refdbg 2.24.2-1 (using .../libglib2.0-0-refdbg_2.24.2-1_amd64.deb) ...     Unpacking replacement libglib2.0-0-refdbg ...     Setting up mono-gac (2.6.7-5.1) ...     * Installing 1 assembly from libglib2.0-cil into Mono     /usr/bin/mono: symbol lookup error: /usr/bin/mono: undefined symbol: g_malloc0_n     Use of uninitialized value $_ in scalar chomp at /usr/share/cli-common/runtimes.d/mono line 144.     Use of uninitialized value $fullname in concatenation (.) or string at /usr/share/cli-common/runtimes.d/mono line 113.     /usr/bin/mono: symbol lookup error: /usr/bin/mono: undefined symbol: g_malloc0_n     E: installing Assembly /usr/lib/cli/glib-sharp-2.0/glib-sharp.dll failed     E: Installation of libglib2.0-cil with /usr/share/cli-common/runtimes.d/mono failed     dpkg: error processing mono-gac (--configure):      subprocess installed post-installation script returned error exit status 9     configured to not write apport reports                                           dpkg: dependency problems prevent configuration of mono-runtime:      mono-runtime depends on mono-gac (= 2.6.7-5.1); however:       Package mono-gac is not configured yet.     dpkg: error processing mono-runtime (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of libmono-corlib2.0-cil:      libmono-corlib2.0-cil depends on mono-runtime (>= 2.6.7); however:       Package mono-runtime is not configured yet.      libmono-corlib2.0-cil depends on mono-runtime (<< 2.6.8); however:       Package mono-runtime is not configured yet.     dpkg: error processing libmono-corlib2.0-cil (--configure):      dependency problems - leaving unconfigured     configured to not write apport reports                                           configured to not write apport reports                                                                                dpkg: dependency problems prevent configuration of libmono-system2.0-cil:      libmono-system2.0-cil depends on libmono-corlib2.0-cil (>= 2.6.3); however:       Package libmono-corlib2.0-cil is not configured yet.      libmono-system2.0-cil depends on mono-runtime (>= 2.6.7); however:       Package mono-runtime is not configured yet.      libmono-system2.0-cil depends on mono-runtime (<< 2.6.8); however:       Package mono-runtime is not configured yet.     dpkg: error processing libmono-system2.0-cil (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of libmono-posix2.0-cil:      libmono-posix2.0-cil depends on libmono-corlib2.0-cil (>= 2.6.3); however:       Package libmono-corlib2.0-cil is not configured yet.      libmono-posix2.0-cil depends on libmono-system2.0-cil (>= 2.6.3); however:       Package libmono-system2.0-cil is not configured yet.      libmono-posix2.0-cil depends on mono-runtime (>= 2.4); however:       Package mono-runtime is not configured yet.     dpkg: error processing libmono-posix2.0-cil (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of libglib2.0-cil:      libglib2.0-cil depends on libmono-corlib2.0-cil (>= 1.2.2.1); however:       Package libmono-corlib2.0-cil is not configured yet.      libglib2.0-cil depends on libmono-system2.0-cil (>= 2.4.3); however:       Package libmono-system2.0-cil is not configured yet.     dpkg: error processing libglib2.0-cil (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuraconfigured to not write apport reports                                                                                configured to not write apport reports                      configured to not write apport reports                                                            configured to not write apport reports                                                                                tion of libglib2.0-cil-dev:      libglib2.0-cil-dev depends on libglib2.0-cil (= 2.12.10-1); however:       Package libglib2.0-cil is not configured yet.     dpkg: error processing libglib2.0-cil-dev (--configure):      dependency problems - leaving unconfigured     Setting up libglib2.0-0 (2.24.2-1) ...     Setting up libglib2.0-data (2.24.2-1) ...     Setting up libglib2.0-dev (2.24.2-1) ...     Setting up libglib2.0-doc (2.24.2-1) ...     Setting up libglib2.0-0-dbg (2.24.2-1) ...     Setting up libglib2.0-0-refdbg (2.24.2-1) ...     Errors were encountered while processing:      mono-gac      mono-runtime      libmono-corlib2.0-cil      libmono-system2.0-cil      libmono-posix2.0-cil      libglib2.0-cil      libglib2.0-cil-dev     E: Sub-process /usr/bin/dpkg returned an error code (1)      apt-get check didn't find any broken deps so it didn't really help. Thankfully, nothing major seems to be broken. As I said, because there was quite some time since I compiled libglib I don't really remember what I did, and I'm not sure how to revert it.


title: Is there a difference between hardlinking with cp -l or ln?

text: I am implementing a backup scheme using rsync and hardlinks. I know I can use link-dest with rsync to do the hardlinks, but I saw mention of using "cp -l" before "link-dest" was implemented in rsync. Another method of hardlinking I know of is "ln". So my question is, out of curiosity: is there a difference in making hardlinks using "cp -l" as compared to using "ln"?


title: Bash script to detect when my server is down or offline

text: Background : I need to receive an alert when my server is down. When the server is down, maybe the Sysload collector will not be able to send any alert. To receive an alert when the server is down, I have an external source (server) to detect it. Question : Is there any way (i prefer bash script) to detect when my server is down or offline and sends an alert message (Email + SMS)?


title: Highlight path separators in PS1

text: I want to do something like this in Bash: how to format the path in a zsh prompt? But everything I try results in the `PWD` being fixed to the first directory I start my terminal in. Strangely I've also got a function in my `PS1` to put the current git branch in the prompt and that always updates so I'm confused as to why the `PWD` gets stuck. My current prompt is here incidentally. I tried replacing `\w` with `$(pwd|grep --color=always /)` but that just gets stuck. I also tried doing it using a bash string replacement but that doesn't work either. `${PWD////$bldred/$bldblu}` ($bldred and $bldblu are defined in my prompt.sh).


title: Why is my CIFS share showing the same files multiple times?

text: I asked this on ServerFault but received no response, so I figured I'd give it a try over here instead! I have a Debian backup server running the FreeBSD kernel and a ZFS filesystem on which I store backups, using ZFS's snapshot and compression technologies. The Debian server uses `rsync` to pull files from multiple other servers via a cron job. This process works great. I then use CIFS to share the backups back to the original servers, so I can easily browse them and restore files from each server. However, when I use `ls` on the servers to look at the contents of certain directories on the backup share (mounted via CIFS) I see the same exact files listed multiple times. Many, many times in fact:               [root@webserver01 public_html]# ls -li /backup/scripts/|less     total 663621     57872359 drwxr-xr-x  4 root root      0 Apr  3 21:40 ./            2 drwxr-xr-x 20 root root      0 Mar 24 18:20 ../     57872880 -rw-r--r--  1 root root   6494 Dec 16  2008 AcctLock.pm     57873180 lrwxrwxrwx  1 root root      7 Mar 15 15:21 adddns -> add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*     57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*      But on the debian backup server, it looks fine:               root@timestandstill:/# ls -l /backups/myvenue/scripts/|less     total 1893     -rw-r--r-- 1 root root   6494 Dec 16  2008 AcctLock.pm     lrwxrwxrwx 1 root root      7 Mar 15 15:21 adddns -> add_dns     -rwxr-xr-x 1 root root   2010 Nov  8 20:55 add_dns     -rwxr-xr-x 1 root root   5797 Nov  8 20:55 addfpmail     -rwxr-xr-x 1 root root   1949 Nov  8 20:55 addpop     -rwxr-xr-x 1 root root    490 Oct 10  2007 addservlets     -rwxr-xr-x 1 root root     53 Mar 10  2008 adduser     -rwxr-xr-x 1 root root    305 Mar 23  2006 admin     -rwxr-xr-x 1 root root   3926 Nov  8 20:55 after_perl_upgrade     -rw-r--r-- 1 root root    654 Mar 23  2006 anonuser.patch     -rwxr-xr-x 1 root root   2961 Nov  8 20:55 apachelimits     -rwxr-xr-x 1 root root   1014 Sep 23  2010 apacheloadcheck     -rw-r--r-- 1 root root     99 Mar 23  2006 aquota.user_emptyfs.gz     -rw-r--r-- 1 root root   3023 Nov  8 20:55 archive_sync_zones     -rwxr-xr-x 1 root root   1109 Nov  8 20:55 autorepair     -rwxr-xr-x 1 root root   5167 Nov  8 20:55 bandminup     -rwxr-xr-x 1 root root   1540 Nov  8 20:55 biglogcheck     -rwxr-xr-x 1 root root    252 Mar 23  2006 bitstest     -rwxr-xr-x 1 root root   2224 Nov  8 20:55 bsdbindfix     -rwxr-xr-x 1 root root   2479 Nov  8 20:55 bsdcryptoinstall     -rwxr-xr-x 1 root root   3003 Nov  8 20:55 bsdi386compatinstall     -rwxr-xr-x 1 root root    430 Nov  8 20:55 bsdldconfig     -rwxr-xr-x 1 root root   2363 Nov  8 20:55 bsdpkgpingtest     -rwxr-xr-x 1 root root    452 Dec 16  2008 buildbsdexpect     -rwxr-xr-x 1 root root   2766 Nov  8 20:55 builddovecotconf     -rwxr-xr-x 1 root root   5298 Nov  8 20:55 buildeximconf      What could be causing this and how can I resolve it? **I'm not tied to CIFS, so if there's a better technology I am open to it.** I was using NFS before when the backup server was Open Solaris, but it seems Debian doesn't support NFS when using the FreeBSD kernel...


title: Cpanel directory chgrp issues

text: I'm struggling to get a directory to work with user:group. After creating the directory via WHM I've logged in via SSH and set:               chgrp -R developers mysitedirectory      Which results in a 500 internal server error. I've also added the Cpanel user for this website to the developers group using usermod:               usermod -a -G developers Cpanel_user      Any help to get this directory working with read & write permissions for everyone in the group would be greatly appreciated. **Edit** The directory is in /home and is generated when adding a new account to WHM / Cpanel The directory contains website files, the site works fine when set to user:user but throws 500 error when using user:developers User is also a part of developers **EDIT 2** Error log shows: Premature end of script headers: index.php SoftException in Application.cpp:422: Mismatch between target UID (99) and UID (502) of file “/home/xxxxxxxx/public_html/index.php folders are set to chmod 755 and files to chmod 644


title: Screen flickers in Fedora 17

text: Screen flickers every 10 seconds. (I timed with a stopwatch, screen flickers every 10 seconds, 6 times a minute exactly.) I've used Windows and I'm trying to use Linux. I don't know much about Linux. I think maybe this is about monitor frequency. But I don't know how and where I can fix it. But it's just my guess, many other reasons can exist. When I replaced Linux embedded driver with the NVidia driver, XWindows doesn't boot, I only see the Fedora logo. How can I fix this?


title: Shall I upgrade my OS from Ubuntu13.04 to Ubuntu13.10?

text: I am working on Ubuntu13.04. Now Ubuntu13.10 is available. So, I wanted your advice on what added features and advantages I may expect from the latest version. I read this link to know about the latest version. Below is an excerpt from the link: > The most important is, of course, the new Linux kernel 3.11.x, which is now > the latest stable version available at the time of the launch. It comes with > support for more devices and hardware components, better power management, > and a ton of other improvements. I had been getting error messages from Ubuntu13.04 and Ubuntu12.10 that my system has encountered an unexpected error. I wasn't ever able to get rid of this error message although I kept my system up-to-date by updating regularly. If I upgrade my system, this should be of my concern to check whether I'm able to get rid of this. Also the above link says that one can expect better performance from the latest release. Is there any time limit within which I can upgrade & post which my OS (Ubuntu13.04) can't be upgraded? Also I would like to ask if there is any advertisement or post from the company that would focus clearly on the performance of the latest release in contrast with the previous releases?


title: at and daylight saving time

text: Suppose I have added a task via `at -t` specifying the next day in my timezone. The next day my timezone changes as of daylight saving time. The question is whether the task will be executed correctly at expected time.


title: How can I find the text show in the screen when linux boot? That's not the same as dmesg shows

text: When gnu/linux boot message shows, that's not the same as `dmesg` shows. How can I find it back?


title: Execute file in its native directory with shell script

text: I'm executing a php file from the php-cli with a shell script. One of the php files creates a file named `available_data` during the course of its execution. The problem is that the php file needs to write the file `available_data` to the same directory where the php file resides on the server /var/www/html. Instead it writes the file to the directory where the shell script resides /bin/scripts/. Here's my script (resides in /bin/scripts/createview.sh)               php /var/www/html/createview_customer.php      I think the problem is that the php file executes in /bin/scripts. How can I get the php file to execute in /var/www/html instead?


title: How can I highlight text in Calibre?

text: according to a 4 year-old forum entry at Calibre, they started working on the feature of being able to highlight text, 4 years ago. Does anyone know how if it is implemented yet and how to use it?


title: How do I stop bash from hanging when trying to start programmes while NFS is disrupted

text: I am currently experiencing a bug in Ubuntu 13.10 which means that when I resume my machine after a suspend, the network connections do not come back up. I have a couple of NFS mounts and because they are in a hung state, any time I try to run anything on the command line (eg. the workaround in that bug report: `nmcli cli sleep false`) the shell hangs. By "hang" I mean they are unresponsive to any signals (Ctrl-C, Ctrl-Z, kill, etc). When I use absolute paths (ieeg. `/usr/bin/nmcli`) it runs fine as expected. When I resume the network connection, all the hung processes come back to life and complete their execution. I'm confused as to why this happens. My current suspicion is that bash is attempting to search in one of the NFS mounted directories for the command I am trying to run. My `PATH` does not include any of the NFS mounted directories though. So my question is twofold: Why does the shell hang in this way and how can I stop it?


title: How do I use the Unix tar command with an implicit filepath?

text: I am using the `tar -xvf` command and it is taking the explicit path. However, the path is full.   Example:               tar -xvf 13.2.tar      It is taking the path of `/mnt` folder. The `/` folder is full. How can I tar the file with the implicit path?


title: New webserver: What all user accounts should I create and permissions to provide for

text: This is a followup on my question here. I am setting up the first webserver and am fumbling with what user accounts to create and permissions to provide for better security. Below is what I have. For 2 developers, I have 2 accounts (and they are added to the supplementary group `devs`) and only they are allowed to ssh to the server. For the web application (Django based), I have created 1 normal user, `app` (haven't configured it as `\--system` user and belongs to group `app`) with shell access. The 2 developers, after ssh to the server, will su to `app` for any updates and starting/stopping the application. User `app` is not allowed to perform `su` (blocked by not adding to the group setting in `/etc/pam.d/su` using `pam_wheel.so`). I also have a 3rd account with no `su` capabilities for backup related tasks where a cron job will ssh and fetch log files, status, etc. Let me know if security aspects need to be made better. (PS: I am a novice here)


title: Terraria Server Seems to be Slowing Down Web Server

text: I currently have a CentOS 6 Cloud server (2gigs of ram, 40gigs of SSD storage, 2.4ghz quad core, and 100M unmetered port for bandwidth) that has in the past run a TeamSpeak, Minecraft FTB (modded version) server, and web site with no slowdowns. At this time, I have it running ONLY a basic web server with Apache 2, PHP, MySQL, and a Wordpress install, and a Terraria server. For some reason though, as soon as anyone connects to the Terraria server, the load time for the site goes from 1-2 sec to at least 10. Does anyone have any ideas as to why this may be happening?


title: Can I connet to internet with one PC and give over LAN (switch) internet to other PC?

text: I currently have one computer (it's called `pc08` with Linux Mint 15) that is connected to the internet via WLAN. Now I want to install Arch Linux on another computer (lets call it `archiso`). I only have WLAN, but it seems to be quite difficult install Arch Linux with WLAN only. So I thought I could possibly provide a LAN internet connection like this:                -----------------------     | pc08                  |     | has internet by WLAN  |      -----------------------                 |                 |         --------------         | Switch      |          -------------                 |      -------------------------      | archiso               |      | has WLAN, but I cannot|      | connect               |       -----------------------      Is it possible to get an internet connection like this? If it is possible: What do I have to do on both computers? ## What I've done so far I think I have to set up a DHCP server on `pc08` while using the provided DHCP server from WLAN.   * I've installed isc-dhcp-server.   * Set `INTERFACES="eth0″` in `/etc/default/isc-dhcp-server`   * It seems as if I have to edit `/etc/dhcp/dhcpd.conf`, but I have no idea what are good options.


title: find does not work on symlinked path?

text: If I run this command `find $HOME/MySymlinkedPath -name "run*.sh"` nothing happens, and gives no error ('MySymlinkedPath' is a symlinked path to another hard drive other then my $HOME one). These also fails:               find ~/MySymlinkedPath -name "run*.sh"     find /home/MyUserName/MySymlinkedPath -name "run*.sh"      And just to make it sure, this non existant path fails (of course) `find $HOME/MySymlinkedPathDUMMYTEST -name "run*.sh"` so the path is being found (because that error does not happen) but `find` doesnt perform the search on it, and I am a lot clueless now... It only works if I `cd $HOME/MySymlinkedPath` first and remove the path reference like this `find -name "run*.sh"` but that is not good for my scripts... **An additional info** :   this command works as usual `ls $HOME/MySymlinkedPath/run*.sh`, and if I go there `cd $HOME/MySymlinkedPath` and run this `ls ..` the result is not what I was expecting; the list of the path where the symlinked path is located.. it returns the list of the real path on the another media/harddrive!!!               pwd -P     /media/MediaIdentifier/RealPath     pwd     /home/MyUser/MySymlinkedPath      **Re-thinking** :   Is this a problem with `find` and `ls`, or with my system? or it is expected and not a problem at all?? I am on Ubuntu 12.10. It fails on all terminals I tested so doesnt seems a terminal "problem".


title: Count the number of rows in each column of a text file

text: I have a text file with the following format: 5 3 1   2 3 4   .....   .....   i.e. space separated 3 columns of numbers/ However, some of the rows may be like:   2   3 1   So, I want to detect if the text file has any such inconsistencies and to print them out. How do I do this?


title: Hardware address of network interface using ioctl on AIX

text: I want to get hardware address of network interface on `AIX` using `ioctl`. Like in Linux we get it through:               ioctl(sockFd, SIOCGIFADDR, ifr_p);      I didn't find `SIOCGIFADDR` flag in `/usr/include/sys/ioctl.h` on `AIX` to get hardware address information. Is there any way to get it from `ioctl`? or any file in system from where I can get this information like in linux this information is stored in '/sys/class/net/'


title: How to change the ftp server port in ProFTPD

text: I want to change my ProFTPD server port from 21 to 1945. But I didn't find any port mention in the `proftpd.conf` file. When I add port 21 in the conf file and restart the ftp server it shows the following error:               Starting proftpd (via systemctl):  Job failed. See system logs and 'systemctl status' for details.     [FAILED]      Please help me with finding out how I change my ftp server port. Below is the `proftpd.conf` file:               # This is the ProFTPD configuration file     #     # See: http://www.proftpd.org/docs/directives/linked/by-name.html          # Security-Enhanced Linux (SELinux) Notes:     #     # In Fedora and Red Hat Enterprise Linux, ProFTPD runs confined by SELinux     # in order to mitigate the effects of an attacker taking advantage of an     # unpatched vulnerability and getting control of the ftp server. By default,     # ProFTPD cannot read or write most files on a system nor connect to many     # external network services, but these restrictions can be relaxed by     # setting SELinux booleans as follows:     #     # setsebool -P allow_ftpd_anon_write=1     #   This allows the ftp daemon to write to files and directories labelled     #   with the public_content_rw_t context type; the daemon would only have     #   read access to these files normally. Files to be made available by ftp     #   but not writeable should be labelled public_content_t.     #     # setsebool -P allow_ftpd_full_access=1     #   This allows the ftp daemon to read and write all files on the system.     #     # setsebool -P allow_ftpd_use_cifs=1     #   This allows the ftp daemon to read and write files on CIFS-mounted     #   filesystems.     #     # setsebool -P allow_ftpd_use_nfs=1     #   This allows the ftp daemon to read and write files on NFS-mounted     #   filesystems.     #     # setsebool -P ftp_home_dir=1     #   This allows the ftp daemon to read and write files in users' home     #   directories.     #     # setsebool -P ftpd_connect_all_unreserved=1     #   This setting is only available from Fedora 16/RHEL-7 onwards, and is     #   necessary for active-mode ftp transfers to work reliably with non-Linux     #   clients (see http://bugzilla.redhat.com/782177), which may choose to     #   use port numbers outside the "ephemeral port" range of 32768-61000.     #     # setsebool -P ftpd_connect_db=1     #   This setting allows the ftp daemon to connect to commonly-used database     #   ports over the network, which is necessary if you are using a database     #   back-end for user authentication, etc.     #     # setsebool -P ftpd_is_daemon=1     #   This setting is available only in Fedora releases 4 to 6 and Red Hat     #   Enterprise Linux 5. It should be set if ProFTPD is running in standalone     #   mode, and unset if running in inetd mode.     #     # setsebool -P ftpd_disable_trans=1     #   This setting is available only in Fedora releases 4 to 6 and Red Hat     #   Enterprise Linux 5, and when set it removes the SELinux confinement of the     #   ftp daemon. Needless to say, its use is not recommended.     #     # All of these booleans are unset by default.     #     # See also the "ftpd_selinux" manpage.     #     # Note that the "-P" option to setsebool makes the setting permanent, i.e.     # it will still be in effect after a reboot; without the "-P" option, the     # effect only lasts until the next reboot.     #     # Restrictions imposed by SELinux are on top of those imposed by ordinary     # file ownership and access permissions; in normal operation, the ftp daemon     # will not be able to read and/or write a file unless *all* of the ownership,     # permission and SELinux restrictions allow it.          # Server Config - config used for anything outside a <VirtualHost> or <Global> context     # See: http://www.proftpd.org/docs/howto/Vhost.html          # Trace logging, disabled by default for performance reasons     # (http://www.proftpd.org/docs/howto/Tracing.html)     #TraceLog           /var/log/proftpd/trace.log     #Trace              DEFAULT:0          ServerName          "ProFTPD server"     ServerIdent         on "FTP Server ready."     ServerAdmin         root@localhost     DefaultServer           on          # Cause every FTP user except adm to be chrooted into their home directory     DefaultRoot         ~ !adm          # Use pam to authenticate (default) and be authoritative     AuthPAMConfig           proftpd     AuthOrder           mod_auth_pam.c* mod_auth_unix.c     # If you use NIS/YP/LDAP you may need to disable PersistentPasswd     #PersistentPasswd       off          # Don't do reverse DNS lookups (hangs on DNS problems)     UseReverseDNS           off          # Set the user and group that the server runs as     User                nobody     Group               nobody          # To prevent DoS attacks, set the maximum number of child processes     # to 20.  If you need to allow more than 20 concurrent connections     # at once, simply increase this value.  Note that this ONLY works     # in standalone mode; in inetd mode you should use an inetd server     # that allows you to limit maximum number of processes per service     # (such as xinetd)     MaxInstances            20          # Disable sendfile by default since it breaks displaying the download speeds in     # ftptop and ftpwho     UseSendfile         off          # Define the log formats     LogFormat           default "%h %l %u %t \"%r\" %s %b"     LogFormat           auth    "%v [%P] %h %t \"%r\" %s"          # Dynamic Shared Object (DSO) loading     # See README.DSO and howto/DSO.html for more details     #     # General database support (http://www.proftpd.org/docs/contrib/mod_sql.html)     #   LoadModule mod_sql.c     #     # Support for base-64 or hex encoded MD5 and SHA1 passwords from SQL tables     # (contrib/mod_sql_passwd.html)     #   LoadModule mod_sql_passwd.c     #     # Mysql support (requires proftpd-mysql package)     # (http://www.proftpd.org/docs/contrib/mod_sql.html)     #   LoadModule mod_sql_mysql.c     #     # Postgresql support (requires proftpd-postgresql package)     # (http://www.proftpd.org/docs/contrib/mod_sql.html)     #   LoadModule mod_sql_postgres.c     #     # Quota support (http://www.proftpd.org/docs/contrib/mod_quotatab.html)     #   LoadModule mod_quotatab.c     #     # File-specific "driver" for storing quota table information in files     # (http://www.proftpd.org/docs/contrib/mod_quotatab_file.html)     #   LoadModule mod_quotatab_file.c     #     # SQL database "driver" for storing quota table information in SQL tables     # (http://www.proftpd.org/docs/contrib/mod_quotatab_sql.html)     #   LoadModule mod_quotatab_sql.c     #     # LDAP support (requires proftpd-ldap package)     # (http://www.proftpd.org/docs/directives/linked/config_ref_mod_ldap.html)     #   LoadModule mod_ldap.c     #     # LDAP quota support (requires proftpd-ldap package)     # (http://www.proftpd.org/docs/contrib/mod_quotatab_ldap.html)     #   LoadModule mod_quotatab_ldap.c     #     # Support for authenticating users using the RADIUS protocol     # (http://www.proftpd.org/docs/contrib/mod_radius.html)     #   LoadModule mod_radius.c     #     # Retrieve quota limit table information from a RADIUS server     # (http://www.proftpd.org/docs/contrib/mod_quotatab_radius.html)     #   LoadModule mod_quotatab_radius.c     #     # SITE CPFR and SITE CPTO commands (analogous to RNFR and RNTO), which can be     # used to copy files/directories from one place to another on the server     # without having to transfer the data to the client and back     # (http://www.castaglia.org/proftpd/modules/mod_copy.html)     #   LoadModule mod_copy.c     #     # Administrative control actions for the ftpdctl program     # (http://www.proftpd.org/docs/contrib/mod_ctrls_admin.html)     LoadModule mod_ctrls_admin.c     #     # Support for MODE Z commands, which allows FTP clients and servers to     # compress data for transfer     # (http://www.castaglia.org/proftpd/modules/mod_deflate.html)     #   LoadModule mod_deflate.c     #     # Execute external programs or scripts at various points in the process     # of handling FTP commands     # (http://www.castaglia.org/proftpd/modules/mod_exec.html)     #   LoadModule mod_exec.c     #     # Support for POSIX ACLs     # (http://www.proftpd.org/docs/modules/mod_facl.html)     #   LoadModule mod_facl.c     #     # Support for using the GeoIP library to look up geographical information on     # the connecting client and using that to set access controls for the server     # (http://www.castaglia.org/proftpd/modules/mod_geoip.html)     #   LoadModule mod_geoip.c     #     # Allow for version-specific configuration sections of the proftpd config file,     # useful for using the same proftpd config across multiple servers where     # different proftpd versions may be in use     # (http://www.castaglia.org/proftpd/modules/mod_ifversion.html)     #   LoadModule mod_ifversion.c     #     # Configure server availability based on system load     # (http://www.proftpd.org/docs/contrib/mod_load.html)     #   LoadModule mod_load.c     #     # Limit downloads to a multiple of upload volume (see README.ratio)     #   LoadModule mod_ratio.c     #     # Rewrite FTP commands sent by clients on-the-fly,     # using regular expression matching and substitution      # (http://www.proftpd.org/docs/contrib/mod_rewrite.html)     #   LoadModule mod_rewrite.c     #     # Support for the SSH2, SFTP, and SCP protocols, for secure file transfer over     # an SSH2 connection (http://www.castaglia.org/proftpd/modules/mod_sftp.html)     #   LoadModule mod_sftp.c     #     # Use PAM to provide a 'keyboard-interactive' SSH2 authentication method for     # mod_sftp (http://www.castaglia.org/proftpd/modules/mod_sftp_pam.html)     #   LoadModule mod_sftp_pam.c     #     # Use SQL (via mod_sql) for looking up authorized SSH2 public keys for user     # and host based authentication     # (http://www.castaglia.org/proftpd/modules/mod_sftp_sql.html)     #   LoadModule mod_sftp_sql.c     #     # Provide data transfer rate "shaping" across the entire server     # (http://www.castaglia.org/proftpd/modules/mod_shaper.html)     #   LoadModule mod_shaper.c     #     # Support for miscellaneous SITE commands such as SITE MKDIR, SITE SYMLINK,     # and SITE UTIME (http://www.proftpd.org/docs/contrib/mod_site_misc.html)     #   LoadModule mod_site_misc.c     #     # Provide an external SSL session cache using shared memory     # (contrib/mod_tls_shmcache.html)     #   LoadModule mod_tls_shmcache.c     #     # Provide a memcached-based implementation of an external SSL session cache     # (contrib/mod_tls_memcache.html)     #   LoadModule mod_tls_memcache.c     #     # Use the /etc/hosts.allow and /etc/hosts.deny files, or other allow/deny     # files, for IP-based access control     # (http://www.proftpd.org/docs/contrib/mod_wrap.html)     #   LoadModule mod_wrap.c     #     # Use the /etc/hosts.allow and /etc/hosts.deny files, or other allow/deny     # files, as well as SQL-based access rules, for IP-based access control     # (http://www.proftpd.org/docs/contrib/mod_wrap2.html)     #   LoadModule mod_wrap2.c     #     # Support module for mod_wrap2 that handles access rules stored in specially     # formatted files on disk     # (http://www.proftpd.org/docs/contrib/mod_wrap2_file.html)     #   LoadModule mod_wrap2_file.c     #     # Support module for mod_wrap2 that handles access rules stored in SQL     # database tables (http://www.proftpd.org/docs/contrib/mod_wrap2_sql.html)     #   LoadModule mod_wrap2_sql.c     #     # Implement a virtual chroot capability that does not require root privileges     # (http://www.castaglia.org/proftpd/modules/mod_vroot.html)     # Using this module rather than the kernel's chroot() system call works     # around issues with PAM and chroot (http://bugzilla.redhat.com/506735)     LoadModule mod_vroot.c     #     # Provide a flexible way of specifying that certain configuration directives     # only apply to certain sessions, based on credentials such as connection     # class, user, or group membership     # (http://www.proftpd.org/docs/contrib/mod_ifsession.html)     #   LoadModule mod_ifsession.c          # Allow only user root to load and unload modules, but allow everyone     # to see which modules have been loaded     # (http://www.proftpd.org/docs/modules/mod_dso.html#ModuleControlsACLs)     ModuleControlsACLs      insmod,rmmod allow user root     ModuleControlsACLs      lsmod allow user *          # Enable basic controls via ftpdctl     # (http://www.proftpd.org/docs/modules/mod_ctrls.html)     ControlsEngine          on     ControlsACLs            all allow user root     ControlsSocketACL       allow user *     ControlsLog         /var/log/proftpd/controls.log          # Enable admin controls via ftpdctl     # (http://www.proftpd.org/docs/contrib/mod_ctrls_admin.html)     <IfModule mod_ctrls_admin.c>       AdminControlsEngine       on       AdminControlsACLs     all allow user root     </IfModule>          # Enable mod_vroot by default for better compatibility with PAM     # (http://bugzilla.redhat.com/506735)     <IfModule mod_vroot.c>       VRootEngine           on     </IfModule>          # TLS (http://www.castaglia.org/proftpd/modules/mod_tls.html)     <IfDefine TLS>       TLSEngine         on       TLSRequired           on       TLSRSACertificateFile     /etc/pki/tls/certs/proftpd.pem       TLSRSACertificateKeyFile  /etc/pki/tls/certs/proftpd.pem       TLSCipherSuite        ALL:!ADH:!DES       TLSOptions            NoCertRequest       TLSVerifyClient       off       #TLSRenegotiate       ctrl 3600 data 512000 required off timeout 300       TLSLog            /var/log/proftpd/tls.log       <IfModule mod_tls_shmcache.c>         TLSSessionCache     shm:/file=/var/run/proftpd/sesscache       </IfModule>     </IfDefine>          # Dynamic ban lists (http://www.proftpd.org/docs/contrib/mod_ban.html)     # Enable this with PROFTPD_OPTIONS=-DDYNAMIC_BAN_LISTS in /etc/sysconfig/proftpd     <IfDefine DYNAMIC_BAN_LISTS>       LoadModule            mod_ban.c       BanEngine         on       BanLog            /var/log/proftpd/ban.log       BanTable          /var/run/proftpd/ban.tab            # If the same client reaches the MaxLoginAttempts limit 2 times       # within 10 minutes, automatically add a ban for that client that       # will expire after one hour.       BanOnEvent            MaxLoginAttempts 2/00:10:00 01:00:00            # Inform the user that it's not worth persisting       BanMessage            "Host %a has been banned"            # Allow the FTP admin to manually add/remove bans       BanControlsACLs       all allow user ftpadm     </IfDefine>          # Set networking-specific "Quality of Service" (QoS) bits on the packets used     # by the server (contrib/mod_qos.html)     <IfDefine QOS>       LoadModule            mod_qos.c       # RFC791 TOS parameter compatibility       QoSOptions            dataqos throughput ctrlqos lowdelay       # For a DSCP environment (may require tweaking)       #QoSOptions           dataqos CS2 ctrlqos AF41     </IfDefine>          # Global Config - config common to Server Config and all virtual hosts     # See: http://www.proftpd.org/docs/howto/Vhost.html     <Global>            # Umask 022 is a good standard umask to prevent new dirs and files       # from being group and world writable       Umask             022                 # Allow users to overwrite files and change permissions       AllowOverwrite        yes       <Limit ALL SITE_CHMOD>         AllowAll       </Limit>     DefaultRoot ~          </Global>          # A basic anonymous configuration, with an upload directory     # Enable this with PROFTPD_OPTIONS=-DANONYMOUS_FTP in /etc/sysconfig/proftpd     <IfDefine ANONYMOUS_FTP>       <Anonymous ~ftp>         User            ftp         Group           ftp         AccessGrantMsg      "Anonymous login ok, restrictions apply."              # We want clients to be able to login with "anonymous" as well as "ftp"         UserAlias           anonymous ftp              # Limit the maximum number of anonymous logins         MaxClients          10 "Sorry, max %m users -- try again later"              # Put the user into /pub right after login         #DefaultChdir       /pub              # We want 'welcome.msg' displayed at login, '.message' displayed in         # each newly chdired directory and tell users to read README* files.          DisplayLogin        /welcome.msg         DisplayChdir        .message         DisplayReadme       README*              # Cosmetic option to make all files appear to be owned by user "ftp"         DirFakeUser         on ftp         DirFakeGroup        on ftp              # Limit WRITE everywhere in the anonymous chroot         <Limit WRITE SITE_CHMOD>           DenyAll         </Limit>              # An upload directory that allows storing files but not retrieving         # or creating directories.         <Directory uploads/*>           AllowOverwrite        no           <Limit READ>             DenyAll           </Limit>                <Limit STOR>             AllowAll           </Limit>         </Directory>              # Don't write anonymous accesses to the system wtmp file (good idea!)         WtmpLog         off              # Logging for the anonymous transfers         ExtendedLog         /var/log/proftpd/access.log WRITE,READ default         ExtendedLog         /var/log/proftpd/auth.log AUTH auth            </Anonymous>     </IfDefine>          <VirtualHost 192.168.0.4>     ServerName esdev.wiantech.net     <Anonymous /home/esdev/ftp>     User ftp     Group ftp     UserAlias anonymous ftp     <Limit WRITE>     DenyAll     </Limit>     RequireValidShell off     ExtendedLog /home/esdev/logs/ftp.log     </Anonymous>     </VirtualHost>     <VirtualHost 122.176.97.151>     </VirtualHost>     <VirtualHost 122.176.97.151>     ServerName "klarify15.wiantech.net"     </VirtualHost>     <VirtualHost 122.176.97.151>     ServerName "klarify15.wiantech.net"     </VirtualHost>


title: How can I make a shared directory accessible by SFTP?

text: I have set up an sftp account in `/home/sam`, created a group `sftp`, and added the user `sam` in it. i gave `chown sam:sftp /home/sam` for the user to perform operations in that directory. Now I have created another sftp account `tom` and I have to make him share the directory `/home/sam`. i.e., both `sam` and `tom` has to share the same directoy for common files. Now I can't give `chown tom:sftp on /home/sam`. How do I make the directoy `sam` shareable to both users?


title: Is it possible to remove folder prefix from a `ls` command

text: I am in a bash script and I want to get the list of all files (let say all jar files). I execute the command `ls -1 lib/*.jar` and I get the output:               lib/mylib_1.jar     lib/mylib_2.jar     ...      Is there any option to have the following output:               mylib_1.jar     mylib_2.jar     ...      Making `cd lib` before is not an option as I am in a loop and need to be in the parent folder for the actions I want to do inside the loop. I tried to find information by typing `man ls` but did not find any way. A solution with awk would be good as long I can pipe it to my ls command.


title: find/rename command doesn't work

text: I am using Linux Slackware 14.0, bash 4.2. Suppose, I have 2 files in the directory:               bash-4.2$ ls     1.txt  2.txt      I want to rename them to .svg. This answer is accepted and upvoted, so I think, it must work. He used this command:               find . -name "*.andnav" -exec rename -v 's/\.andnav$/\.tile/i' {} \;      So, I wrote the analogous command, but it printed an error:               bash-4.2$ find . -name "*.txt" -exec rename -v 's/\.txt$/\.svg/i' {} \;     rename: not enough arguments      When I want to just print the files, it works:               bash-4.2$ find . -name "*.txt" -print     ./1.txt     ./2.txt      I know, that I can rename with a simpler approach:               bash-4.2$ rename .txt .svg ./*.txt     bash-4.2$ ls     1.svg  2.svg      But why doesn't the command from _that_ answer work for me?


title: Using exec and tee to redirect logs to stdout and a log file in the same time

text: In a bash script, how can I redirect all standard outputs to a log file and `tee` the output on the screen using `exec` ?               log_file="$HOME/logs/install.txt-`date +'%Y-%m-%d_%H-%M-%S'`"     [ -f "$log_file" ] || touch "$log_file"     exec 1>> $log_file 2>&1      This code redirect all the log to the log file but not to the screen .


title: Redirect all stderr of a console and subsequent commands to a file

text: I know how to redirect `stderr` to a file or to the `stdout` when I issue a command: `command 2 > log` or `command 2 > &1` or even `command 2 > &1 > /dev/null`. However, I want to redirect all the `stderr` to a file since I open a bash console and thus all error messages of executed commands in the console would be redirected to that file. Is that possible? If so, what is the command to put in the `.bashrc`?


title: How to login to same session with same user using xrdp and tigervnc-server?

text: I have `Centos 6.4` with `Gnome2`, I'm accessing it through its `xrdp (Version 0.5.0)` and `Xvnc TigerVNC 1.1.0` services. The clients machine are an `Android` tablet and a `Windows 7` PC, these are using different screen resolutions for the connection. I close the connections with `gnome-session- save --kill`. I saw an article recommending to rebuild xrdp for this purpose another thread suggests that a newer version would do it, but I would stick to this version if there is a configuration that will do what I am after: to have the same session if same user logs in. Although it would be a big compromise, but even forcing the sessions to the same size and limiting the available sessions to 1 session per 1 user would do it if it works as expected. Can somebody suggest me a workaround for this or I have no options left, have to grab and try a newer version?


title: awk: Columns are not printed when concatenating strings is passed as command string

text: I've found some anomaly when writing a script. The following examples works as expected:               $ echo 123 | awk '{print $1 456}'     123456     $ sh -c "echo 123 | awk '{print $1}'"     123      But the following example, doesn't:               $ sh -c "echo 123 | awk '{print $1 456}'"     456      I'm expecting to print the 1st column with the additional string, which should return `123456` as it does when running the same command without`sh -c`. But what is happening, the 1st column is ignored for some reason. What's interesting, `$1` is printed without problems when not performing string concatenation. Why this is happening and how to do string concatenation within the command which is passed to separate instance of shell?


title: Unable to create gui in Qt creator

text: Till now I was creating GUI on windows using c++ on visual studio, now I decided to move on linux. So I install Qt creator from here . Now I follow a video tutorial for creating gui application with c++ in QT, according to which after selecting "new project" I should got this :- ![enter image description here](http://i.stack.imgur.com/ebK6B.png) As you can see, on right hand side the first option is "Qt Gui Application". That's what I need, but in my case I am getting only these options:- ![enter image description here](http://i.stack.imgur.com/ugvkX.png) So, can any one tell me what's went wrong and what is the solution.


title: Hacking with Linux

text: Are Kali Linux or BackTrack distros to go if I want to learn hacking, or is it better to install only the tools I want to another distro? I've already used Kali in the past but I didn't like it very much. I've read somewhere that the tools are hard to install, so is it better to have one of the distros? And if so, which one?


title: Unix command to check if any two lines in a file are same?

text: Is there a unix command that can check if any two lines in a file are the same? For e.g. Consider a file `sentences.txt`               This is sentence X     This is sentence Y     This is sentence Z     This is sentence X     This is sentence A     This is sentence B      We see that the sentence               This is sentence X      is repeated. Is there any command that can quickly detect this, so that I can perhaps execute it like this -               $ cat sentences.txt | thecommand     Line 1:This is sentence X     Line 4:This is sentence X


title: booting qemu/kvm directly from a file system

text: Having used Xen and its `pygrub` for a while, I'm now trying to do something similar with KVM/qemu. Basically, I have a LVM logical volume (though that could as well be a file) that contains the root filesystem of a Linux distribution (no partitioning, just FS directly on disk) which also contains a /boot/grub/grub.cfg, and I'd like to be able to boot that. I was under the impression that the grub-firmware-qemu package on Debian/Ubuntu was intended for that, but I have not managed to make it work. AFAICT, the grub.bin image contains a hardcoded memdisk with a grub.cfg file with a few menu options (like search for a multiboot.img or search for a grub.cfg), but all I get when running `kvm -bios grub.bin` is an "incompatible license" error message. And I'm not too sure how to generate a different `grub.bin` with a different grub.cfg (one that would only do `configfile (hd0)/boot/grub/grub.cfg`). Of course, I could create a floppy or cdrom or disk image with a minimal grub configuration that does just that but I've got the feeling that there should be a cleaner/canonical way to do it and my research has brought back very little so far. I suppose one could use qemu's `-kernel` option as well, but again, I don't know how to generate a `grub.img` for that. (using a grub.img generated with `grub-mkimage -O i386-pc -o grub.img -c =(echo 'configfile (hd0)/boot/grub/grub.cfg') /usr/lib/grub/i386-pc/*.mod` brings up the same "incompatible license" error message again). That's on debian with version 1.99-23 of the grub packages and 1.1.2+dfsg-2 of kvm/qemu. So, in short, how should I go about creating either a grub.bin (to be used with `kvm -bios`) or a grub.img (to be used with `kvm -kernel`) to have kvm boot a grub image that is able to parse the /boot/grub/grub.cfg on the virtual disk?


title: How do I install Flash plugin for Firefox in Slackware 14.1?

text: I searched on Google but the tutorials I found said they had to paste the plugin in `/usr/lib/firefox/plugins` But this folder does not exist! Can someone help me?


title: Soft Link Detection

text: In my own LFS-based OS, I had created many softlinks. Soft-link can be deleted without harming the target. But is there any way that If I remove the a file or directory then, I will be notified about it's soft link ? So that there will be no dangling soft-link pointer. Occasionally, finding dangling soft-link and then deleting is the way. But that will be static solution. I'm looking for dynamic way


title: change to text console using ssh

text: I'm connecting to target computer through SSH from command line. Target computer is running Gnome. I need to be able to tell the target computer to change its desktop to a fullscreen text console (like when you do `ctrl- alt-f2`). Running Gnome terminal fullscreen is not an option. Is this possible?


title: Restricting web application access to selected machines

text: I want to host a web based OpenERP application in a VPS Ubuntu 12.04 OS application. Can I restrict the application access to only assigned machines? In other words, I have 2 offices, and I need to restrict my employees from accessing this application only from office, but not from their home or outside in order to prevent losing my customer data. I think host-deny and host-allow might be able to help me. But I think we need static IP address for the same. I am not sure above solution. Basically I am looking for a solution without using static IP address.


title: Safely removing flash USB drive

text: On CentOS (5.5 and others) I need to transfer quite big files to a FAT32 USB flash drive to get the data on a Windows 7 machine (each file is below 4GB, so I guess FAT32 shouldn't be an issue then). When I click on "safely remove" and unplug the USB drive afterwards, files are often corrupted. The symbol for the drive is mostly still there but it showed, that it's "turned off" (same with using `umount` in terminal). Is it mandatory that the symbol for the USB drive disappears? Are there other possibilities that I can **really** safely remove the flash drive? /edit What I just observed: Doing the `rigtclick->safely remove` more than one time, the symbol disappears. After unplugging and reconnecting to the USB port, the data is once again corrupted (I use `md5sum` to check this, because sometimes even the count of Bits is the same)...


title: Can't launch Snort on CentOS 6.3

text: I have a problem installing Snort on CentOS 6.3 in a virtual environment. When I run `snort - ./snort status`:               Running in packet dump mode                  --== Initializing Snort ==--     Initializing Output Plugins!     Snort BPF option: status     pcap DAQ configured to passive.     Acquiring network traffic from "eth0".     ERROR: Can't set DAQ BPF filter to 'status' (pcap_daq_set_filter: pcap_compile: syntax error)!     Fatal Error, Quitting..      Also, I am trying to use the GUI called BASE and that is also not working. I have base in my `/var/www/html/base` directory and the configuration is set to                $BASE_urlpath = '/base';


title: ssh Connection refused: how to troubleshoot?

text: I'm trying:               $ ssh eric@myserver      where `myserver` is a machine in the intranet. I can ping `myserver` or respond to HTTP on port 8080, etc, but when I try `ssh`, I get               ssh: connect to host myserver port 22: Connection refused      I'm somewhat new to linux, and I don't know how to troubleshoot this. I'm using Ubuntu 10 if that matters. **Edit:** trying `ps -ax`, as suggested gives:               eric@Isaiah:~$ ps -ax | grep ssh     Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html      1641 ?        Ss     0:04 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session gnome-session     18376 pts/3    S+     0:00 grep --color=auto ssh


title: How to run svn when ssh over ssh?

text: I need to run `sudo -u wwwrun sh -c 'svn status -uq /srv/www/htdocs/loquat'` over ssh. When using one ssh it works smoothly. Now there is one server that needs to be connected through another server via ssh. If I issue               sudo ssh -t root@pacific ssh root@loquat "sudo -u wwwrun sh -c 'svn status -uq /srv/www/htdocs/loquat'" 2>&1      I get `Type 'svn help' for usage.` But when I do `sudo ssh -t root@pacific ssh root@loquat` I am connected to the desired server and then running `sudo -u wwwrun sh -c 'svn status -uq /srv/www/htdocs/loquat` manually gives me correct output. And when I run `sudo ssh -t root@pacific ssh root@loquat "sudo -u wwwrun sh -c 'id'" 2>&1` I get correctly `uid=30(wwwrun) gid=8(www) groups=8(www),1001(eduserver)` What do I need to do to fix that?   * OpenSSH_5.1p1, OpenSSL 0.9.8j-fips 07 Jan 2009   * SuSE 10.2


title: How to debug Linux kernel panic?

text: I am trying to debug a kernel panic. Panic message says unable to handle kernel paging request for address 40025694. At the time of panic it was executing `ldreq r10, [lr, #-4] @ get SWI instruction`. According to my understanding link register value is not a valid address. It is a very strange behavior. At the time of panic running process on cpu 1 was uEventObserver. Below is the last kernel message. Any suggestions?                [37653.158548] [Touch] touch_release : x[ 522] y[1462]     [37653.831523] [Touch] 1 finger pressed     [37653.905351] [Touch] touch_release : x[ 476] y[ 412]     [37655.082461] [Touch] 1 finger pressed     [37655.146676] [Touch] touch_release : x[1047] y[ 162]          [37655.473976] Unable to handle kernel paging request at virtual address 40025694     [37655.473976] pgd = d7138000     [37655.474007] [40025694] *pgd=9ec1a831, *pte=bf2e659d, *ppte=00000000     [37655.474038] Internal error: Oops: 17 [#1] PREEMPT SMP     [37655.474038] Modules linked in:     [37655.474068] CPU: 1    Not tainted  (3.0.21-g572d9be-00004-g4ec4db2 #1)     [37655.474099] PC is at vector_swi+0x28/0x88     [37655.474129] LR is at 0x40025698     [37655.474160] pc : c01065a8    lr : 40025698    psr : 60000093     [37655.474160] sp : d6eaffb0  ip : 4062c18c  fp : 5ed97c24     [37655.474190] r10: 58702b64  r9 : 5ea56f98  r8 : 20000010     [37655.474221] r7 : 000000a8  r6 : 41b13530  r5 : 4062c270  r4 : 4062c140     [37655.474251] r3 : 00000000  r2 : ffffffff  r1 : 00000001  r0 : 5ed97bd0     [37655.474251] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user     [37655.474282] Control: 10c5787d  Table: 9ec3806a  DAC: 00000015     [37655.474282]      [37655.474282] PC: 0xc0106528:     [37655.474312] 6528  e31100ff 1afffff0 e59d1040 e5bde03c e16ff001 f57ff01f e95d7fff e1a00000     [37655.474343] 6548  e28dd00c e1b0f00e eb01ae0e e1a096ad e1a09689 e5991000 e3a08001 e3110c01     [37655.474373] 6568  0affffec e1a0100d e3a00001 eb0006ef eaffffe8 e320f000 e24dd048 e88d1fff     [37655.474404] 6588  e28d803c e9486000 e14f8000 e58de03c e58d8040 e58d0044 e3180020 13a0a000     [37655.474434] 65a8  051ea004 e59fc0ac e59cc000 ee01cf10 f1080080 e1a096ad e1a09689 e28f809c     [37655.474465] 65c8  e3daa4ff 122a7609 159f808c e599a000 e92d0030 e31a0c01 1a000008 e3570f5e     [37655.474465] 65e8  e24fee13 3798f107 e28d1008 e3a08000 e357080f e2270000 2a001084 ea022377     [37655.474526] 6608  e1a02007 e28d1008 e3a00000 eb0006c7 e28fe014 e1a07000 e28d1008 e3570f5e     [37655.474526]      [37655.474526] SP: 0xd6eaff30:     [37655.474556] ff30  c004815c c004a2c0 c0c02080 0000000a c0d8a580 c017a2f0 c1ef1984 00000012     [37655.474587] ff50  ffffffff d6eaff9c 41b13530 000000a8 20000010 c010602c 5ed97bd0 00000001     [37655.474617] ff70  ffffffff 00000000 4062c140 4062c270 41b13530 000000a8 20000010 5ea56f98     [37655.474648] ff90  58702b64 5ed97c24 4062c18c d6eaffb0 40025698 c01065a8 60000093 ffffffff     [37655.474678] ffb0  5ed97bd0 00000001 ffffffff 00000000 4062c140 4062c270 41b13530 000000a8     [37655.474678] ffd0  5ed97bd0 5ea56f98 58702b64 5ed97c24 4062c18c 5ed97bc8 406283d7 40025698     [37655.474709] fff0  20000010 5ed97bd0 a8afc821 a8afcc21 e033cfc0 40eb3000 40eb6000 d6eb0058     [37655.474739] 0010  d75a9d68 0000079f 00100073 d6eb017d d6eb00cc d6e98f94 00000000 00000000     [37655.474770] Process UEventObserver (pid: 675, stack limit = 0xd6eae2f0)     [37655.474770] Stack: (0xd6eaffb0 to 0xd6eb0000)     [37655.474801] ffa0:                                     5ed97bd0 00000001 ffffffff 00000000     [37655.474801] ffc0: 4062c140 4062c270 41b13530 000000a8 5ed97bd0 5ea56f98 58702b64 5ed97c24     [37655.474831] ffe0: 4062c18c 5ed97bc8 406283d7 40025698 20000010 5ed97bd0 a8afc821 a8afcc21     [37655.474831] Code: e58d8040 e58d0044 e3180020 13a0a000 (051ea004)      [37655.474862] ---[ end trace 2416079997dfe426 ]---     [37655.474862] Kernel panic - not syncing: Fatal exception          [37655.474892] [<c010cdec>] (unwind_backtrace+0x0/0x12c) from [<c078872c>] (panic+0x80/0x1a4)     [37655.474923] [<c078872c>] (panic+0x80/0x1a4) from [<c010a578>] (die+0x1d4/0x21c)     [37655.474953] [<c010a578>] (die+0x1d4/0x21c) from [<c0111510>] (__do_kernel_fault+0x64/0x84)     [37655.474953] [<c0111510>] (__do_kernel_fault+0x64/0x84) from [<c0111798>] (do_page_fault+0x268/0x288)     [37655.474984] [<c0111798>] (do_page_fault+0x268/0x288) from [<c0100340>] (do_DataAbort+0x134/0x1a4)     [37655.474984] [<c0100340>] (do_DataAbort+0x134/0x1a4) from [<c010602c>] (__dabt_svc+0x4c/0x60)     [37655.475014] Exception stack(0xd6eaff68 to 0xd6eaffb0)     [37655.475014] ff60:                   5ed97bd0 00000001 ffffffff 00000000 4062c140 4062c270     [37655.475014] ff80: 41b13530 000000a8 20000010 5ea56f98 58702b64 5ed97c24 4062c18c d6eaffb0     [37655.475045] ffa0: 40025698 c01065a8 60000093 ffffffff     [37655.475045] [<c010602c>] (__dabt_svc+0x4c/0x60) from [<c01065a8>] (vector_swi+0x28/0x88)               [37655.475075] CPU0: stopping     [37655.475075] [<c010cdec>] (unwind_backtrace+0x0/0x12c) from [<c010b438>] (handle_IPI+0x100/0x1d4)     [37655.475106] [<c010b438>] (handle_IPI+0x100/0x1d4) from [<c010044c>] (gic_handle_irq+0x9c/0xac)     [37655.475106] [<c010044c>] (gic_handle_irq+0x9c/0xac) from [<c0106094>] (__irq_svc+0x54/0x80)     [37655.475136] Exception stack(0xc874bc68 to 0xc874bcb0)     [37655.475136] bc60:                   d3cf4948 cd6dbd54 0000001f 00000000 b1d2a59d 5ea1f000     [37655.475136] bc80: d3cf4948 5ea1f000 00000000 c874a000 d2b9207c d7e55670 5ea1f02b c874bcb0     [37655.475167] bca0: c01eb894 c010bbb4 60000013 ffffffff          [37655.475167] [<c0106094>] (__irq_svc+0x54/0x80) from [<c010bbb4>] (flush_tlb_page+0x8c/0x98)     [37655.475197] [<c010bbb4>] (flush_tlb_page+0x8c/0x98) from [<c01eb894>] (ptep_clear_flush+0x30/0x38)     [37655.475197] [<c01eb894>] (ptep_clear_flush+0x30/0x38) from [<c01e743c>] (try_to_unmap_one+0xc4/0x3a4)     [37655.475228] [<c01e743c>] (try_to_unmap_one+0xc4/0x3a4) from [<c01e77a0>] (try_to_unmap_file+0x84/0x4b4)     [37655.475228] [<c01e77a0>] (try_to_unmap_file+0x84/0x4b4) from [<c01e80b0>] (try_to_unmap+0x34/0x4c)     [37655.475258] [<c01e80b0>] (try_to_unmap+0x34/0x4c) from [<c01d28dc>] (shrink_page_list+0x258/0x78c)     [37655.475258] [<c01d28dc>] (shrink_page_list+0x258/0x78c) from [<c01d31b4>] (shrink_inactive_list+0x1e0/0x330)     [37655.475289] [<c01d31b4>] (shrink_inactive_list+0x1e0/0x330) from [<c01d3704>] (shrink_zone+0x400/0x588)     [37655.475289] [<c01d3704>] (shrink_zone+0x400/0x588) from [<c01d3fd8>] (kswapd+0x594/0x970)     [37655.475319] [<c01d3fd8>] (kswapd+0x594/0x970) from [<c018e04c>] (kthread+0x80/0x88)     [37655.475319] [<c018e04c>] (kthread+0x80/0x88) from [<c01075c0>] (kernel_thread_exit+0x0/0x8)     [37655.575670] Rebooting in 1 seconds.. Thanks


title: "Removing leftover files … Unknown user 'uuidd'. [FAIL]" on a fresh Arch Linux installation

text: I just fresh installed Arch Linux reecently and when booting i can spot a warning:               Removing leftover files  [BUSY] [/usr/lib/tmpfiles.d/uuidd.conf:1] Unknown user 'uuidd'. [FAIL]      What could this be? Is there a way to fix it?


title: Wireless issues with Linux Mint on Macbook Pro

text: I installed Linux Mint 13 (Maya) on my Macbook Pro using rEFIt, and ran through the instructions here to get wireless working. Now I can see a bunch of different networks, but I almost always fail to connect to them. I get constant notificaitons that my wireless is disconnected, because it keeps trying to connect, to no avail. The wireless actually has worked one or two times. About half the time I boot into Linux Mint, I am able to connect with wireless after maybe 5 minutes of struggling. Then I promptly lose it within minutes. What are the next steps to getting this worked out? P.S. Wireless works with OS X so I know the network and my hardware is fine.


title: Home server not mounting external disks

text: When I plug in a flash drive or hard drive to my local server (running debian squeeze) the machine doesn't seem to be mounting the devices in /media/usb*. Is there an step that I am missing? I trued running:               sudo fdisk -l      and the out put is as follows:               Disk /dev/mtdblock0: 1 MB, 1048576 bytes     255 heads, 63 sectors/track, 0 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000          Disk /dev/mtdblock0 doesn't contain a valid partition table          Disk /dev/mtdblock1: 4 MB, 4194304 bytes     255 heads, 63 sectors/track, 0 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x002e5490          Disk /dev/mtdblock1 doesn't contain a valid partition table          Disk /dev/mtdblock2: 531 MB, 531628032 bytes     255 heads, 63 sectors/track, 64 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00000000          Disk /dev/mtdblock2 doesn't contain a valid partition table          Disk /dev/sda: 3965 MB, 3965190144 bytes     255 heads, 63 sectors/track, 482 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x94fd41a3          Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *           1         474     3807373+  83  Linux          Disk /dev/sdb: 500.1 GB, 500107862016 bytes     255 heads, 63 sectors/track, 60801 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x8d399bc0          Device Boot      Start         End      Blocks   Id  System     /dev/sdb1   *           1       60800   488375968+   7  HPFS/NTFS      Any help is much appreciated


title: How is the path to search for 'man' pages set?

text: I'm puzzled by how the path used for finding `man` pages is set. The "right thing" seems to happen magically. For example, if change my PATH from `/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin:/usr/texbin` to `/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin:/usr/texbin` the path searched for `man` pages (according to `man --path`) changes from `/usr/share/man:/usr/local/share/man:/opt/X11/share/man:/usr/local/git/share/man:/usr/texbin/man` to `/usr/local/git/share/man:/usr/share/man:/usr/local/share/man:/opt/X11/share/man:/usr/texbin/man` Somehow, the version of Git that I'm "overriding" the default Git with, is having it's documentation correctly found before any documentation for any built in Git. How is that happening?


title: Removing LXDE and installing GNOME 3

text: I have a 700MB CD on which I'm putting the LXDE version of Fedora 18, and I wanted to know what happened when I remove LXDE and install GNOME 3, as the GNOME 3 version is too big for my CD.


title: set default g++ on CentOS?

text: I'm a linux virgin and have only been programming c++ for 2 weeks, so please bear with me. I'm trying to set the default g++ to 4.7.2 which I'm told by my host is installed (I'm also told that c++11 is also installed); however, neither of us know how to set the default g++ to 4.7.2 because `g++ --version` gives               g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)     Copyright (C) 2006 Free Software Foundation, Inc.     This is free software; see the source for copying conditions.  There is NO     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.      I tried these `sudo` commands here, but I just found out that they don't work because CentOS uses `yum`. How can I set the default g++ to 4.7.2 (if it's even installed) on CentOS 5.9?


title: Copy live CD to RAM on boot

text: OK, so I've put together a live CD which uses isolinux as the bootloader. Any idea what magical option or switch I need to use to make it copy the compressed filesystem to RAM before mounting it? (Not the entire CD, just the compressed filesystem image.)


title: Prevent KDE and Gnome from showing eachothers icons in the menu

text: Often, I have both KDE4 and Gnome installed on my machines. What really bothers me when I do this, is that the Gnome menu will show all kinds of things that I will hardly ever use in Gnome, like Konqueror, KMail and Konversation. (Just to name a few, the list is obviously _much_ longer.) I hate this. I would love a way (an easy way) to make sure Gnome only shows Gnome related icons and KDE only shows KDE related icons. Of course, you can manually hide all the KDE icons from the Gnome menu, but that sucks _*_ *, so I'd rather not go that way. Does any have a solution for this? A script maybe?


title: How to disable remote access on a linux distribution?

text: So I've read in Mark Sobell's book on Linux, that Linux **by default** is open to remote administration. Now seen as I'm running a Fedora 17, on a laptop I never have to administrate anything on remotely, I see this as a door to my house needlessly being open to a picklock. Now I'm not worried about my passwords being bruteforced by even a FPGA, but all kinds of security breaches simply happen sometimes (and often from inside), so I'd like to close this window of opportunity to any hacker just to be diligent. And preferably also monitor this change. **So how do I disable Linux from allowing remote logins/remote access in general?**


title: Login other bash ttys after logging in to one

text: Is there a way to login certain (or all) ttys after logging into one? I don't want auto-login because I still want to login once (for security). I've looked into things like "screen" but they are rather cumbersome and don't work with some programs (e.g. fbgs). Is there a command to simulate logging in to other ttys? **EDIT:** If anyone else has the same question, I ended up disabling tty 2-6 by removing the getty startup entry for it. Here is how I did it (works for Ubuntu 9.10 and up):   * Remove the ttys from the console setup file : `sudo vim /etc/default/console-setup` (Change ACTIVE_CONSOLES=/dev/tty[1-x] where x is the number of terminals you want; just have 1 for one terminal) Now, go through the ttys you don't want and either move them to a backup or delete them. For example: `sudo mv /etc/init/tty6.conf /etc/init/tty6.conf.backup` After a reboot, the getty processes don't exist. Now, I just login once and then run openvt to open a new tty without logging in again.


title: Get current user in desktop file (GNOME)

text: To run applications from gnome, users _click_ on icons on their desktops or they select the applications which they want to run from a menu. I'm looking for a **valid replacement pattern** , to get the **current user** within a desktop file.               [Desktop Entry]     Name=FooCorp Painter Pro     Exec=/run/media/%%USER_NAME%%/foocorp-usb-stick/foocorp-painter-pro     Icon=foocorp-painter-pro     Type=Application     Categories=GTK;GNOME;Utility;


title: Problem with Netrunner Enigma detecting MacBook Pro Wireless Driver/Adapter

text: I want to try out Linux and I got a Netrunner installer from a friend. When booting in Netrunner (pre-installation boot), I checked out the different things present in its desktop. I noticed that there's a big, red `X` on top of the network icon(?). Connecting via the Ethernet adapter is possible but `Wireless` tab is greyed out.


title: Limits of SSH multiplexing

text: I have the following entry in my `.ssh/config` file               Host AAA         User BBB         HostName CCC         ControlMaster auto         ControlPath ~/.ssh/%r@%h:%p      The above allows me to multiplex multiple ssh sessions through the same ssh connection without having to type in the password every time I need a new session (as long as the master connection remains open). However, I have noticed that once I have a relatively high # of connections multiplexed (~7), I can't add more sessions to the same multiplexed connection, and I start get the following error:               > ssh -X AAA          mux_client_request_session: session request failed: Session open refused by peer     Password:       ## My questions: Why am I getting this error? Is there a limit in the # of ssh sessions I can multiplex in the same connection? Can I change that limit? Would that be a bad idea?


title: How does udev create /dev/sr*? (Or: Which rule does create /dev/sr*?)

text: udev is responsible for populating /dev. It adds and removes device nodes to /dev dynamically based on rules/configs/scripts under /lib/udev and /etc/udev/. If I have a CDROM device node /dev/sr0 I can add a symlink /dev/cdrom by adding a rule like:               SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="cdrom", GROUP="cdrom"      I understand how symlinks are created in udev. But who (or "which rule") created /dev/sr0 (or another non symlink device node) in the first place?


title: Wget - Mirroring a full website with requisites on differents hosts

text: I am trying to make a full static copy of a wordpress website with `wget` to be browsed without any network connection (all links and images must be converted). The different requisites for the pages (images, css, js, ...) are on 3 different wordpress hosts and are always on the same `wp-content/uploads` directories. I tried to limit the recursion on the other domains to `wp-content/uploads` directories with `\--domains` and `\--include-directories`, but I can't limit `wget` to fetch only these directories on the `$URL1` and `$URL2`. Here is the command line (which don't limit to `$URL0` and `[$URL1|$URL2]/wp- content/uploads` ) :               wget --convert-links --recursive -l inf -N -e robots=off -R -nc      --default-page=index.html -E -D$URL1,$URL2,$URL0 --page-requisites      -B$URL0 -X$URL1,$URL2 --cut-dirs=1 -I*/wp-content/uploads/*, -H -F $URL0      Are there any possibility to limit `wget`'s recursion on the other domains to only some directories ?


title: LiveCD web browser distro

text: I'm not too familiar with Linux, but hope it may be ideal for this situation. I'm hoping there is a boot from CD style distro that will be ideal for my daughter to use solely for browsing the internet. The only odd requirement is that it must be able to save a list of websites to 'favourites' (maybe on USB for example), or as a next best option maybe that list can be hardcoded (such as on a config file) within the distro? Would this be possible? Can you recommend a distribution? * * * Thanks all. Many useful suggestions here. Sorry I could only accept one answer


title: Configuring a package that was downloaded using apt-get

text: I have to reconfigure PHP with some extra options but since I downloaded it on Ubuntu using apt-get I can't seem to find the source anywhere (php -i points the source to a tmp folder which no longer exists). Is there anyway to reconfigure without having to use apt-get -o=? One of my issues is that I need the version to say the same (5.3.2) doing an apt-get now tries to download 5.3.3


title: Sound card not found anymore

text: I started my ubuntu today and Audio card was not working. Card is not even listed with `lshw`. No device with description like `physical id: 1b` (I remember the old device settings). Any ideas?


title: locale definition with French republican calendar

text: I wonder if it is possible to create a locale definition that would make the C library format the dates according to the French republican calendar. I expect then, for example, run `date' and get something like "Sex Bru 5 11:43:51 CET 2012".


title: Why `paste file1 file2 > file1` will replace content of file 1 with that of file2?

text: > **Possible Duplicate:**   >  Why does sed act differently depending on the output file? I wonder why this command will simply replace the content of file1 with the content of file2, instead of the combination the original content of the two files?               paste file1 file2 > file1      Thanks!


title: How to decrease ps aux output to a few lines?

text: When my computer is slowing down, I usually run `ps aux --sort -rss` to find out which process consumes too much memory. There may be a lot of processes. How to see only a few ones?


title: What does a sudo command do?

text: Being a unix noob, what does this command do?               $sudo /usr/bin/su -something      Is `-something` a password or username for running commands under this username?


title: Fedora 18 host cannot ping Windows XP guest

text: I have my laptop running Fedora 18. I want to run a Windows XP guest using VirtualBox 4.2.6. My configuration seems correct, here is my networking report. Fedora 18 host               lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436         inet 127.0.0.1  netmask 255.0.0.0         inet6 ::1  prefixlen 128  scopeid 0x10<host>         loop  txqueuelen 0  (Local Loopback)         RX packets 72  bytes 6640 (6.4 KiB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 72  bytes 6640 (6.4 KiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          p2p1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500         ether 00:1e:68:68:11:93  txqueuelen 1000  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 0  bytes 0 (0.0 B)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0         device interrupt 16            ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500         inet 10.231.243.74  netmask 255.255.255.255  destination 10.20.31.30         ppp  txqueuelen 3  (Point-to-Point Protocol)         RX packets 36895  bytes 35633124 (33.9 MiB)         RX errors 2  dropped 0  overruns 0  frame 0         TX packets 42421  bytes 3077319 (2.9 MiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0          vboxnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 192.168.56.1  netmask 255.255.255.0  broadcast 192.168.56.255         inet6 fe80::800:27ff:fe00:0  prefixlen 64  scopeid 0x20<link>         ether 0a:00:27:00:00:00  txqueuelen 1000  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 348  bytes 41858 (40.8 KiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0      As for my XP guest, the IP address is 192.168.56.2. On the network setup I've choosen the host-only adapter with `vboxnet0`. Yet when I perform a `ping` from my Fedora host, it doesn't yield any reply.               [root@laptop Downloads]# ping 192.168.56.2     PING 192.168.56.2 (192.168.56.2) 56(84) bytes of data.      //here is should be reply answer from blablabla, like in most normal ping       `route -n` command on the Fedora 18 host result               Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         10.20.31.7      0.0.0.0         UG    0      0        0 ppp0     10.20.31.7      0.0.0.0         255.255.255.255 UH    0      0        0 ppp0     192.168.56.0    0.0.0.0         255.255.255.0   U     0      0        0 vboxnet0      and also my guest windows xp `route print` commands yields               ===========================================================================     Interface List     0x1 ........................... MS TCP Loopback interface     0x2 ...08 00 27 a5 72 21 ...... AMD PCNET Family PCI Ethernet Adapter - Packet Scheduler Miniport     ===========================================================================     ===========================================================================     Active Routes:     Network Destination        Netmask          Gateway       Interface  Metric         127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1   1       192.168.56.0    255.255.255.0     192.168.56.2    192.168.56.2      20       192.168.56.2  255.255.255.255        127.0.0.1       127.0.0.1      20      192.168.56.255  255.255.255.255     192.168.56.2    192.168.56.2     20         224.0.0.0        240.0.0.0     192.168.56.2    192.168.56.2   20      255.255.255.255  255.255.255.255     192.168.56.2    192.168.56.2    1      ===========================================================================     Persistent Routes:       None      What could be the problem?


title: Hotspot on Linux Not Working: Already in use?

text: I was following my own article, but after having activated the Hotspot as mentioned, I get the following error:               Address already in use                                                                              [fail]     invoke-rc.d: initscript dnsmasq, action "start" failed.      On my Android, too, it just keeps saying "Obtaining IP Address..." but doesn't connect.


title: Delete files/ folders with .nfs files

text: A lot of time when I delete a folder, it says cannot be deleted because of .nfs files Error - Device or resource busy How can I delete a folder ignoring these errors ( is there any flag in rm command) ? or I would have to find out the process using it, and first kill that process ? In that case how can i make it work to remove entire directories ?