why can't linux see my run.sh command?

I have a run.sh in a directory in ubuntu linux 12.04 LTS. I've been changing the Path variable so that it can "see" binaries elsewhere in the directory structure. But I am still getting a command not found even if I specify the full path. I have only basic working knowledge of linux. What is going on? Why can't it see run.sh?               memsql@memsql-virtual-machine:~/voltdb/doc/tutorials/helloworld$ sudo /home/memsql/voltdb/doc/tutorials/helloworld/run.sh     sudo: /home/memsql/voltdb/doc/tutorials/helloworld/run.sh: command not found     memsql@memsql-virtual-machine:~/voltdb/doc/tutorials/helloworld$ ls     Client.class  deployment.xml  Insert.class  log     run.sh        Select.java     Client.java   helloworld.sql  Insert.java   README  Select.class  statement-plans     memsql@memsql-virtual-machine:~/voltdb/doc/tutorials/helloworld$ pwd     /home/memsql/voltdb/doc/tutorials/helloworld


How can I parallelise the upload of a directory by FTP?

I need to upload a directory with a rather complicated tree (lots of subdirectories, etc.) by FTP. I am unable to compress this directory, since I do not have any access to the destination apart from FTP - e.g. no tar. Since this is over a very long distance (USA => Australia), latency is quite high. Following the advice in How to FTP multiple folders to another server using mput in Unix?, I am currently using `ncftp` to perform the transfer with `mput -r`. Unfortunately, this seems to transfer a single file at a time, wasting a lot of the available bandwidth on communication overhead. Is there any way I can parallelise this process, i.e. upload multiple files from this directory at the same time? Of course, I could manually split it and execute `mput -r` on each chunk, but that's a tedious process. A CLI method is heavily preferred, as the client machine is actually a headless server accessed via SSH.


FreeNAS 9.2: install FreeBSD packages

I have installed FreeNAS 9.2amd64 (based on the same FreeBSD version) on a VirtualBox VM. I created users and pool/volume for my data. In anticipation of installing apache/mysql-server/php5/php-myadmin FreeBSD packages, I read the following docs from the freenas.org site:   * Installing non-PBI Software   * Jails So I created a pluginjail to install packages within. I understood FreeNAS packages are managed by pkgng, which works almost the same than pkg_add/pkg_info/pkg_delete etc... Then I launched the following command (don't mind the package version) from that jail shell:               $ pkg install mysql-server      And I get the following output:               Updating repository catalogue     pkg: PACKAGESITE/digests.txz: No address record           pkg: No digest falling back on legacy catalog format                                 pkg: PACKAGESITE/repo.txz: No address record      If I go to `PACKAGESITE`, I can find both `digests.txz` and `repo.txz` files. Does anyone have an idea?


Guake + Mint 16 (Mate), lack of transparency

I had the same problem with Mate and Mint 14. With Cinnamon transparency worked great. What can I do to fix this? It's not the known problem with autostart.


root partition getting full with nfs mounted directory

I am having one nfs volume, which is mounted on one of the directory of root partition. My problem is when I checked `df -ha` it adds up mounted directory file content as well. Following are my observations, for security reason few names are changed I am at / right now, `df -ha`               Filesystem            Size  Used Avail Use% Mounted on     /dev/xvda1            7.9G  3.5G  4.1G  47% /     /dev/xvdf             9.9G  183M  9.2G   2% /home/abcedf     10.84.29.62:/home/abvdef/pqrstuv                           197G   97G   91G  52% /home/abvdef/pqrstuv      here `abcdef` is again one mounted volume and `pqrstuv` is mount point of nfs you can see right now it is 3.5 gb consumed, when I execute,               root@ip-10-190-133-49:/# du -sh      3.5G    .     root@ip-10-190-133-49:/# du -sh --exclude=home     1.3G    .      When I go to `/home`               root@ip-10-190-133-49:/home# du -sh     2.6G    .     root@ip-10-190-133-49:/home# du -sh --exclude=abcdef     66M     .      when I go to `/home/abcdef`               root@ip-10-190-133-49:/home/abcdef# du -hs     2.5G    .     root@ip-10-190-133-49:/home/abcdef# du -sh --exclude=pqrstuv     32M     .      Based on above 3 observations I am concluding that my mounted nfs also calculating in `df -ha` , I want to check is this normal to happen? or I am calculating in wrong manner. output of `alias`,               alias egrep='egrep --color=auto'     alias fgrep='fgrep --color=auto'     alias grep='grep --color=auto'     alias l='ls -CF'     alias la='ls -A'     alias ll='ls -alF'     alias ls='ls --color=auto'      More details related to this, when I was on / and run `du -shx`               root@ip-10-10-221-187:/# du -shx     4.1G    .      and when I run `df -ha`               root@ip-10-10-221-187:/# df -ha     Filesystem            Size  Used Avail Use% Mounted on     /dev/sda1             9.9G  8.2G  1.3G  87% /      Here df says root partition 8.2G occupied, but du calculating only 4.1G, now where the difference 8.2G-4.1G=4.1G is going, it looks like df calculating doubled value, not sure how? and this force me to think is my mounted file system coming into picture in calculation or something else that not coming in my eyes. Finally I get the issue, See two snaps of `top` one is before restart and other is after restart, Before restart when `df -ha` says I am 8.9G full,               top - 04:36:08 up 5 days, 16:07,  3 users,  load average: 2.34, 2.46, 2.18     Tasks: 225 total,   4 running, 220 sleeping,   0 stopped,   1 zombie     Cpu(s): 19.1%us, 46.0%sy,  0.0%ni, 31.5%id,  3.1%wa,  0.0%hi,  0.2%si,  0.0%st     Mem:   7864548k total,  7189196k used,   675352k free,   861072k buffers     Swap:        0k total,        0k used,        0k free,  4221888k cached      After restart when `df -ha` says I am 5.1G full,               top - 04:39:30 up 0 min,  2 users,  load average: 2.18, 0.65, 0.22     Tasks: 223 total,   4 running, 218 sleeping,   0 stopped,   1 zombie     Cpu(s): 13.6%us, 13.4%sy,  0.0%ni, 39.2%id, 33.8%wa,  0.0%hi,  0.0%si,  0.0%st     Mem:   7864548k total,   677452k used,  7187096k free,    15328k buffers     Swap:        0k total,        0k used,        0k free,   150392k cached      Now when I observed cached values then I realize the cached is eating the extra GB that I was not able to find, any suggestion now how can I resolve this ?


how can a makefile detect whether a command is available in the local machine?

I began to use org-mode for planning out my tasks in GTD-style system. Putting every org files in a directory of a Dropbox folder, I run emacs to edit / manage these files from three different local machines: Cygwin, Mac OS X, and Debian. As I also use MobileOrg to access these org files from my iPad, a `checksums.dat` file must be kept up-to-date when any changes are made. This can be done by running `md5sum *.org > checksums.dat`. The problem is that there are _three_ different commands for `md5sum` command: `md5sum.exe` in Cygwin, `md5` in Mac OS X, and `md5sum` in Debian. The most ideal situation is a makefile, stored in a Dropbox foder, detects which command is available in the current machine and runs that command to do the md5 checksum operation.


On deep-created  directories

1. In Windows, there is a certain limit on the number of characters in a path, which restricts how deep a directory can be created. I was wondering what the case is like in Linux?   2. Do you have some suggestions on how to organize directories to achieve the same or close enough benefits (such as good for organization) of deep directory structures, with less potential trouble one may run into?


Blue gradient line on top and bottom instead of Ubuntu-USB-Grub-Screen

I just bought a E350M1 mainboard with onboard AMD Radeon 6310 Graphics Card. I did (I think I did) the UEFI-Bios trick:               CSM activated       and plugged-in a usb-stick with an Ubuntu 13.10 Desktop i386 (made with lili Live USB Creator). Unfortunately I got a screen like this: ![freeze screen on mini-itx-board](http://i.stack.imgur.com/cJFkY.jpg) I cant see a menu, I am only able to reboot via `Ctrl`+`Alt`+`Del` I have no hd/cd/dvd/br/floppy only usb. Any ideas?


iptables advice with upd ports blocking in debian linux

please advice: I add next iptables rules:               iptables -I OUTPUT 2 -p udp --dport 53 -j ACCEPT     iptables -I OUTPUT 2 -p udp --dport 1700:1750 -j ACCEPT     iptables -I OUTPUT 3 -p udp -m udp --dport 1812 -j ACCEPT     iptables -I OUTPUT 5 -p udp -m udp --dport 1813 -j ACCEPT     iptables -I OUTPUT 5 -p udp -m udp --dport 5950:6050 -j ACCEPT     iptables -I OUTPUT 5 -p udp -m udp --dport 499:510 -j ACCEPT     iptables -I OUTPUT 5 -p udp -m udp --dport 4490:4550 -j ACCEPT     iptables -I OUTPUT 20 -p udp -j DROP      But, after apply: ipsec, l2tp and openvp udp port 6000 stops working Advice, what is wrong? Here is my udp services:               udp 0 0 0.0.0.0:500 0.0.0.0:* 3115/charon     udp 0 0 0.0.0.0:1701 0.0.0.0:* 2885/xl2tpd     udp 0 0 162.243.256.150:6000 0.0.0.0:* 2818/openvpn     udp 0 0 0.0.0.0:4500 0.0.0.0:* 3115/charon     udp6 0 0 :::500 :::* 3115/charon


How to uninstall java from sco openserver 5.0.6?

I have installed Java (J2SE 1.3.1_21) by following this tutorial: http://www.anyang-window.com.cn/in-the-sco-openserver-506-installed- on-j2se-13106-development-environment/ Now, I want to uninstall it. How can I do that?


What is bash's meta key?

I tried to use `xmodmap` to map `META_L` to the `MENU` key but it doesn't seem to be accepted by `bash` as the meta key. So, I am wondering how these components (keyboard, X, xterm, bash) relate to each in regard the the Meta- and Super-Keys. Any explanation would be appreciated. Let me put this another way. The bash man page says, for example, that the function yank-nth-arg is bound to `M-C-y` and it works when I press `Esc- Control-y`. But I find this a bit cumbersome. So how can I make bash accept another key as `Meta` (like the `Menu`) for all its default bindings?


Lost password for a user on a Linux Server: How reset it?

On a Server an user 16040 has lost his password. I have password for root but don't have password for user 16040. How can I reset his password? With `passwd 16040`, unix ask me current password that I don't have. Is there a command for reset a user's password without current password?               passwd 16040     Changing password for 16040.     Current password for 16040@friesbie.com:


Unable to make file system writtable no matter what

I have a flash card SanDisk of a camera which I plug in into my computer:               $ lsblk          mmcblk0     179:0    0   3.7G  1 disk      └─mmcblk0p1 179:1    0   3.7G  1 part           $ mount          /dev/mmcblk0p1 on /media/alex/3062-63381 type vfat (ro,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)      I want to remove all the files from .Trash-1000               sudo rm -r /media/alex/3062-63381/.Trash-1000/*     ................................................................................     rm: cannot remove ‘/media/alex/3062-63381/.Trash-1000/info/DSCF2367.JPG.trashinfo’: Read-only file system     ................................................................................      So I did this:               $ sudo umount /dev/mmcblk0p1          $ sudo umount /media/alex/3062-63381          $ sudo mount -t vfat -o rw,remount -force /dev/mmcblk0p1 /media/alex/3062-63381      Then I checked it again:               $ mount          /dev/mmcblk0p1 on /media/alex/3062-63381 type vfat (rw,rce)      But the error persisted:               sudo rm -r /media/alex/3062-63381/.Trash-1000/*     ................................................................................     rm: cannot remove ‘/media/alex/3062-63381/.Trash-1000/info/DSCF2367.JPG.trashinfo’: Read-only file system     ................................................................................      So I can't delete any file from .Trash-1000. But it's very big already so I have to do it. There is a manual locket on the card but it is NOT set to the position "lock".


sudo apt-get fails

I am running linux mint but I broke apt (deleted a lock file and ...) When I try `sudo apt-get update` or `sudo apt-get -V update` nothing happens, it just returns the command prompt. The same thing with most other `apt-get` commands. What can I do? Synaptic package manager does not open either. `/etc/apt/sources.list` is empty.


UBS-Stick with Arch is no longer bootable after Win8 has been booted

CS student but Linux newbie here. I bought an Acer Aspire S7 and wanted to try an Arch Installation on an USB- Stick. I followed the Beginner's Guide. I also set up disk encryption using dm-crypt+LUKS es described here. After everything was done, I rebooted and it worked just fine. However, I then booted Win8 and when I tried booting Arch again, it failed. The USB-key was no longer recognized as bootable. By reinstalling Grub, I can make the USB-key bootable again, but it only works as long as I don't boot Win8. Obviously, when booting Windows, the USB-key is not connected, so its data cannot be modified by the Windows boot process. It seems, installing Grub not only writes to the USB-Key but also configures something on the notebooks hdd. Something that is undone by booting Windows. I have searched for this problem, but nothing came up. So I hope I can find some ideas here. Thanks! Edit: I installed Arch from another live-usb-stick (which I can boot reliably) and followed parts 1 and 2 of the Beginners guide. Utill just before "post- intallation". When I reinstall grub I open the encrypted partition, mount root and /boot, arch-chroot into /mnt and reinstall via               grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck      I then exit, umount, close the encrypted partition and reboot. Then, booting from this stick works as long as Win8 is not booted.


What makes Pulseaudio send network data when no stream?

I have a pulseaudio over network installation that works well. However as soon as Pulseaudio connects to a local network sink, it starts sending data, even if no streams are active. The data curve is exactly the same when one stream is active, it's like a phantom stream. Pulseaudio 4 and all RTP modules disabled on both machine. What could create such behavior ? I know it is possible to prevent it since I've done it in one of my numerous configuration attempts, but can't reproduce it.


Installing Debian without a DE

I'd like to replace Fedora with Debian testing on a laptop... However, I would like to not install any desktop environment along with Debian, and simply install Openbox once the base is there. I've had problems with DE dependencies and others, so I would simply like to avoid them all together and go with a "pure", WM-only system. However, I have some concerns... When I `apt-get install` Openbox - will it install X11 along with it? Will I even be able to log in without editing various X config files, installing DMs, etc? That is, will it all be configured just as if I had Xfce/Gnome installed? If not, how could I make it so? Also, how would one go about starting Openbox straight from the text-based login console? Is that a viable alternative to various login/desktop managers out there? Another thing I'm afraid of is not having various background daemons and utilities running by default. Specifically, I am looking for keyrings, desktop notifications daemons, background power managers that might be useful for laptops and so on. Which software should I install after Openbox?


When should I create a new volume group instead of a new logical volume?

I currently have 3x1TB physical volumes in a VG and a LV that spans the entire capacity of the VG. This LV is meant to store specific files. Now I have another 2TB drive that I want to use LVM with. This will end up being part of an LV (again, using max capacity) that will be used to store different kinds of files. Should I create a new VG for the 2TB drive and another LV from that new VG? I plan on adding other 2TB drives to the mix later on, does that change the setup I should have? What are the best practises when it comes to LVM and VGs/LVs?


Can I ignore failed package installation statuses?

I've upgraded a package with `apt-get upgrade` on debian 6. The upgrade failed, but I understand why (one of the init scripts had been customised, and the upgrade script was attempting to use the old one when restarting the service). If I run `dpkg -l` the package is showing is status as `iF` (failed). Can I ignore this failed status if I believe the rest of the installation went OK, or are there other side effects to the package status?


Cannot see an EC2 VPN server from another EC2 instance

I'm using openVPN to connect to one EC2 instance from another. The client cannot see the server, however, despite that servers outside of AWS can see the server and successfully negotiate with it. It fails with "Cannot resolve host address": log output here. Config here I speculate that this is because UDP isn't configured properly. I've already opened the ODP ports on that instance via the AWS SecurityGroups - this didn't work, both for all incoming UDP, and/or for UDP from the server IP. Does anyone know what might be misconfigured in AWS to prevent this?


Proper way to mount samba share

I would like to mount a CIFS network filesystem with samba on my Arch Linux system. I would like to mount this filesystem whenever I log in (either through ssh, a TTY, or through KDM). I can get pretty close to what I want by adding the network share to `/etc/fstab`. The biggest "problem" is that this requires either hard coding my password into `/etc/fstab` or creating a credentials file with my username and password. It seems unsafe to me to keep my username and password in a plain text file even if I set the permissions to 600. Is there a "proper" way to securely automount a network share? Can I do this with PAM (my username and password are the same on both machines) and if so how?


Is it possible to filter duplicate lines from syslog?

On my mom's computer, she's getting here syslog/kern.log filled with lines from a Lexmark driver:               Sep 22 21:01:20 pamela-desktop kernel: [48657.676578] usb 1-3: usbfs: process 1490 (demond_nscan) did not claim interface 3 before use     Sep 22 21:01:20 pamela-desktop kernel: [48657.676585] usb 1-3: usbfs: process 1490 (demond_nscan) did not claim interface 3 before use     Sep 22 21:01:20 pamela-desktop kernel: [48657.676592] usb 1-3: usbfs: process 1490 (demond_nscan) did not claim interface 3 before use      Now multiply those by whatever number you need to get 161 GB. Is there anything I can do, besides write a script to filter duplicate lines out of sys/kern.log and run that as a cron job?


How can I split a pipe into 16 byte sequences?

I'm writing a bash script to automate the decryption of a certain file; however the file is encrypted in 16 byte blocks, rather than simply encoded in its entirety. Here's some psuedo code to briefly explain why I'm trying to do:               cat encrypted.bin | \     buffer and output 16 bytes when asked | \     openssl --args >> decrypted.bin      I essentially need the pipe to open and close in order to split up the data, and am unsure of how this could be done in bash. I've looked at `split`, but since the encrypted file could be several GBs, I don't want to perform that many disk writes. I should also point out that I'd like to know if there's a way to do this without looping through multiple pipes.


Capturing area of the screen without a Desktop Environment?

I'm running OpenSuse with dwm as a window manager. Since I made the switch from KDE, I haven't found a way to take a screenshot or even capture part of my screen. Is there a way I can do this in a command-line environment?


UDP NAT Punching

I have the following two problems. Please help me to solve them:   1. In symmetric NAT, as I know, the local hidden node (behind the NAT) must initiate connection in order to create a window in the NAT to allow the packets of the remote host back into the local network. Can somebody give me some idea how i can do this?   2. How can an application learn that there are NATs in the path between the source and the destination?


Non-printable-ASCII characters in sshd banner

It's possible to configure a banner for `sshd` that is to be displayed _as a connection is opened_ , via `Banner /etc/motd.ssh` in `sshd_config`. Note that this is displayed _before_ the authentication occurs, and even when an interactive shell is not launched (e.g. via `scp`). If this banner contains characters outside of the printable ASCII range, they seem to be escaped, however. Is there any way to either disable this escaping, or an alternative way to send textual output back to the client on connection which supports such characters outside of the printable-ASCII range? This would be useful both for colour escape sequences and Unicode characters.   * Related: Colorful ssh banner (not a duplicate, however, as this question is about another kind of banner)


What is abrt and the process abrt-action-generate-core-backtrace?

I recently noticed a process I hadn't seen before called `abrt-action- generate-core-backtrace` that was churning on my laptop. I waited a bit and it never seemed to stop so I killed it. ### Questions   * Did I just shoot myself in the foot somehow down the road?   * What was this process doing?   * Is there a way to spy on what this application is up to?


redhat oauth.so missing

I tried to put the oauth on my redhat server, but since I got this message :               PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/oauth.so' - /usr/lib/php/modules/oauth.so: cannot open shared object file: No such file or directory in Unknown on line 0      Do someone know how to put that file on redhat ? I'm not a Linux expert. Thank you


(CentOS-6.5) How to implement GNOME environment privilege escalation like GKSUDO?

How would I implement a `GKSUDO` -like privilege escalation control on CentOS 6.5 workstations? (standard GNOME config, x86_64 and i386) I do not want to share the root password with users, and some of the applications & commands they use do not work properly -- or at all -- when launching them from a Terminal with `$ sudo <application> <flags>`. Essentially, I would like to have CentOS 6.5 require authentication for privilege escalation operate pretty much **_exactly_** like Ubuntu/Unity has for some time now.


Two HDD installation

Is there any easy tutorial or guide how can I setup Debian (amd64 v. 7 + xface) on my server, but using this separation ? **Separation:**   * SSD (32GB) for system   * Normal HDD (1TB) for data like /var ...


How to recover Windows Boot Manager after a Mint installation gone wrong

Yesterday, my cousin wanted me to install Linux Mint onto his Windows 8 Lenovo laptop so he could dual-boot Linux Mint and Windows 8 so he could get some hands-on experience with Windows 8. I've only ever installed Linux for dual-booting on Windows XP, and I was originally not aware of all the UEFI details for installing Linux on a Windows 8 machine. So, I created the Linux Mint USB stick and put it onto my 4GB flash drive, which I then plugged into the computer. I booted into the BIOS of the computer and changed the USB stick to be the default boot option. I successfully booted from the Mint USB stick, and I opened up Gparted on the USB drive to edit the partitions. The partitions are as follows:   * /dev/sda1 (1000MB partition labeled WINRE_DRV)   * /dev/sda2 (260MB partition labeled WINDOWS_DRV, also currently iBt is mounted at /boot/efi)   * /dev/sda3 (1000M partition labeled LRS_ESP)   * /dev/sda4 (128MB partition with an unknown file system)   * /dev/sda5 (405GB partition labeled Windows8_OS)   * /dev/sda6 (25GB partition labeled LENOVO)   * /dev/sda7(12.5GB partition labeled PBR_DRV)   * **New** : /dev/sda8 (16GB ext4 partition that was trimmed off of /dev/sda5)   * **New** : /dev/sda9 (4GB linux-swpa partition trimmed off of /dev/sda5) So, I then created those last two partitions intended for Mint. I then proceeded with the default installer for Mint Linux. When reaching the partitioning stage, it didn't recognize that any other operating systems were on the system, which I thought was odd. I realize now I think this was because of UEFI with Secure Boot still being enabled. Anyways, I set up a custom partitioning, with /dev/sda8 being the intended partition for Mint. However, I didn't realize it at the time, but I installed GRUB on /dev/sda8 instead of the Master Boot Record, so GRUB was never the default chooser on startup. After finishing the installation, we then installed EasyBCD to make Linux Mint bootable, since I didn't realize I just screwed up in choosing where to install GRUB. We added a custom record for the Mint partition, and this is where things began to go horribly wrong. We rebooted the computer and were greeted by the Windows Boot Manager with two options: Linux Mint and Mint Linux. Both options resulted in the general "Windows is corrupt, insert install media to repair computer, blah blah". We realized then that something was horribly wrong. I inserted the Linux Mint USB again and forced the computer to boot from the USB, and once I was back in, I realized that I had messed up completely on the installation. I reinstalled Mint over the old /dev/sda8 and this time installed GRUB on the MDR. So, now I was at least able to boot the computer into Linux Mint. So, now the problem we're facing is that we are unable to reboot into Windows. In GRUB, I have the option to boot Mint or the Windows Boot Manager, and the Boot Manager just repeats the same issue that we were having before. We have tried installing Windows XP onto a flash drive to try to remotely change EasyBCD settings; however, the program needed to make a XP flash drive, Rufus, does not work on anything but Windows... we don't have any Windows computers available. Is there any way to remotely repair the Windows Boot Manager to safely recover and reboot into Windows 8? The ultimate goal is to prevent any data loss and to successfully boot back into Windows. Any help is appreciated!


What is the difference between 'rm' and 'unlink'?

Assuming you know the target is a symbolic link and not a file, is there any difference between using `rm` and `unlink` to remove the link?


openbox window positioning

Can one somehow instruct `openbox` about the desired location to open new windows? For example, I have two screens (LVDI, VGA) and would prefer that new windows be opened on VGA, whereas they are always opened on VLDI instead (perhaps because LVDI is listed first among monitors known to `X`). As another example, I would like to make `openbox` aware of the position of the `conky` desktop window so that new windows do not obscure it.


How does the authentication process with the salted hash in shadow work

Does the supplied password during login get converted to a salted hash and then compared to the one in /etc/shadow? /what if the user is in LDAP but not in the shadow file? Would it use kerberos?


Changing fonts for the Smuxi application

I was checking out the graphical IRC client smuxi, which I had never heard of before. This application appears to be a GNOME application. Anyway, how do I change the default font on this app? The default font is quite tiny, and I would like to make it larger. I'd prefer to make just the font on this app to be enlarged, and not all gnome applications (asuming that is an option). I'm running a wheezy-backports version of smuxi (0.11~rc5-1~bpo70+1) on Debian wheezy.


removing kernel modules not working for some modules

unfortunately i couldnt install a machine with minimal installation as a virtual machine ,so i am trying to prevent loading of unwanted modules from kernel using blacklist file. Added following to blacklist.conf //forbluetooth               blacklist rfkill     blacklist bluetooth     blacklist bnep     blacklist be2iscsi     blacklist iscsi_boot_sysfs     blacklist iscsi_tcp     blacklist libiscsi_tcp     blacklist libiscsi     blacklist scsi_transport_iscsi     blacklist bnx2i     blacklist cnic     blacklist uio     blacklist cxgb4i     blacklist cxgb4     blacklist cxgb3i     blacklist cxgb3     blacklist mdio     blacklist libcxgbi     blacklist ib_iser     blacklist rdma_cm     blacklist ib_addr     blacklist iw_cm     blacklist ib_cm     blacklist ib_sa     blacklist ib_mad     blacklist ib_core     blacklist coretemp     blacklist sunrpc     blacklist ghash_clmulni_intel     blacklist crc32c_intel     blacklist uinpu      but after restart,its still showing most of the modules,how can i remove remaining modules.               lsmod     Module                  Size  Used by     ebtable_nat            12808  0      ipt_MASQUERADE         12881  1      nf_conntrack_netbios_ns    12666  0      nf_conntrack_broadcast    12528  1 nf_conntrack_netbios_ns     ip6table_mangle        12701  1      ip6t_REJECT            12940  2      nf_conntrack_ipv6      14531  23      nf_defrag_ipv6         18178  1 nf_conntrack_ipv6     iptable_nat            13384  1      nf_nat                 25415  2 ipt_MASQUERADE,iptable_nat     be2iscsi               81848  0      iscsi_boot_sysfs       15642  1 be2iscsi     bnx2i                  54715  0      cnic                   62654  1 bnx2i     uio                    19045  1 cnic     cxgb4i                 32880  0      cxgb4                 108493  1 cxgb4i     cxgb3i                 32951  0      cxgb3                 155602  1 cxgb3i     mdio                   13436  1 cxgb3     libcxgbi               56493  2 cxgb3i,cxgb4i     ib_iser                37813  0      rdma_cm                42167  1 ib_iser     ib_addr                13786  1 rdma_cm     iw_cm                  18222  1 rdma_cm     ib_cm                  41726  1 rdma_cm     ib_sa                  32956  2 rdma_cm,ib_cm     ib_mad                 46341  2 ib_cm,ib_sa     iptable_mangle         12696  1      ib_core                73895  6 rdma_cm,ib_cm,ib_sa,iw_cm,ib_mad,ib_iser     iscsi_tcp              18334  0      libiscsi_tcp           24177  4 cxgb3i,cxgb4i,iscsi_tcp,libcxgbi     libiscsi               50543  8          libiscsi_tcp,bnx2i,cxgb3i,cxgb4i,be2iscsi,iscsi_tcp,ib_iser,libcxgbi          scsi_transport_iscsi    57491  8 bnx2i,be2iscsi,iscsi_tcp,ib_iser,libcxgbi,libiscsi          nf_conntrack_ipv4      14970  22 nf_nat,iptable_nat     nf_defrag_ipv4         12674  1 nf_conntrack_ipv4     xt_conntrack           12761  42      nf_conntrack           84046  8      nf_conntrack_netbios_ns,ipt_MASQUERADE,nf_nat,xt_conntrack,nf_conntrack_broadcast,iptable_nat,nf_conntrack_ipv4,nf_conntrack_ipv6          ebtable_filter         12828  0      ebtables               30758  2 ebtable_nat,ebtable_filter     ip6table_filter        12816  1      ip6_tables             26943  2 ip6table_filter,ip6table_mangle     microcode              23447  0      uinput                 17674  0      xen_netfront           26504  0      crc32c_intel           12902  0      xen_blkfront           22529  2      ghash_clmulni_intel    13221  0       sunrpc                255587  1


How can I install the Atheros AR8161 drivers without an internet connection?

How can I install the Atheros AR8161 drivers without an internet connection for fedora19?


How to make bash abort the execution of a script on syntax error?

To be on safe side, I'd like bash abort the execution of a script if it encounters a syntax error. To my surprise, I can't achieve this. (`set -e` is not enough.) Example:               #!/bin/bash          # Do exit on any error:     set -e          readonly a=(1 2)          # A syntax error is here:          if (( "${a[#]}" == 2 )); then         echo ok     else         echo not ok     fi          echo status $?          echo 'Bad: has not aborted execution on syntax error!'      Result (bash-3.2.39 or bash-3.2.51):               $ ./sh-on-syntax-err     ./sh-on-syntax-err: line 10: #: syntax error: operand expected (error token is "#")     status 1     Bad: has not aborted execution on syntax error!     $       Well, we can't check `$?` after every statement to catch syntax errors. (I expected such safe behavior from a sensible programming language... perhaps this must be reported as a bug/wish to bash developers) ## More experiments ### `if` makes no difference. Removing `if`:               #!/bin/bash          set -e # exit on any error     readonly a=(1 2)     # A syntax error is here:     (( "${a[#]}" == 2 ))     echo status $?     echo 'Bad: has not aborted execution on syntax error!'      Result:               $ ./sh-on-syntax-err      ./sh-on-syntax-err: line 6: #: syntax error: operand expected (error token is "#")     status 1     Bad: has not aborted execution on syntax error!     $       Perhaps, it's related to exercise 2 from http://mywiki.wooledge.org/BashFAQ/105 and has something to do with `(( ))`. But I find it still unreasonable to continue executing afte a syntax error. ### No, `(( ))` makes no difference! It behaves bad even without the arithmetic test! Just a simple, basic script:               #!/bin/bash          set -e # exit on any error     readonly a=(1 2)     # A syntax error is here:     echo "${a[#]}"     echo status $?     echo 'Bad: has not aborted execution on syntax error!'      Result:               $ ./sh-on-syntax-err      ./sh-on-syntax-err: line 6: #: syntax error: operand expected (error token is "#")     status 1     Bad: has not aborted execution on syntax error!     $


How to setup keyboard shortcut that enters predefined text into X11 xterminal via SSH from mac OS?

I do a lot of remote programming on my CentOS linux server by opening an X11 xterminal window on my Mac OS, and SSH into the server. I'm looking for an easy to use method to enter a predefined text string when hitting a customized hotkey. For example, instead of manually typing:               # cd /home/users/jim/jcode/algorithms/applications      I'd like to type something like command-A, or enter a custom key sequence like ";app" at the command line and have it be replaced with the text above. I tried various programs like TextExpander (http://smilesoftware.com/textexpander/faq.html), on my mac, but they don't support X11 xterminals. Anyone know of a good way to achieve this?


SSH key based login bypasses password policies

I noticed that logins via an SSH key bypass the LDAP password policies (password ageing, password warning, and password lockout due to failed attempts, etc). Is there any way to force key-based ssh logins to respect the password policies? My clients are old (RHEL 4), so installing sssd is not an option.


Matlab R2010a over ssh -X displays empty windows

I'm trying to use Matlab R2010a over ssh, with X forwarding. Now the X forwarding certainly works (for example xclock displays nice and fast) But when invoking matlab, I get the splash screen ok, and when the desktop loads, I just get an empty window (only the start button is displayed). The window apears somewhat functional: Clicking in the area where the menu is supposed to be does open the menu. Now the question is: how to fix this? I'm using the grml 2010.12 live cd (which is based on debian unstable), with xorg 1:7.5+8 and the nouveau X driver. Any suggestions are welcome.


Can't mount Samba share on Rasbian, works flawlessly on Debian

I have a samba share that I use in my home, this works fine on both Windows and Debian, but when trying to mount it on my Raspberry Pi I just get an error. `/etc/fstab`:               //media.lan/public /media/media.lan cifs guest, uid=1000 0 0      `dmesg`:               [ 1497. 700485] CIFS VFS: Send error in SessSetup = -13     [ 1497. 703604] CIFS VFS: cifs_mount failed w/return code = -13                    root@webcam:/home/pi# mount -a     mount error (13): Permission denied     Refer to the mount.cifs (8) manual page (e.g. man mount.cifs)     root@webcam:/home/pi#


How to freeze current task order?

I believe I have read some time ago how you can make `top` stop sorting the tasks so that they stay in the same line (easier to read) but still get updates for their values (in contrast to simply stopping the screen refresh by pressing e.g. `k` or `r`). Now I tried to find this info in both the online help and the man page but couldn't find anything like that. Of course, it's possible that I have just dreamt reading something like this.


How to Use Domainkeys and DKIM both with exim on freebsd server machine

I have setup exim mta on freebsd. I have also setup DKIM on this machine and my mails are properly signed. I want to know how to setup **Domainkeys** along with DKIM on exim so that my mails are signedf both by Domainkeys as well DKIM. This is because gmail honors DKIM as well yahoo honors Domainkeys.


How to install Ubuntu on a system where is already Mint and Windows 7?

I have already installed Linux Mint on Windows 7 so now I have dual boot with Linux Mint and Windows 7. They are both on diferent partitions. I have 1 free partition left. The question is how to install Ubuntu? Should I just run it from CD and install it on the free partition? Would I be able to run then all 3 systems (Ubuntu, Mint, Windows) from the menu when starting a computer or not? How to do that?


How to subtract rows (lines) with AWK

I'm trying to figure out how I can use AWK to subtract lines. For example, imagine the input file is:               30     20      The output would be:               10      Now, as a test I am trying to calculate the "Used" memory column from:               $ cat /proc/meminfo      So at the moment I have written this:               $ grep -P 'MemTotal|MemFree' /proc/meminfo | \         -- Here comes the calculation using AWK      I have tried the following:               $ grep -P 'MemTotal|MemFree' /proc/meminfo | \         awk '{print $2}' | awk '{$0-s}{s=$0} END {print s}'       But this just gives me the last row of data. I've found a working solution, but I doubt it's the most optimal one. All my coding experience tells me that hard coding the amount of rows is terrible :P               $ grep -P 'MemTotal|MemFree' /proc/meminfo | \         awk '{print $2}' | awk 'NR == 1{s=$0} NR == 2 {s=s-$0} END {print s}'


Matching Five Columns in two Files using Awk

I have two Input files. **File1:**               s2/80   20      .       A       T       86      F=5;U=4     s2/20   10      .       G       T       90      F=5;U=4     s2/90   60      .       C       G       30      F=5;U=4      **File2:**               s2/90   60      .       G       G       97      F=5;U=4     s2/80   20      .       A       A       20      F=5;U=4     s2/15   11      .       A       A       22      F=5;U=4     s2/90   21      .       C       C       82      F=5;U=4     s2/20   10      .       G       .       99      F=5;U=4     s2/80   10      .       T       G       11      F=5;U=4     s2/90   60      .       G       T       55      F=5;U=4      **Expected Output:**               s2/80  20 . A   T   86  F=5;U=4  s2/80  20  . A   A   20     F=5;U=4     s2/20  10 . G   T   90  F=5;U=4  s2/20  10  . G   .   99     F=5;U=4      **Logic:** I want all the lines from File1 and File2 concatenated in the Output file: **_Conditions:_** If Column 1, 2, 4 of File1 and File2 exactly match and if Column 5 of File2 has a dot ie "." or if it match exactly with Column 4 of file2. **Code:** I tried using the script:               BEGIN{}     FNR==NR{     k=$1" "$2     a[k]=$4" "$5     b[k]=$0     c[k]=$4     d[k]=$5     next     }          { k=$1" "$2     lc=c[k]     ld=d[k]     # file1 file2     if ((k in a) && ($4==$5) && (lc==$4)) print b[k]" "$0     }      But I get an Output of:               s2/80  20 . A   T   86  F=5;U=4  s2/80  20  . A   A   20     F=5;U=4      Whereas My output should be:               s2/80  20 . A   T   86  F=5;U=4  s2/80  20  . A   A   20     F=5;U=4     s2/20  10 . G   T   90  F=5;U=4  s2/20  10  . G   .   99     F=5;U=4      I would appreciate your help. Thanks.


Strange issue with curl/lynx and non resolving domains

I have a weird issue on my server in that if I use curl or lynx to try and access a URL that doesn't exist (say a non registered domain, or a domain that's not in DNS), I don't get an error, it instead delivers me to the default locally hosted website. For example: "lynx http://jksodf89s9df9sudfisdf.com" or "curl http://jksodf89s9df9sudfisdf.com" Both of these should clearly return an error (404, "Can't resolve", or something similar I'm guessing) as they don't exist - but instead I get the Apache holding page that is currently set as my default website for Apache on the server. I can only assume it's a DNS or Apache config issue, but I just can't see what would allow non existant domains to be redirected to localhost.


How to remove n number of lines from a file using sed command?

I want to remove a particular number of lines after the given pattern is matched. Can anyone please tell me how that can be done using the `sed` command ?


How to install my application

I just created a simple application which creates a file on my desktop and writes "HAHA" in it. I made it in C++ and used g++ to get a binary. It works but it's not really "installed" on linux mint. So I wondered how do I do that? How can I tell linux mint to show this in my menu where all my installed applications are listed? I heard something about moving it into /usr/bin with a bash script. I moved the application to /usr/bin with terminal but there were no changes (the app is in the directory but it's not displayed in my menu). Or do I have to restart linux mint? Maybe you could send me a link to a good tutorial. I need some help...


Intruder nature detection by opensource tools like tripwire

I want to use different kind of intrusion detection tools like OpenSource Tripwire. Please suggest me some tools which can provide me some additional information to that provided by tripwire? Secondly, how can I get IP addresses of all the clients of my server? Thirdly, Can I merge logs created by all such tools?


Mesa EGL not working, not even initializing

Nearly a week now, and I can't figure out what's wrong! Any pointers would be appreciated (pun intended)! Ubuntu 12.04 x86_64   Mesa-8.0.4 > ./configure --enable-64-bit --enable-pic -enable-opengl --enable-gles2 > --enable-xorg --enable-egl --enable-glu --with-x (Also tried with the apt-get package of Mesa)               ls /usr/local/lib | grep EGL       libEGL.so@       libEGL.so.1@       libEGL.so.1.0*        When running the simple tutorial code               display = eglGetDisplay(EGL_DEFAULT_DISPLAY);       EGLBoolean err = eglInitialize(display, NULL, NULL);      initialize fails and further functions return `EGL_NOT_INITIALIZED`.


scp to an alias

To transfer a folder from my local host to a remote host, I normally do:               $ scp -r myFolder user@host:destFolder/      Trying to make this easier, I aliased the remote host destination:               $ alias remoteHost user@host:destFolder/      However, scping to the alias doesn't work:               $ scp -r myFolder `remoteHost`     bash: user@host:destFolder/: No such file or directory     usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]                [-l limit] [-o ssh_option] [-P port] [-S program]                [[user@]host1:]file1 ... [[user@]host2:]file2


open corel draw files on debian

So I have `.cdr` files on my PC and I want to open them on my Debian 7 box. What software do I need to be able to open it?` I have:   * 512 MB RAM   * 3 GHz processor   * 256 MB graphics   * with Debian 7


How can I make this daemon/init run as a non root user?

I have an init script to kick off a daemon. The problem is it runs as root. I would like it to run as a user called "deploy". Ubuntu 12.04               #! /bin/sh          # File: /etc/init.d/unicorn          ### BEGIN INIT INFO     # Provides:          unicorn     # Required-Start:    $local_fs $remote_fs $network $syslog     # Required-Stop:     $local_fs $remote_fs $network $syslog     # Default-Start:     2 3 4 5     # Default-Stop:      0 1 6     # Short-Description: starts the unicorn web server     # Description:       starts unicorn     ### END INIT INFO          DAEMON=/usr/local/bin/unicorn_rails     DAEMON_OPTS="-c /var/www/current/config/unicorn.rb -D"     NAME=unicorn     DESC="Unicorn"     PID=/var/www/current/shared/pid/unicorn.pid          case "$1" in       start)         echo -n "Starting $DESC: "         $DAEMON $DAEMON_OPTS         echo "$NAME."         ;;       *)         echo "Usage: $NAME {start|stop|restart|reload}" >&2         exit 1         ;;     esac          exit 0


Centos 6.3 can't resolve hostname of network drive while others can

I have a network drive (external network) being used as media storage for a media server running on my router. I'm trying to switch the media server to my Centos 6.3 machine so I can take advantage of `ffmpeg` and more (unrelated).. All I'm wondering here is why my Centos server can't resolve the host name for the drive while my laptop running Ubuntu can on the same network. Ubuntu can ping it by host name and receive a response. Though I know Ubuntu has a GUI and I can click on "network" in the file system and find it there `smb://ballzdeep` it says is the location of the drive. Centos is sans GUI. I can't figure out why it doesn't find it and have been searching for a way to discover network hosts but no luck.


cat file to multicast

I have a text file (`test.txt`) which represents captured network data. The actual protocol is text-based, with NULL line endings, so this isn't a problem. I need to run this test captured data through my server, over a multicast port. The TTL can be zero -- I'll run both side of this on the same box. Is there a way to essentially `cat` a file to a multicast port? I already have tools that I use to do this with pcap files and other formats, but I'd prefer to use something quick and builtin rather than crack open that code to make it read text files. This will be run on an RHEL6.2 server. Command-line, ssh session.


Redirect stderr of the double-parentheses construct

I'd like to be able to redirect the `stderr` of a double-parentheses construct. For example:               a=$(($var/$var2))      would output some error messages if `$var2 = 0`, I do not want the user to see this. I know I could simply check for zero before doing the division, but I'd like to know if there is a way to do this redirection, for curiosity and because it might turn out useful in other situations. I've already tried:               a=$(($var/$var2)) 2> /dev/null      Which does not work and               a=$(($var/$var2 2> /dev/null ))      Which gives a syntax error.


Which linux distro's package repositories are secure and which are not?

Most distro's I know have some kind of repository functionality where new packages could be downloaded after installation. Which distros do this in a secure way and which doesn't do this in a secure way. I'm especially thinking about attack vectors like man-in-middle and problems like breach of security on both the repository meta server and the repository file mirrors. I have heard that both Slackware and Arch linux are very vulnerable because they lack package signing. Is this true? Are there any other major linux distro's that are vulnerable for simple man-in-middle attacks?


How to disable trash can in Thunar/XFCE?

I found myself _always_ holding `Shift` when I delete a file with Thunar (the XFCE file manager). When I was using Windows I was always disabling "recycle bin" immediately after installation. I've looked for similar option in Thunar settings but had no luck finding it. Do you happen to know a way?


Change screen resolution of Xenserver Console for a CentOS VM

I need to increase screen resolution to 1024x800 for my XEN console. I tried to place               vga=791      at the end of kernel line the file `/boot/grub/grub.conf` but it seems that most of the boot arguments are ignored during startup. Probably inside XenSever /boot is not really used in order to launch CentOS. I even tried to add boot option in the boot option tab (VM -> Property -> Boot Option) but doesn't work.


Is it possible to pass kernel parameters in the LILO boot prompt? ![enter image description here](http://i.stack.imgur.com/IOLQ1.jpg)


How can I change what's displayed at a login shell?

I'm getting more familiar with tweaking the way things look in a shell via the prompt (`.bashrc`), but I'm now trying to change the initial stuff displayed when I first log in. On my EC2 instance, this is what I see when I log in:                        __|  __|_  )  Fedora 8              _|  (     /    32-bit             ___|\___|___|                 Welcome to:               Wowza Media Server 2 for Amazon EC2                Version: 2.0.0.08      On my home Mint computer, here's what I see when I log in:               Welcome to Linux Mint 11 Katya (GNU/Linux 2.6.38-8-generic x86_64)          Welcome to Linux Mint     * Documentation:  http://www.linuxmint.com          Last login: Tue Jun 21 17:44:05 2011      Where is this defined? How can I tweak it for some mad ASCII art **ACTION**?


Use testdisk and gpart information to mount ext4 partition

I am trying to recover the ext4 partition table of a 2TB disk, where I have 900.000 files. I have cloned the original HD and now I am working on the cloned HD. And I am running Parted Magic Live CD. With testdisk I got what it looks like the original deleted partition:               Disk /dev/sdd - 2000 GB / 1863 GiB - CHS 243201 255 63     Partition Start End Size in sectors     >P Linux 0 1 1 243200 254 61 3907024000 [Duo]      Anybody can help me to read this numbers? As far as I know, I can use this data with the mount command and, if everything goes right, have access to the files in order to start a file transfer, can't I? According to this man page, I can use data extracted from testdisk to help me fix the partition: > "Now using the value given by TestDisk, you can use fsck to repair your > ext2/ext3 filesystem. I.E. if TestDisk has found a superblock at block > number 24577 and a blocksize of 1024 bytes, run:" > > `# fsck.ext3 -b 24577 -B 1024 /dev/hda1` But I don't know how exactly. By the way, here it goes some more useful data from gpart:               # gpart -gv /dev/sdd          dev(/dev/sdd) mss(512)     Primary partition(1)        type: 131(0x83)(Linux ext2 filesystem)        size: 1907726mb #s(3907024000) s(63-3907024062)        chs:  (0/1/1)-(1023/254/63)d (0/0/0)-(0/0/0)r        hex:  00 01 01 00 83 FE FF FF 3F 00 00 00 80 74 E0 E8          Primary partition(2)        type: 000(0x00)(unused)        size: 0mb #s(0) s(0-0)        chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r        hex:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00          Primary partition(3)        type: 000(0x00)(unused)        size: 0mb #s(0) s(0-0)        chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r        hex:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00          Primary partition(4)        type: 000(0x00)(unused)        size: 0mb #s(0) s(0-0)        chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r        hex:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00          Begin scan...     Possible partition(Linux ext2), size(1734848mb), offset(2mb)        type: 131(0x83)(Linux ext2 filesystem)        size: 1734848mb #s(3552968704) s(4096-3552972799)        chs:  (1023/255/0)-(1023/255/0)d (0/0/0)-(0/0/0)r        hex:  00 FF C0 FF 83 FF C0 FF 00 10 00 00 00 00 C6 D3      According to this post I can use this information to help me: > "This time I got something useful. The s(63-117258434) part shows the > starting sector, which is 63. A sector is 512 bytes, so the exact starting > offset of the partition is 32256. So to mount this partition, just issue:" > > `mount -o loop,ro,offset=32256 /storage/image/diskofperson.dd /mnt/recovery` > > "And voilá, access to the filesystem has been obtained." > > `/storage/image/jdiskofperson.dd on /mnt/recovery type vfat > (ro,loop=/dev/loop0,offset=32256)` Any help would be great.


swappiness and RAM usage

Been going through this topic - http://askubuntu.com/questions/157793/why-is- swap-being-used-even-though-i-have-plenty-of-free-ram. Turned down swappiness to 10 and then to 0 but my installation is never able to reach out into 70%+ of RAM before turning to the swap area. So I am wrestling my lunix system with the help of that script from the link above, but still no joy. I am getting:               kellogs@kellogs-K52Jc ~/workspace/xgate_git/tigase-server $ sudo unswap.sh     Free memory:    1525024 kB (1489 MB)     Used swap:      938196 kB (916 MB)     Freeing swap...     swapoff: /dev/sda4: swapoff failed: Cannot allocate memory      and even:               kellogs-K52Jc tigase-server # unswap.sh     Free memory:    1212956 kB (1184 MB)     Used swap:      478516 kB (467 MB)     Freeing swap...     swapoff: /dev/sda4: swapoff failed: Cannot allocate memory      It must be something keeping the OS from using the 30% remainder of RAM. But what ? EDIT: Original: vm.overcommit_memory = 0 vm.overcommit_ratio = 50 Set to vm.overcommit_memory = 2 vm.overcommit_ratio = 100 And RAM usage would stall at about 50%; After this programs would not launch any longer and complain about memory shortage. Swap remained at 0% usage. Set to: vm.overcommit_memory = 1 vm.overcommit_ratio = 100 Managed to go to about 83% RAM and 22% swap usage. Then I have called that script for emptying swap-into-RAM and hell broke loose. libflash crashing, the rest of programs unresponsive and having gone into broken pipes and stuff like that.


efficient rc file syncing or replication

Recently I've been experimenting with KVM and virtual machines. I'm lazy and tired of manually copying/syncing my .rc files. Some Googling didn't immediately turn up any tools. Are there any CLI tools available for easily distributing or replicating them? My current solution is some scripted wgets.


per process private file system mount points

I was checking `unshare` command and according to it's man page,                  unshare - run program with some namespaces unshared from parent      I also see there is a type of namespace listed as,                mount namespace                   mounting and unmounting filesystems will not affect rest of the system.      What exactly is the purpose of this _mount namespace_? I am trying to understand this concept with the help of some example.


Mute sound from specific virtual display

I'm using Linux, precisely Mint 13 Maya, which is based on Ubuntu Precise. I was wondering if there was any way to mute sound coming from other virtual displays, or to only have sound playing from application launched in the current display, whichever works. Right now, I sometimes launch a VNC server that creates a new display on :1, while still using and displaying the "normal" virtual display on :0. If I launch an application that produces sound on :1, though, I can hear it, even though I can't see the application on my current display. For example, if I launch the command `DISPLAY=:1 vlc /path/to/sound.ogg`, I can hear VLC even while I'm using and displaying only the :0 display. Is there any way to stop that from happening, and mute all sound coming from an application launched on :1? Or, as an alternative, is there any way to instruct pulseaudio to _always_ mute a sound coming from a specific application, every time it is launched, and even if the application isn't producing sound for now, without any user intervention? For example, by launching the application through a script that will tell pulseaudio to mute the application right away? EDIT: I seem to have found a temporary solution, but it can probably be made better. By starting the application with the environment variable `PULSE_SERVER=/dev/null`, all calls to Pulseaudio fail and no audio from the application is played.


Running tcpdump, tee and scp

I'm trying to run the following:               $ tcpdump -l -X -i eth1 -n tcp port <port> | tee capture.txt | \            scp capture.txt  root@10.3.3.227:/home/checker/        1. `tcpdump -l -X -i eth1 -n tcp port <port>` In step #1 I'm capturing packets, using "-l" to to make standard out line- buffered, so that it will write each packet as it arrives.   2. `tee capture.txt` In step #2 `man tee`: "The tee utility copies standard input to standard output, making a copy in zero or more files." The output is unbuffered.   3. `scp capture.txt root@<remote-IP>:/home/` In step #3 I'm send the capture.txt file to a remote host. ### The problem If I simply perform steps #1 and #2, ALL packets are captured on the specified port. However, if I also use step #3 the `capture.tx`t does NOT contain all the packets (only a few)... This is killing me because I had this running OK just a few minutes ago! What is wrong here?


Auto restart ssh session after sleep

I have an active ssh session to a remote server that it would be nice to be able to restart upon waking from sleep/hibernate (ubuntu), and seamlessly restore tunnels. The Gnome Terminal window is still open upon restart, but it is frozen, and the programs that rely on these tunnels also hang. I have to close and reopen the ssh connection and then shut down and restart the dependent programs. Anyone got any nice methods of working around this?


Does configuring iscsi target and iscsi initiator in two linux nodes and using ethernet cable for communication make it SAN?

I'm using freeNAS to share an extent via iSCSI to my another Linux box using Ethernet cable. It work as a block storage. So SAN work as a block storage. Now, in my scenario is it working as a NAS or SAN?


/dev/console dynamic redirection

Is it possible to dynamically redirect all data sent to `/dev/console` into something else (for example - to `/dev/null`, `/dev/tty9` or even `/dev/null`)? Of course, it can be done _statically_ via `console=XXX` kernel boot parameter (or standard pipe redirection in case of a single program). The problem is that I need to do it dynamically (and for all programs that do output), based on data that comes from an external device. Any suggestions?


refresh changed content of file opened in vi(m)

I have a config-file that I keep open in vim, but that sometimes gets changed on disk, without these changes being reflected on the terminal. Can I refresh the content on the screen without closing and re-opening the file? If so, how?


Cooking EDID and finding values for .S file

It became really annoying and the resolution is bad so I decided to make my EDID and pass that to the Kernel. (I am creating EDID for S20A300B and samsung says in its page the best RES for this product is 1600*900)   I created a 1600*900.S file and tried to fill it with the info I got from `cvt 1600*900` and also `DPI calculator=91.79`.   but there are some values I can't find the answer to. > CLOCK XY_RATIO XY_RATIO_16_9 ESTABLISHED_TIMINGS_BITS 0x00 HSYNC_POL > VSYNC_POL CRC The `1600x900.S` file is:                       /*            1920x1080.S: EDID data set for standard 1920x1080 60 Hz monitor                 Copyright (C) 2012 Carsten Emde <C.Emde@osadl.org>              */              /* EDID */         define VERSION 1         define REVISION 3              /* Display */         /* EDID */     #define VERSION 1     #define REVISION 3          /* Display */     #define CLOCK 60000 /* kHz */     #define XPIX 1600     #define YPIX 900     #define XY_RATIO XY_RATIO_16_9     #define XBLANK 160     #define YBLANK 26     #define XOFFSET 48     #define XPULSE 32     #define YOFFSET (63+3)     #define YPULSE (63+5)     #define DPI 91.79     #define VFREQ 60 /* Hz */     #define TIMING_NAME "Linux FHD"     #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */     #define HSYNC_POL 1     #define VSYNC_POL 1     #define CRC 0x05          #include "edid.S"


Cross-distribution/OS packaging

Fedora, FreeBSD, OS X (Homebrew, MacPorts), Ubuntu, Debian, and others all use different packaging systems for binary and source distribution. When I develop a new application I want to make it available to as many users as possible right out of the gate. But learning all the different packaging tools and conventions is a lot of work. I can manage, but there has to be an easier way. Is there a super-tool that I should be aware of that can be used to ease the overhead of maintaining and learning all these packaging systems?


Active Directory to OpenLDAP synchronisation

We have a domain controller with `Active Directory` with a number of basic users with custom attributes. We are looking for a way to synchronise the active directory users to `OpenLDAP` (currently running on Debian 6) and wondered if anyone has experience in doing this who could provide some pointers. There is this project, but it's guides are basic and is missing AD to `OpenLDAP` (it does have the vice-versa) The hope is that every time a change is made in `Active Directory` it's pushed to the `OpenLDAP server` so that the users can be queried there. We don't want to just forward the requests as sometimes the `Active Directory` server will not be available. I'd be greatful for any advice or suggestions in this area.


Datanode in slave isn't working : Hadoop in CentOS

We've created a Hadoop cluster of two machines following these instructions: http://tecadmin.net/set-up-hadoop-multi-node-cluster-on-centos-6/ with the machines set as follows:               hadoop1 = master & slave     hadoop2 = slave      When we start the services (`bin/start-all.sh`), all services (including `datanode` for _hadoop2_ ) initialize. Everything is well. But when we check the DFS size (`bin/hadoop dfsadmin -report`), only one system ( _hadoop1_ ) is detected. We've checked `jps` on both hosts. On _hadoop1_ , all services are displayed, whereas on _hadoop2_ only `jps` is running. This means the data node on the slave is not working even though the master shows that `datanode` is starting on _hadoop2_ as well. When we check the logs, there is no `datanode` log for the _hadoop2_ slave. I've tried all possibles explanations including the namespaceID which we get from namename current VERSION and assign it to data node current VERSION. What could be the solution for this? I use centOS 7, and apache hadoop 1.2.1


How is PATH set for users in puppet?

I'm having an interesting problem which I was able to work around by manually specifying `PATH`. The problem is that although my `root` user's `PATH` is:               /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin      When I run my Puppet Master in NGINX/Passenger as user `puppet`, `PATH` somehow gets set to:               /usr/sbin:/sbin      Where is the `PATH` environment variable set for users and how can I make sure that my `puppet` user has the right `PATH`? The user doesn't have a shell:               puppet:x:103:106::/var/lib/puppet:/bin/false      In my `config.ru` Rack file which is responsible for starting the Puppet Master, I've inserted the following statement to see what `PATH` the `puppet` user is running with:               puts "PATH: " + ENV.fetch('PATH', 'null')      The output is `PATH: null`, therefore the `PATH` environment variable is simply not set when Passenger is run. I'm working in a Docker container running Ubuntu 14.04 amd64.


overriding HOME location

I'd like to override the user's HOME location locally in a script in order to force an application to store/load its settings portably.               export HOME=$TMPDIR/Data     export XDG_CONFIG_HOME=$TMPDIR/Data      These works in most cases, but there are a few apps that still find the "real" home path. Why is my method of overriding the user's HOME location not working?


A problem with find and grep

I have defined the following alias in `~/.bashrc`:                alias fg='find . -name $1 | xargs grep --color $2'      in order to write               fg "*.txt" " my_text "      and find all file that have extension .txt and contain " my_text " but it does not work. Why?


Automatic login still doesn't work after editing custom.conf

As the title suggests, I've edited /etc/gdm/custom.conf to show the following:               [daemon]     AutomaticLoginEnable=true     AutomaticLogin=username      Where username is obviously the username I'd like to automatically log into. This has been a head scratcher for me. I've done a thorough amount of searching and all the information I see makes it as simple as doing the above, but it's not. I don't know if it matters or not, but I do have multiple users. In mind this should not matter, however, since we're specifying a username here in the settings. I'm using RHEL6.4. Any ideas?


Disable italics in emacs org-mode, Ubuntu

I am having some trouble disabling the italics in emacs. I already tried:                '(italic ((t nil)))      in `.emacs`. But there is still a problem. Although it will not italicize the text between `/` and `/`, these `/`s will disappear. So, when I want to write:               /home/Quora/      it actually shows:               home/Quora      How can I avoid emacs from trying to change a face, and using the mark-up, when I type `/something/`? I am using org mode in emacs 24 in Ubuntu.


How should one set up full-disk encryption on OpenBSD?

Is there a preferred method to set up full-disk encryption under OpenBSD, similar to `dm-crypt` under Linux? I'm looking for full-disk encryption, as if someone were to steal my notebook they could potentially access the data stored on it. Another reason is that I'm not always next to my notebook, so someone could potentially compromise the integrity of my netbook. These are the two major issues which make me believe that full-disk encryption is important for me.


How can I monitor disk I/O in a particular directory?

I've got a few processes with a known name that all write to files in a single directory. I'd like to log the number of **disk block reads and writes over a period** ( _not_ just file access) to test whether a parameter change reduces the amount of I/O significantly. I'm currently using `iostat -d -p`, but that is limited to the whole partition.


How to enable touchpad scrolling and tapping in Debian Wheezy KDE?

I'm trying to turn on scrolling and tapping with my laptop's touch-pad (the 2 left and right buttons are ok). I'm on Debian 7.3 (Wheezy) KDE-desktop and I have a Synaptic touch-pad. My laptop is an old HP model of 2007 therefore it doesn't support multi-touching. As _root_ I created a `/etc/X11/xorg.conf.d/synaptics.conf` file which I have copied below. Then in Konsole I gave `synclient -l` and got back the following code:               Parameter settings:     LeftEdge                = 1752     RightEdge               = 5192     TopEdge                 = 1620     BottomEdge              = 4236     FingerLow               = 25     FingerHigh              = 30     FingerPress             = 256     MaxTapTime              = 180     MaxTapMove              = 221     MaxDoubleTapTime        = 180     SingleTapTimeout        = 180     ClickTime               = 100     FastTaps                = 0     EmulateMidButtonTime    = 75     EmulateTwoFingerMinZ    = 282     EmulateTwoFingerMinW    = 7     VertScrollDelta         = 100     HorizScrollDelta        = 100     VertEdgeScroll          = 0     HorizEdgeScroll         = 0     CornerCoasting          = 0     VertTwoFingerScroll     = 1     HorizTwoFingerScroll    = 0     MinSpeed                = 1     MaxSpeed                = 1.75     AccelFactor             = 0.0398     TrackstickSpeed         = 40     EdgeMotionMinZ          = 30     EdgeMotionMaxZ          = 160     EdgeMotionMinSpeed      = 1     EdgeMotionMaxSpeed      = 401     EdgeMotionUseAlways     = 0     TouchpadOff             = 0     LockedDrags             = 1     LockedDragTimeout       = 5000     RTCornerButton          = 0     RBCornerButton          = 0     LTCornerButton          = 0     LBCornerButton          = 0     TapButton1              = 0     TapButton2              = 0     TapButton3              = 0     ClickFinger1            = 1     ClickFinger2            = 1     ClickFinger3            = 1     CircularScrolling       = 0     CircScrollDelta         = 0.100007     CircScrollTrigger       = 0     CircularPad             = 0     PalmDetect              = 0     PalmMinWidth            = 10     PalmMinZ                = 200     CoastingSpeed           = 20     CoastingFriction        = 50     PressureMotionMinZ      = 30     PressureMotionMaxZ      = 160     PressureMotionMinFactor = 1     PressureMotionMaxFactor = 1     GrabEventDevice         = 1     TapAndDragGesture       = 1     AreaLeftEdge            = 0     AreaRightEdge           = 0     AreaTopEdge             = 0     AreaBottomEdge          = 0     HorizHysteresis         = 25     VertHysteresis          = 25     ClickPad                = 0      This is the content of `/etc/X11/xorg.conf.d/synaptics.conf`               Section "InputClass"     Identifier "Touchpad"     MatchIsTouchpad "yes"     Driver "synaptics"     Option "MinSpeed" "0.4"     Option "MaxSpeed" "0.9"     Option "AccelFactor" "0"     Option "TapButton1" "1"     Option "TapButton2" "3"     Option "VertTwoFingerScroll" "0"     Option "HorizTwoFingerScroll" "0"     Option "VertEdgeScroll" "1"     Option "CoastingSpeed" "8"     Option "CornerCoasting" "1"     Option "TouchpadOff " "0"     EndSection      I've installed `apt-get install server-xorg-input-synaptics` and rebooted the system after the creation of the `synaptics.conf` file but nothing has changed. What should I do to get it working?


Allow file manipulation but block folder/subfolder manipulation?

I have an Ubuntu file server (samba) sharing a folder structure with a Windows 7 computer classroom. All users use the same user/pass to access the folders and have read/write permissions. I would like to prevent users from moving or deleting folders, but keep the file permissions. In other words, I would like to protect my folder structure, but allow users to add/delete/rename/move _files_ within that structure. How can I do that?


Command not found in zsh

In bash, whenever I try to run a command which is not installed, I get a message which tells that the package is not installed and how to install it. This functionality is provided by installing the Debian/Ubuntu package `command-not-found`. But in zsh, it only gives the message `command not found`. So how do I install this feature in zsh? ![error in zsh](http://i.stack.imgur.com/h7esd.png)


Grub menu not appearing

I have a windows 8.1 installed in my lenovo z570.I installed linux mint 17 from an USB created using YUMI software. After installation the grub menu doesn't appear and windows gets booted up automatically.I turned off fast startup in windows also.I read that i should turn of secure boot as well.But in msinfo32 it shows secure boot : unsupported.I also tried grub-repair from a live cd.Still i am not able to get the grub boot menu.What would be the problem??


Use setxkbmap to swap the Left Shift and Left Control

Is it possible to swap the Left `Shift` and the Left `CTRL` keys using `setxkbmap` instead of `xmodmap`? _EDIT_ I have switched to Fcitx, which works way much better with my keyboard layout and customized keymap than IBus in every respect. I highly recommend it.


Startup script with LSB headers not working correctly (dependency problem)?

I am creating a startup script for my Ubuntu 14.04.1 LTS server. The script need to be run after the Rabbit MQ server. The Rabbit MQ startup script says it provides "rabbitmq-server". So I put this string in the "Required-Start" list of my startup script headers (see below). However, after installing my script with update-rc, both the Rabbit MQ script and my script are at the "S20" level, i.e. I don't think the dependency has worked. My script is also not starting correctly, but does start if I run it manually after bootup. Any ideas as to what could be wrong?                        ### BEGIN INIT INFO         # Provides: amqp_receive         # Required-Start: $local_fs $network rabbitmq-server         # Required-Stop:         # Default-Start: 2 3 4 5         # Default-Stop: 0 1 6         # Short-Description: Script to provide start/stop/status of the amqp_receive program         ### END INIT INFO                                  lrwxrwxrwx 1 root root  22 Aug 17 00:29 S20amqp-receive -> ../init.d/amqp-receive         lrwxrwxrwx 1 root root  25 Aug 13 18:14 S20rabbitmq-server -> ../init.d/rabbitmq-server         lrwxrwxrwx 1 root root  15 Apr 16 18:26 S20rsync -> ../init.d/rsync         lrwxrwxrwx 1 root root  24 Apr 16 18:26 S20screen-cleanup -> ../init.d/screen-cleanup         lrwxrwxrwx 1 root root  23 Apr 16 18:26 S38open-vm-tools -> ../init.d/open-vm-tools         lrwxrwxrwx 1 root root  26 Apr 16 18:26 S45landscape-client -> ../init.d/landscape-client         lrwxrwxrwx 1 root root  19 Apr 16 18:26 S70dns-clean -> ../init.d/dns-clean         lrwxrwxrwx 1 root root  18 Apr 16 18:26 S70pppd-dns -> ../init.d/pppd-dns         lrwxrwxrwx 1 root root  21 Apr 16 18:26 S99grub-common -> ../init.d/grub-common         lrwxrwxrwx 1 root root  18 Apr 16 18:25 S99ondemand -> ../init.d/ondemand         lrwxrwxrwx 1 root root  18 Apr 16 18:25 S99rc.local -> ../init.d/rc.local


setuid programs don't seem to run setuid in TinyCore Linux

I want to demonstrate the vulnerability of `setuid` programs using the TinyCore Linux live cd. That is, I craft a special program, with special permissions, so that it runs as the owner of the file instead of the executing user. These are my steps:   1. Create a program (see below) with a security hole, compile it in my home system (Ubuntu)   2. Make the program setuid and setup the owner of the file, still in Ubuntu   3. Unpack the Tiny Core live cd, copy the vulnerable program inside and `chroot` into it The problem is the program does not seem to run as `setuid` neither in the `chroot` environment, nor in the completed remastered image. In Ubuntu it works, but I need it working in Tiny Core. The program does run in Tiny Core, but even though it has `setuid` permissions, it is not running as the owner of the file. The program source code:               #include <stdio.h>     #include <stdlib.h>          int main(int argc, char **argv)     {       printf("Current time: ");       fflush(stdout);       system("date");       return 0;     }      Build it:               gcc -o prog prog.c      Make it setuid:               sudo chown 1200.1200 prog     sudo chmod 4755 prog      Craft a `date` script to demonstrate the vulnerability:               #!/bin/sh          echo hello > /tmp/test.txt     ls -l /tmp/test.txt      Make the crafted `date` script executable and expose the vulnerability:               chmod +x date     PATH=.:$PATH ./prog      In Ubuntu, as expected this creates `/tmp/test.txt` with owner 1200. But when I `chroot` to the live cd environment, it does not work there, the executable runs but not as the file owner. If I finish the remastering and create the live cd and boot into it, it does not work there either, even though the file has the right owner and group and permission `4755`. What am I missing? If you want to create the `chroot` environment, download the 8MB live cd from http://distro.ibiblio.org/tinycorelinux/downloads.html and follow these steps:               sudo mount Core-current.iso /mnt     mkdir /tmp/extract     cd /tmp/extract     zcat /mnt/boot/core.gz | sudo cpio -i -H newc -d      Copy the vulnerable programs to the `chroot` environment with:               sudo cp -a /path/to/prog /tmp/extract/tmp     sudo cp /path/to/date /tmp/extract/tmp      `chroot` in there and test the vulnerability:               sudo chroot /tmp/extract /bin/sh     su - tc     cd /tmp     PATH=.:$PATH ./prog      My end goal of course is to make it work on the live cd itself. It doesn't matter if it doesn't work in `chroot`, it just seems a suitable first test, without having to repack the image and booting into it.


keyboard doesn't respond after suspend in Ubuntu 12

When I put my Ubuntu on suspend mode, the keyboard stops working, and I cannot get out of suspend. I need to shutdown my laptop manually and reboot. I have VAIO laptop. Ubuntu version 12. I edited `/etc/default/grub`:               GRUB_CMDLINE_LINUX_DEFAULT="quite splash intel_idle.max_cstate=0 nohpet"     GRUB_CMDLINE_LINUX="resume=/dev/sdq


Allowing access to NetBIOS port in Fedora 18?

I've recently installed Fedora 18 on one of the machines in my office, and I've installed Samba so I can browse the file system on my Windows machine. However, I'm having some trouble opening port 137 for the NetBIOS naming system. I'm using the command below to open the port but when I use `iptables -L` or `nmap -sT -O localhost` in an attempt to list the open ports, it doesn't appear anywhere.               [root@localhost ~]# iptables -A INPUT -p tcp --dport 137 -j ACCEPT     [root@localhost ~]# service iptables save      Note: I've checked that both the `smb` and `nmb` daemons are up and running, they are (although log.smbd lists a warning about the _standard input is not a socket_ and denied permissions for the _/root/.pkcs11/pksc11.conf_ file).


chromium cannot load nss libraries?

I'm using openSUSE 12.2 64-bit with a special kernel but with chromium it gives me               [0220/130849:ERROR:nss_util.cc(724)] Failed to load NSS libraries.     [1:1:0220/130850:ERROR:nss_util.cc(724)] Failed to load NSS libraries.     [0220/130850:ERROR:nss_util.cc(724)] Failed to load NSS libraries.     [1:1:0220/130850:ERROR:nss_util.cc(724)] Failed to load NSS libraries.      I have a symlink of nss folder in `/usr/lib/nss` and `/usr/lib/x86_64-linux- gnu/nss`. When I start strace chromium it doesn't give me the path to the nss librariers. The strange thing is chromium is stopped working after an update? Maybe this is cross repo error between beta (factory) and default repo librariers? Do I really need to fix it myself? Update: I was wrong and I don't have any factory repo enabled:               1 | openSUSE-12.2-12.2-1.14 | openSUSE-12.2-12.2-1.14      | Nein      | Nein              2 | repo-debug              | openSUSE-12.2-Debug          | Nein      | Ja                3 | repo-debug-update       | openSUSE-12.2-Update-Debug   | Nein      | Ja                4 | repo-non-oss            | openSUSE-12.2-Non-Oss        | Ja        | Ja                5 | repo-oss                | openSUSE-12.2-Oss            | Ja        | Ja                6 | repo-source             | openSUSE-12.2-Source         | Nein      | Ja                7 | repo-update             | openSUSE-12.2-Update         | Ja        | Ja                8 | repo-update-non-oss     | openSUSE-12.2-Update-Non-Oss | Ja        | Ja


How can I set a directory maximum size?

Is there an easy way to cap the size of a directory? I don't think there is but just wanted to make sure. I would like to set max directory sizes for some user home dirs as well as some other dirs, mostly under `/var` in an attempt to better manage the disk resources.


At login, take picture of user at Login window(loginGUI promt window)

I have code to take a picture in a script. I don't understand how to run this script at the time of login. I would like to modify the login process so that:   * The user gets 3 login attempts.   * After 3 failures, my script runs to take a picture with the webcam. Where can I configure what happens when a user tries to log in?


"lftp" login still possible for "/etc/pam.d/vsftpd" blocked users

I have a ftp server running on the machine 192.168.122.50 Below are the last three directives from /etc/vsftpd/vsftpd.conf file               pam_service_name=vsftpd     #userlist_enable=YES     #userlist_deny=YES      Below is the content of /etc/pam.d/vsftpd file               #%PAM-1.0     session    optional     pam_keyinit.so    force revoke     auth       required     pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed     auth       required     pam_shells.so     auth       include      password-auth     account    include      password-auth     session    required     pam_loginuid.so     session    include      password-auth      Below is the content of the /etc/vsftpd/ftpusers file               #This is the list of blocked users as per the following line /etc/pam.d/vsftpd     #auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed          root     bin     daemon     adm     lp     sync     shutdown     halt     mail     news     uucp     operator     games     nobody      So two users, for example, `root` should be blocked from accessing the ftp server at this machine and `ssam` should be allowed. Now from client machine 192.168.0.2, I tried this.               am@centos ~]$ ftp 192.168.122.50     Connected to 192.168.122.50 (192.168.122.50).     220 (vsFTPd 2.2.2)     Name (192.168.122.50:ssam): ssam         331 Please specify the password.     Password:     230 Login successful.     Remote system type is UNIX.     Using binary mode to transfer files.     ftp> exit     221 Goodbye.     [ssam@centos ~]$ ftp 192.168.122.50     Connected to 192.168.122.50 (192.168.122.50).     220 (vsFTPd 2.2.2)     Name (192.168.122.50:ssam): root     331 Please specify the password.     Password:     530 Login incorrect.     Login failed.     ftp> bye     221 Goodbye.      The output was inline with the **pam** settings as the user `ssam` was allowed and user `root` was blocked. Now I have tried the lftp command at the client to connect to the server for the user root.               [ssam@centos ~]$ lftp root@192.168.122.50     Password:      lftp root@192.168.122.50:~>      The login was indeed possible **blocked** user `root` as I got the lftp prompt. Now I tried to run a command.               lftp root@192.168.122.50:~>     ls: Login failed: 530 Login incorrect.      Now it seems like the server has come to good senses and it tells me I was not able to do anything else. But the pluggable authentication module should have blocked the user `root` from entering the server at the first instance. Could anybody explain this for me?


Changing keypad settings

When I setup my Ubuntu machine, I had the option to configure the keypad style in the gnome control panel. I used to check the setting that enables windows-like behavior (Shift+Keypad does not toggle NumLock. It helps me use Shift+Home\End) from the following window:![enter image description here](http://i.stack.imgur.com/z7xtb.png) Yesterday I installed openSuse 13.3 (Gnome 3), and I couldn't find a similar setting.


Untar Without Top-Level Directory

I have a tar (websites.tgz) that contain a bunch of Drupal websites that are tarred up starting with 'htdocs' I need to untar them into               /local/htdocs/web1     /local/htdocs/web2      and so on. But I cannot place the websites.tgz file in /local and extract downward due to permissions. It is currently in my home directory. How can I untar the contents under /local/htdocs, without including the top-level htdocs directory? I am trying to avoid having:               /local/htdocs/htdocs/web1     /local/htdocs/htdocs/web2.      Thanks for any help.


FC16: can't log in via LightDM or GDM (but 'startx' works fine)

I'm running Fedora Core 16 (with all patches applied as of 11 Feb 2013, AFAICT) on a dual-monitor Lenovo workstation, and can't seem to access my desktop via a graphical login manager. My system boots normally, I get the GDM greeter screen, I select my username and enter my password, and log in. I then get a black screen like Xorg is trying to switch modes before being sent back to the GDM login screen. The same problem happens when I removed GDM and attempted to use LightDM instead. However, if I boot into runlevel 3, log in via the console, and run 'startx', my GNOME desktop appears normally. Running `tail /var/log/Xorg.0.old` tells me that my previous Xorg session (the one launched from GDM) terminated normally:               [  1125.791] (II) NVIDIA(GPU-0): --- End of ModePool for Lenovo Group Limited LEN LT2452pwC (DFP-1): ---     [  1125.791] (II) NVIDIA(GPU-0):     [  1175.892] (II) evdev: Dell Dell USB Keyboard: Close     [  1175.892] (II) UnloadModule: "evdev"     [  1175.892] (II) Unloading evdev     [  1175.892] (II) evdev: Microsoft Microsoft 3-Button Mouse with IntelliEye(TM): Close     [  1175.892] (II) UnloadModule: "evdev"     [  1175.892] (II) Unloading evdev     [  1175.892] (II) evdev: Power Button: Close     [  1175.892] (II) UnloadModule: "evdev"     [  1175.892] (II) Unloading evdev     [  1175.892] (II) evdev: Power Button: Close     [  1175.892] (II) UnloadModule: "evdev"     [  1175.892] (II) Unloading evdev     [  1175.921] Server terminated successfully (0). Closing log file.      What's going on? What logs can I examine for more information?


snmp issue:Two similar sever returning different output

I am having issue with SNMP OID's . I have two similar servers (hardware and software ) Which is DEll server with RHEL 5.3 X86_64.Issue is when I run the `SNMPWALK` for one server it shows proper data while the other server returns > No Such Instance currently exists at this OID Both have net-snmp version as: 5.3.2.2 OID seems to be custom and only for DELL machines "`1.3.6.1.4.1.674`" (`SNMPv2-SMI::enterprises.674`) but both machines are dell based and follows same architecture and components. Can someone trace on cause of this issue ?


Can I trigger an alternate keyboard layout based on switching windows?

I'd like to use different keyboard layouts (that I set with setxkbmap) depending on the application window that has focus. So for example, I'd like to switch when I change the window from terminal emulator to web browser. I'm currently working in GNOME 3. If this is only possible in another window manager, than I'm open for suggestions, but a GNOME 3 solution is preferred.


Consequences of setting up POSIX locales

Small background of the situation: We are using several UBUNTU servers having English as working language; however having en_US locale set in machines we encounter problems with apt-cacher-ng downloading translation files. One solution is to change locale to POSIX. Considering all options we want to change locale in all the systems. My question then is: What are the consequences for the system of changing locales from en_US value to POSIX? Are there any implications on LC_* apart from change of the value?


How to run two virtual X11 screens on a single monitor?

I would like to be able to emulate a dual monitor set up using a single physical display. Ideally, X11 would be able to treat each left/right half of the monitor as a separate display. Is this possible with X11? _EDIT:_ I've cobbled together some crude images to attempt to better clarify what my intent is. Imagine the following dual monitor set up: ![enter image description here](http://i.stack.imgur.com/JyPhH.jpg) Since I only have a single, large, widescreen monitor, I would like X11 to believe that the single physical display is actually two displays; each taking up a horizontal half of the physical display space, as follows: ![enter image description here](http://i.stack.imgur.com/wQeZq.jpg)


UUID Of A drive that won't show up in /dev/disk/by-uuid or blkid

I have a USB drive that is not receiving a UUID. When I look at the contents of the /dev/disk/by-uuid it doesn't exist there. The dev point that the partition lives in is on /dev/sdb. I am able to see sdb under /dev/disk/by- path. Also, when using blkid, I get zero output. [I'm assuming that I got an error code that returned back. Is there a way to get a UUID for this partition? Result of `fdisk -l /dev/sdb:`               Disk /dev/sdb: 320.1 GB, 320072932352 bytes     255 heads, 63 sectors/track, 38913 cylinders, total 625142446 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x00082145             Device Boot      Start         End      Blocks   Id  System     /dev/sdb1            2048   625141759   312569856   83  Linux      The partition table and partition was created with gparted, so it was partitioned and ran the command mkfs.ext3. Output of fsck -n /dev/sdb1               fsck from util-linux 2.20.1     e2fsck 1.42 (29-Nov-2011)     fsck.ext2: Superblock invalid, trying backup blocks...     zwei was not cleanly unmounted, check forced.     Pass 1: Checking inodes, blocks, and sizes     Pass 2: Checking directory structure     Pass 3: Checking directory connectivity     Pass 4: Checking reference counts     Pass 5: Checking group summary information     zwei: 11/19537920 files (0.0% non-contiguous), 1275097/78142464 blocks      It was formated as an ext3 drive. Why is that showing up as ext2?


Create symbolic links to files using wildcards

I want to create symlinks to multiple files:               ln -s dev-*.php 's/dev-(.*\.php)/$1/'          Results hoped for:           site.php links to dev-site.php           file.php links to dev-file.php      What's the most concise way to achieve this?


How is the content of configuration files parsed on different Linux distributions?

Different Linux distributions store the same configuration parameters in different files. For example IPv4 address in _Debian Wheezy_ is stored in `/etc/network/interfaces` file while in _Fedora 20_ it is stored in `/etc/sysconfig/network-scripts/ifcfg-eth0` file. In addition, syntax of those configuration files is different. How do distributions parse those files? In addition, is the content of configuration files parsed in a way that userspace utilities like `ip` and `ifconfig` are called or are there some lower-level system calls which actually configure the kernel?


Would this LUKS LVM rsync restore method work?

I have an Ubuntu installation using LVM and LUKS encryption. LVM and encryption were chosen during the install process). While logged into it, I backup the full live system using rsync to another drive. If I ever have to restore the full system to a new hard drive, I would boot with the Ubuntu live CD and reverse the rsync command to restore everything to the new drive, and I'll fix grub and fstab. My newly restored system will work, however, this will not restore LVM or LUKS so the restored system is without these. I was thinking, in order to keep LUKS and LVM, can I first install a fresh install of Ubuntu onto the new drive with LUKS and LVM during it's setup process, and then restore using rsync over the fresh install after mounting it in the live CD environment?


Altermime and SELINUX

I've setup an application called altermime (http://www.pldaniels.com/altermime/) for postfix (SMTP server) which alters emails midstream. I'm injecting a "X-ListUnsubscribe" header into every email message sent from our server for spam reasons. Altermime needs to be able to write to /var/spool/filter (normally I think postfix writes to /var/spool/postfix). Anyway this all works fine with SELinux disabled but with it enabled it breaks. As tempting as it might be to simply turn off SELinux and be done with it, I'd rather not compromise the security of my box in that manner. So I'm trying to modify SELinux to so that writing to /var/spool/filter is allowed. I've tried:                cat /var/log/audit/audit.log | audit2why       Which shows me the exceptions (I'll include them below). And I've done this multiple times:                audit2allow -M altermime < /var/log/audit/audit.log      semodule -i altermime.pp      However that doesn't seem to work. I'm assuming it may be because the audit2allow is naming individual files (/var/spool/filter/xxxx) being blocked vs the entire directory (/var/spool/filter/*). I can't figure out how to create a policy or change SELinux to allow access. Can some SELinux Guru help me? :) Here is an excerpt of my audit2why:               type=AVC msg=audit(1409231063.712:263024): avc:  denied  { add_name } for  pid=21280 comm="disclaimer" name="in.21279" scontext=unconfined_u:system_r:postfix_pipe_t:s0 tcontext=unconfined_u:object_r:var_spool_t:s0 tclass=dir         Was caused by:                 Missing type enforcement (TE) allow rule.                 You can use audit2allow to generate a loadable module to allow this access.          type=AVC msg=audit(1409231065.905:263025): avc:  denied  { add_name } for  pid=21285 comm="disclaimer" name="in.21284" scontext=unconfined_u:system_r:postfix_pipe_t:s0 tcontext=unconfined_u:object_r:var_spool_t:s0 tclass=dir         Was caused by:                 Missing type enforcement (TE) allow rule.                 You can use audit2allow to generate a loadable module to allow this access.          type=AVC msg=audit(1409231067.380:263026): avc:  denied  { add_name } for  pid=21289 comm="disclaimer" name="in.21288" scontext=unconfined_u:system_r:postfix_pipe_t:s0 tcontext=unconfined_u:object_r:var_spool_t:s0 tclass=dir         Was caused by:                 Missing type enforcement (TE) allow rule.                 You can use audit2allow to generate a loadable module to allow this access.


Directory shortcuts in emacs buffer

So I asked this question about directory shortcuts in a shell. The idea is I'd like to be able to open a file in `/home/Documents/foo`, say, by typing `C-x` `C-f` `~foo/file`. So, is there a way to emulate zsh's "named directories" in the emacs buffer? Incidentally, the shortcut definitions I want to use are already in my .zshrc, if there's a solution that reads them directly, that gets bonus points.


What does bash -l do and why can't it find ssh?

I have GitBash installed in a windows 7 box and I'm trying to figure out why running:               bash -l ssh      results in               Welcome to Git (version 1.9.0-preview20140217)          Run 'git help git' to display the help index.     Run 'git help <command>' to display help for specific commands.     bash: /bin/ssh: No such file or directory**      If I do `bash -l` and after login ssh, it all works fine, so what does `bash -l` does exactly? PS: I'm asking this here because I want to know what `bash - l` does and I do not figure why I can't get it to work on GitBash.


Replacement for standard KDE monitor manager?

My Linux experience is roughly a 4/10. I'm running the latest Debian-Wheezy install, and I've been having some trouble with the stock KDE display/monitor manager (to clarify as these terms seem to converge - referring to the utility that manages the monitors, resolution, etc.; not KDE itself). From googling the issue, I'm not alone in having problems docking the laptop, trying to run on two external monitors, etc., and the display manager freezing up. I've found a workaround for the application locking up, but it's kind of annoying, and I'd like to see if there's another display manager out there I can use. I've never replaced a core function in a Linux distro before, so A) I'm looking for some feedback on the best alternative(s) out there to the stock display manager, and B) Need some help in removing the current utility from the environment. Any help is greatly appreciated.


How to move process from one namespace to other?

This question is similar to my question about how to list namespaces. So in addtition, I'd like to know some information about moving processes from one namespace to other? E.g. I have processes of current session in one namespace and some other processes of `lxc` container in different namespace, so I want to run (e.g. `links`) in cgroup of that container (it's easily do with `cgexec`) and then move it to container's namespace , because I have to run this process in container without executing it exact in it. Can it be done or it's impossible in Linux??


Install Debian in internal flash of IGEPv2

Does anyone know how to install Debian on the internal flash in a IGEP v2? This module has 512 MB of internal flash.


ERROR: unable to download video

I have been using `youtube-dl` to download videos from YouTube, but suddenly it stopped working:               youtube-dl "http://www.youtube.com/watch?v=wglrcytdE9Y&feature=related"          [youtube] Setting language     [youtube] wglrcytdE9Y: Downloading video webpage     [youtube] wglrcytdE9Y: Downloading video info webpage     [youtube] wglrcytdE9Y: Extracting video information          ERROR: unable to download video          youtube-dl --version     2012.02.27


Returning only the portion of a line after a matching pattern

I have a file (`file_name`) which contains exactly one occurance of the string `Result:`, at the start of a line. I want to print all the characters after the string `Result:` in that line until I encounter a space. Which shell command should I use?               grep "Result: " file_name | tail -c +9       is not working.


For a same unix or linux user, different sets of environment variables

I'm using `tcsh`, and for a specific project every member of my team connects to a server with the same user. (This is something we cannot change). The situation arises because I want to have some custom environment variables and aliases, and to do so I have my own .tcshrc file (namely `.tcshrc_cust`) which I load as the first action when connecting to that machine:               source .tcshrc_cust      and even though this works pretty well, I'm experiencing a problem when using `vim`: if I get to the shell from inside vim (with `:sh`) I fall into a normal shell, without my custom env. vars. and aliases. Is there a solution for this, besides using a different user in that machine? * * * **SOLUTION (given by @Shawn):** I prefixed my key into `.ssh/authorized_keys` with:               command="setenv subuser noz; tcsh"      and wrote at the end of `.tcshrc` file these lines:               if ($?subuser) then         source .tcshrc_$subuser;     endif      And everything works fine now.


case-insensitive search of duplicate file-names

I there a way to find all files in a directory with duplicate filenames, regardless of the casing (upper-case and/or lower-case)?


mpd/xine like daemon for displaying pictures?

I am looking for a daemon that allows me to programmatically display pictures under X and that listens to commands on a socket or network port. Basically think `mpd` or `xine`, just not for audio or video but for pictures. A nice-to-have feature would be blending one picture into another, if requested via a command. Any pointers? Ok, why do I need that?   I need to script displaying pictures on the display based on various inputs, calling `feh` and friends (and killing them once the next picture is to be displayed) yields a not-so-nice black screen in between the pictures, there is no "crossfading" or any other effects in between the pictures. Thanks!