title: Weird mouse behaviour. Mouse too fast

text: When I move my mouse slowly over the desktop the pointer jumps often a few pixels (one or two) in the opposite direction of which I move my mouse. Horribly when trying to set the cursor around some semicolons in eclipse. I guess this is the result of a wrong set resolution. I suppose this is because the mouse was set initially really fast and even if I do `xset m 1/2 3`, the mouse is just to fast and unprecise for me. It aready tried to configure the xorg.conf like this:               Section "InputDevice"         Identifier  "Configured Mouse"         Driver      "mouse"         Option      "Device"    "/dev/mouse"         Option      "Protocol"  "Auto"         Option      "Name" "Logitech G3"         Option      "Resolution" "2000"     EndSection      But with no effect. **EDIT** But one new thing I recognized is that, in the mouse settings, I can slide the slider to max or to min. Mouse behaviour (sensitivity) does not change. I found somthing curoious too in /var/log/Xorg.0.log:               [   257.409] (II) config/udev: Adding input device Logitech USB Gaming Mouse (/dev/input/event1)     [   257.409] (**) Logitech USB Gaming Mouse: Applying InputClass "evdev pointer catchall"     [   257.409] (II) Using input driver 'evdev' for 'Logitech USB Gaming Mouse'     [   257.409] (**) Logitech USB Gaming Mouse: always reports core events     [   257.409] (**) evdev: Logitech USB Gaming Mouse: Device: "/dev/input/event1"     [   257.409] (--) evdev: Logitech USB Gaming Mouse: Vendor 0x46d Product 0xc042     [   257.409] (--) evdev: Logitech USB Gaming Mouse: Found 20 mouse buttons     [   257.409] (--) evdev: Logitech USB Gaming Mouse: Found scroll wheel(s)     [   257.409] (--) evdev: Logitech USB Gaming Mouse: Found relative axes     [   257.409] (--) evdev: Logitech USB Gaming Mouse: Found x and y relative axes     [   257.409] (II) evdev: Logitech USB Gaming Mouse: Configuring as mouse     [   257.409] (II) evdev: Logitech USB Gaming Mouse: Adding scrollwheel support     [   257.409] (**) evdev: Logitech USB Gaming Mouse: YAxisMapping: buttons 4 and 5     [   257.409] (**) evdev: Logitech USB Gaming Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200     [   257.409] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.1/usb3/3-1/3-1:1.0/input/input1/event1"     [   257.409] (II) XINPUT: Adding extended input device "Logitech USB Gaming Mouse" (type: MOUSE, id 8)     [   257.409] (II) evdev: Logitech USB Gaming Mouse: initialized for relative axes.     [   257.409] (**) Logitech USB Gaming Mouse: (accel) keeping acceleration scheme 1     [   257.409] (**) Logitech USB Gaming Mouse: (accel) acceleration profile 0     [   257.409] (**) Logitech USB Gaming Mouse: (accel) acceleration factor: 2.000     [   257.409] (**) Logitech USB Gaming Mouse: (accel) acceleration threshold: 4     [   257.409] (II) config/udev: Adding input device Logitech USB Gaming Mouse (/dev/input/mouse0)     [   257.409] (II) No input driver specified, ignoring this device.     [   257.409] (II) This device may have been added with another device file.      Still my question is: **How do I setup my mouse correctly in Debian wheezy?**


title: Port 110 visible to the outside world - necessary or a bad idea?

text: I just did [a test][1] that told me my gateway's (debian squeeze) port 110 is visible from outside. It's a box with two network cards, eth0 is for my internal network (192.168.1.0/24) and eth1 goes to "the internet" (as ppp0). Is an open port 110 on the outside connection a necessity when I run postfix, use the box to collect mail using fetchmail, and have the mail collected by internal boxes using pop3 (popa3d)? Is everything o.k. as long as my postfix has a main.cf with lines like these?               mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/24     inet_interfaces = 192.168.1.1, 127.0.0.1      where 192.168.1.0/24 is my home network and 192.168.1.1 is eth0? Or was I stupid and opened a port I should rather have closed or invisible to the outside network?


title: How to tell if a SCSI device is removable?

text: In DMESG I see: `[sdb] Attached SCSI removable disk`   1. How does Linux decide what is removable and not removable?   2. Is there a way I can look up if a device is "removable" or not other than the log, for example somehwere in /sys or /proc?


title: Keyboard shortcut to launch Nemo

text: In Windows you can type `Super`+`e` to launch the file explorer. I find this really useful, particularly because almost every action I take starts with search for a file or folder. Is there an equivalent keyboard shortcut to launch Nemo in Linux Mint? (In an ideal world, there'd also be a way to run a file/folder search from the keyboard)


title: Why are my drives referred to as '(hda0,msdos5)' etc in grub instead of (hda0,5), (hda0,sda5) etc that you usually see?

text: I'm fiddling about trying to get a multiboot system (win7, ubuntu, lion) on one drive working with grub 2, but was wondering what the msdos part meant on my system. I don't see it like that on any of the examples online.


title: Install key 3G Huawei E1752 in Debian

text: I have a PC without a CD ROM drive. I have a connection with Orange 3G, using a Huawei E1752 device. I want to install Debian on my hard drive from a 15BG USB Disk. I tried with Debian Live but that does not give you an option to install Debian on your hard disk. So is it possible to install Debian with a desktop environment (GNOME or KDE) on my drive that would work like this?   * create a bootalbe USB containing Debian NetInstall   * start this USB Debian NetInstall   * install the 3G Huawei E1752 Orange with the command line   * connect to the Internet   * install and update GNOME or KDE from the Internet.


title: HDCP Software Implementation

text: How to do software implementation of HDCP for Linux ?


title: huge .sujournal file on FreeBSD

text: I am running out of space and when I checked, I found that I have               # pwd     /usr     # ls -l .sujournal     -r--------  1 root  wheel  33554432 Dec 31  1969 .sujournal      I wanted to ask should/can I remove it? Any implications of that?


title: How to get gnome-music playing music

text: I've updated my Suse system to the latest version of gnome -3.12 and the latest version of Suse 13.1. I've installed the new gnome music application, but whenever I've tried to get a song to play, I'm greeted with this weird red x balloon error: ![Red X Balloon Error](http://i.stack.imgur.com/BCSLT.png) Music works fine in `banshee` and when I run as root in terminal, I get this message:                    gnome-music     Traceback (most recent call last):       File "/usr/bin/gnome-music", line 38, in <module>         from gnomemusic.application import Application       File "/usr/lib/python3.3/site-packages/gnomemusic/application.py", line 36, in <module>         from gnomemusic.window import Window       File "/usr/lib/python3.3/site-packages/gnomemusic/window.py", line 38, in <module>         from gnomemusic.query import Query       File "/usr/lib/python3.3/site-packages/gnomemusic/query.py", line 32, in <module>         class Query():       File "/usr/lib/python3.3/site-packages/gnomemusic/query.py", line 35, in Query         GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_MUSIC)     TypeError: Argument 0 does not allow None as a value      Why do the above errors appear?


title: Fail to start graphic interface

text: I'm using Linux Mint 14 and have faced the following problem recently: after removing and installing some of the software (torchat and LibreOffice to be exact) and rebooting I found myself not being able to log into my system. first thing I noticed was simply a console line offering to enter my login and password, after that it greeted me with               bash: /usr/lib/git-core/git-sh-prompt: No such file or directory      all my attempts to run **startx** resulted in nothing but a black screen with an active mouse arrow briefly serfing the net I've found that installing mdm could be a possible solution, however, after I did that, I've started logging into this very black screen immediately, skipping any time in console, so had to remove it. None of any other methods found on the internet seem to work. here's the log file for startx: _first lots of built-in extensions are being initialized_               loading extension GLX     The XKEYBOARD keymap compiler (xkbcomp) reports:     Warning: Compat map for group 2 redefined     Using new definition     Warning: Compat map for group 3 redefined     Using new definition     Warning: Compat map for group 4 redefined     Using new definition     Errors from xkbcomp are not fatal to the X server      this report repeats 3 times and in the end I get:               xinit: connection to X server lost     waiting for X server to shut down Server terminated successfully (0). Closing log file.     xinit: unexpected signal 1      I'd appreciate any suggestions about working this mess out. Thanks in advance **update** _output for ~/.xsession-errors_               Xsession: X session started for root at Wed May 7 17:35:27 MSK 2014     localuser: root being added to access control list     Setting IM through im-switch for locale=all_ALL     Start IM through /etc/X11/xinit/xinput.d/all_ALL linked to /etc/X11/xinit/xinput.d/default     Failed to connect to the VirtualBox kernel service     Failed to connect to the VirtualBox kernel service     Failed to connect to the VirtualBox kernel service     Failed to connect to the VirtualBox kernel service


title: Play sound when suspending and resuming

text: I'm trying to get my sound theme all working how I want it. Reading the sound naming spec by freedesktop, it has an entry "suspend-start" and "suspend-end", which is supposed to fire when the machine is "about to suspend", and then when "the machine has returned from a suspended state" as well as the "system-ready" and "system-shutdown" entries. I've got most of the sounds working in the theme, except for these. I am running arch Linux with `systemd` controlling my power stuff. I'm also running gnome3. I have another script at `/usr/lib/systemd/system-sleep/`, which turns off and on my USB ports, when the system goes into suspend and hibernate mode and back on when the system thaws or resumes. So I figured that I could just call `canberra` in a similar fashion. I created another script just like the one for my USB for the sounds:               #!/bin/sh     # File: /usr/lib/systemd/system-sleep/sound.sleep          case $1/$2 in             pre/*)                     # Play suspend-start                     exec canberra-gtk-play -i "suspend-start"             ;;             post/*)                     # Play suspend-resume                     exec canberra-gtk-play -i "suspend-resume"             ;;     esac      While I can see in the journal that it is run, it doesn't put out any sound. I'm not sure about why, but I have a feeling that the audio system has already gone down by the time this is called. (Don't quote me on that, I have nothing more than, "it doesn't work, but it should" to base it on.) This isn't super important, but just something I would kind of like to figure out more for fun. If anyone has any suggestions or ways to actually get it working, that would be fantastic. If you need anything more, just comment. Extra System information:   * Arch linux   * 3.15.3-1-ARCH   * GNOME Shell 3.12.2   * pulseaudio 5.0   * alsactl 1.0.28 (Basically, I also have alsa sound)


title: share host folder with Vritual machine guest problem (centos 6.5)

text: I have centos 6.5 installed kvm. Then I created a virtual machine and tried to share the host folder (e.g. /mnt) with virtual machine using 9p_virtio. (follow this guide: http://www.linux-kvm.org/page/9p_virtio) However, in virt-manager. It shows the "Filesystem" menu is gray with this error "not supported for this hypervisor/libvirt combination". I did some search online and some people said "the "Filesystem Passthrough" feature is still so new that it is not yet available for CentOS-6." I am wondering if this is still a bug for centos 6.5 and if there is a way to alternatively solve this problem. ![enter image description here](http://i.stack.imgur.com/LJnx1.png)


title: Git / Jenkins permission problem

text: OS: Ubuntu server 10.04 LTS I have a strange issue going on with permissions and can't seem to track down what is causing it. The setup is as follows: Git Repository folders (and files in them) are owned by root, and the group we use for the projects has rws rights, for example:                  ll /path/to/project        drwxrwsr-x 7 root project                4096 2013-03-14 19:19 project      Our jenkins user is member of the all the groups we create for the projects, including the one in the example. The jenkins application is started by the jenkins user to make sure it has full access to the project folders. If i remove the read and execute rights for "others" on these git folders our builds fail, stating:                fatal: '/path/to/project' does not appear to be a git repository      ps: no SELinux in play


title: apache mod_security and performance

text: I have a list of bots to block, so I was thinking that fail2ban could be a solution until I realized that mod_security would be more efficient in this kind of tasks. The number of bots is huge, so the file of configuration will contain a long list. My question is about performance (memory, processor, disk ..etc): Is having a huge list of bots to block will affect the performance of apache in a site with huge traffic ?


title: USB-HDD connected to router "disconnects" automatically

text: I have a USB-HDD, formatted as ext3 connected to my router, so I can use it as a home-network storage. It works quite well, however, when sending a lot of files to the harddrive (I tried to do a backup/syncing of my complete home- folder with unison), it silently cannot be accessed at some random time. That means - I can neither read nor write to the drive, restarting the router is the only thing that works. By restarting I mean to unplug the eletricity- cable. When I reset the router with the reset-function, it won't connect to the internet again. When I restart the HDD (it has a power switch), it is still not accessible. The drive stops working also when I copy a lot of files with nautilus. It works fine if I only copy some files. I've mounted it as an Samba device, as this is was my router is a capable of. I also tried an FTP-drive, but the same thing occurs. Is this an router security issue (a lot of files at the same time--I'll block that device!)? Or an GNOME/gvfs/nautilus issue (I access the drive via /run/user/1000/gvfs/smb-share....)? Or something else I didn't think about?


title: HDD unique identifier

text: I would like to automount some hdd on logon, how can I check if connected HDD (via USB) is exactly that HDD which I am thinking of, and that there were no partition changes on it. Above information I would use to identify my encrypted HDD, or maybe some other values I should use... ?


title: Washed out colours with screencast software but not screenshot on Ubuntu (all versions)

text: I have experimented with screencast software on Ubuntu over a number of LTS versions and using pretty much every software I can get my hands on. I have used VLC, RecordMyDesktop and some others the names of which escape me. I tried this when Ubuntu shipped with GNome and now with Unity as well. The problem is the same. The colours are always washed out regardless of the software I use or the version of Ubuntu I am running. The answer seems to be to open a video editor and mess about with contrast, saturation and brightness to get something a bit more acceptable. The capture is generally rendered after capture as an OGG file and the image is all there just hidden under messed up settings. I am yet to get my video to look the same as my screen shots even though when I take a static screen shot the colours and contrast and brightness are all exactly right (ie the same as what I see on the screen). So what I need to know is what I need to change to get the contrast and brightness settings back under control so they are right to start with. I have Googled the living daylights out of this problem but have yet to find much help beyond the fact that the contrast and brightness are wrong by default. I just want to record a screencast and then watch it in VLC or whatever and see what I saw when I made the cast. There is probably a lot I do not know about Ubuntu/Linux even though I have been using it for years now so I am happy to be educated. That said I would appreciate being told if and how any backups should be made before trying something in case it does not work happily (not to mention how to recover from said fails). If there is no known answer on the subject of why the contrast and brightness are wrong and how to fix it then at least something I put into practice to get close to screen colour as possible in the screencast.


title: Calendar.vim E492: Not an editor command: Calendar

text: I am trying to install the calendar.vim plugin on mac osx snow leopard running gvim. I have pathogen.vim installed, so I followed the instructions on github to install calendar.vim from the terminal:               cd ~/.vim/bundle     git clone git://github.com/mattn/calendar-vim      I've got it, and everything appears to be where it is supposed to be, as far as I can tell, but it isn't working. I type `:Calendar` a get the error:               E492: Not an editor command: Calendar      I've tried `:calendar` also, I have restarted vim and no luck. What am I missing?


title: Locating the /dev entry to make partitions on an SD card

text: I am trying to create partition of SD card, for this I am following this tutorial. When I type the command               ll /dev/mmcblk*      I got this               ls: cannot access /dev/mmcblk*: No such file or directory      So, I check the list of items in /dev by typing this command               ls /dev/      I got a big list of items but there is nothing like `mmcblk0` or `mmcblk1`. The list I am getting is this               autofs           dvdrw     loop4               psaux  ram6    sdb       tty10  tty24  tty38  tty51  tty8       ttyS2   ttyS5    vcs6     block            ecryptfs  loop5               ptmx   ram7    sdb1      tty11  tty25  tty39  tty52  tty9       ttyS20  ttyS6    vcs7     bsg              fb0       loop6               pts    ram8    sg0       tty12  tty26  tty4   tty53  ttyprintk  ttyS21  ttyS7    vcsa     btrfs-control    fd        loop7               ram0   ram9    sg1       tty13  tty27  tty40  tty54  ttyS0      ttyS22  ttyS8    vcsa1     bus              full      loop-control        ram1   random  sg2       tty14  tty28  tty41  tty55  ttyS1      ttyS23  ttyS9    vcsa2     cdrom            fuse      mapper              ram10  rfkill  shm       tty15  tty29  tty42  tty56  ttyS10     ttyS24  uhid     vcsa3     cdrw             hidraw0   mcelog              ram11  rtc     snapshot  tty16  tty3   tty43  tty57  ttyS11     ttyS25  uinput   vcsa4     char             hpet      mei                 ram12  rtc0    snd       tty17  tty30  tty44  tty58  ttyS12     ttyS26  urandom  vcsa5     console          input     mem                 ram13  sda     sr0       tty18  tty31  tty45  tty59  ttyS13     ttyS27  v4l      vcsa6     core             kmsg      net                 ram14  sda1    stderr    tty19  tty32  tty46  tty6   ttyS14     ttyS28  vcs      vcsa7     cpu              log       network_latency     ram15  sda2    stdin     tty2   tty33  tty47  tty60  ttyS15     ttyS29  vcs1     vga_arbiter     cpu_dma_latency  loop0     network_throughput  ram2   sda3    stdout    tty20  tty34  tty48  tty61  ttyS16     ttyS3   vcs2     vhost-net     disk             loop1     null                ram3   sda4    tty       tty21  tty35  tty49  tty62  ttyS17     ttyS30  vcs3     video0     dri              loop2     port                ram4   sda5    tty0      tty22  tty36  tty5   tty63  ttyS18     ttyS31  vcs4     zero     dvd              loop3     ppp                 ram5   sda6    tty1      tty23  tty37  tty50  tty7   ttyS19     ttyS4   vcs5      I have followed this tutorial before but I do not any idea what's wrong this time. So,please tell how to get mmcblk list.


title: Disable iptables service on CentOS

text: I don't want the service to start after reboot. my code does this:               service iptables stop     service iptables save     chkconfig --level 123456 iptables off     service iptables status     iptables: Firewall is not running.      but after reboot:               [root@cteraportal ~]# service iptables status     Table: filter     Chain INPUT (policy ACCEPT)     num  target     prot opt source               destination          Chain FORWARD (policy ACCEPT)     num  target     prot opt source               destination          Chain OUTPUT (policy ACCEPT)     num  target     prot opt source               destination      why is it starting at boot even after the chckonfig off?


title: Can I run a command after the user uses Ctrl-C to kill a command?

text: So at my position we use a shared set of aliases to do builds. Something like...               alias 'build'='cd $BUILD_ROOT; m; cp ...; cp...; deploy; deploy; deploy; cd -'      This is super irritating because the make command takes about 3 minutes and I usually realize I missed something, hit Ctrl-C, and then immediately run build again. This leaves me in a directory I don't care to be in, with a painful path to retype. What I'd really like is something like...               alias 'betterbuild'='pushd .; build; even-if-the-user-cancelled popd'      Is there a way to do this?


title: Temporarily change time

text: I need to test aspects of my software that only happen at certain times of the day. Rather than waiting whole days (and getting here at 2:00 AM), I'd like to change the time. But I'd rather not change it _permanently_. I know I can change the time using `date`, and then change it back again, but is there a better way? OS in question is RHEL6 running in a VM.


title: Ping from Outside: How do I make my system invisible?

text: I just did a test that told me my gateway (debian squeeze) responds when being pinged from outside. It's a box with two network cards, eth0 is for my internal network (192.168.1.0/24) and eth1 goes to "the internet" (as ppp0). Making the gateway invisible when being pinged randomally would increase the safety. What needs to be configured in order to make ppp0 (eth1) invisible, while eth0 still remains open?


title: How to get window id from xdotool Window Stack

text: I need id of window which is active or focused. I try to use `xdotool` command. There is command:               xdotool getactivewindow      the result is saved to window stack. I want to get widnow id from this window stack. Command               xdotool getactivewindow getwindowpid      does not satisfy me. I do not want to get window id by process id.


title: Does the sudo user need a home directory?

text: In my setup, my aim is to have   1. A standard user with minimal permissions to use on a daily basis   2. A superuser account, defined in `/etc/sudoers`.  Does this second user need a home directory? Both of these users will be created by a `tempsudo` account, which is created during the installation step. I'll delete this account once account #2 is created with this command:               sudo adduser --no-create-home permsudo      Will I run into problems in a graphical environment, e.g. with `gksudo`? I'm using Linux Mint Debian, so I will be running a desktop environment.


title: Checking if I can reach some ports from my computer

text: Is there a terminal command or something on OSX that I can use to test if I can reach some ports on a remote server? I know these ports are reachable on that server, because I can access them from another computer on another network but what I need is a way to test from another computer, if I can reach that ports, in this case 110 and 25 (POP and SMTP), from a specific computer and if possible a trace or something that can be done to see what is causing the blockage.


title: bash crashed with for loop

text: The question may be trivial but with this simple `for` loop               for i in {1..10000000}; do echo "$i" line >> file     done      my shell crashed after some elaboration time (the tab in the terminal emulator was automatically closed) and `file` was not created. It is `GNU bash, version 4.1.11(2)-release`. Is this due to a memory limit or what else? And if yes which should be this limit? With `{1..1000000}` it worked correctly.


title: How to fix the accents in xterm top bar?

text: I don't have any problem with accent (I'm French) inside xterm. However, like you can see on this screenshot, the top bar of xterm does have some accents issues: ![enter image description here](http://i.stack.imgur.com/f8vxy.png) However my Debian unstable system is in utf8 (so it should be good):               $ locale     LANG=fr_FR.utf8     LANGUAGE=     LC_CTYPE="fr_FR.utf8"     LC_NUMERIC="fr_FR.utf8"     LC_TIME="fr_FR.utf8"     LC_COLLATE="fr_FR.utf8"     LC_MONETARY="fr_FR.utf8"     LC_MESSAGES="fr_FR.utf8"     LC_PAPER="fr_FR.utf8"     LC_NAME="fr_FR.utf8"     LC_ADDRESS="fr_FR.utf8"     LC_TELEPHONE="fr_FR.utf8"     LC_MEASUREMENT="fr_FR.utf8"     LC_IDENTIFICATION="fr_FR.utf8"     LC_ALL=      How can I fix this little bug with xterm top bar?


title: fail2ban not working

text: I have several services running on my Ubuntu 12.04 server and set up fail2ban, but it doesn't block the attacking IPs. SSH is running on port 22. **jail.conf**               [DEFAULT]          bantime  = 600     maxretry = 3     banaction = iptables-multiport     action_ = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]     action_mw = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]                   %(mta)s-whois[name=%(__name__)s, dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]     action_mwl = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]                    %(mta)s-whois-lines[name=%(__name__)s, dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]     action = %(action_)s               [ssh]          enabled  = true     port     = ssh     filter   = sshd     logpath  = /var/log/auth.log     maxretry = 6      **regex check**               fail2ban-regex /var/log/auth.log.1 /etc/fail2ban/filter.d/sshd.conf          Failregex     |- Regular expressions:     |  [1] ^\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*(?:error: PAM: )?Authentication failure for      .* from <HOST>\s*$     |  [2] ^\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*(?:error: PAM: )?User not known to the unde     rlying authentication module for .* from <HOST>\s*$     |  [3] ^\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*Failed (?:password|publickey) for .* from <     HOST>(?: port \d*)?(?: ssh\d*)?$     |  [4] ^\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*ROOT LOGIN REFUSED.* FROM <HOST>\s*$     |  [5] ^\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*[iI](?:llegal|nvalid) user .* from <HOST>\s     *$     |  [6] ^\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*User .+ from <HOST> not allowed because not      listed in AllowUsers$     |  [7] ^\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*authentication failure; logname=\S* uid=\S*      euid=\S* tty=\S* ruser=\S* rhost=<HOST>(?:\s+user=.*)?\s*$     |  [8] ^\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*refused connect from \S+ \(<HOST>\)\s*$     |  [9] ^\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*Address <HOST> .* POSSIBLE BREAK-IN ATTEMPT     !*\s*$     |  [10] ^\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?|[\[\(]?sshd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:)?\s*User .+ from <HOST> not allowed because no     ne of user's groups are listed in AllowGroups\s*$     |     `- Number of matches:        [1] 0 match(es)        [2] 0 match(es)        [3] 2810 match(es)        [4] 0 match(es)        [5] 2378 match(es)        [6] 0 match(es)        [7] 0 match(es)        [8] 0 match(es)        [9] 0 match(es)        [10] 0 match(es)      [...]               Date template hits:     380718 hit(s): MONTH Day Hour:Minute:Second     0 hit(s): WEEKDAY MONTH Day Hour:Minute:Second Year     0 hit(s): WEEKDAY MONTH Day Hour:Minute:Second     0 hit(s): Year/Month/Day Hour:Minute:Second     0 hit(s): Day/Month/Year Hour:Minute:Second     0 hit(s): Day/Month/Year Hour:Minute:Second     0 hit(s): Day/MONTH/Year:Hour:Minute:Second     0 hit(s): Month/Day/Year:Hour:Minute:Second     0 hit(s): Year-Month-Day Hour:Minute:Second     0 hit(s): Year.Month.Day Hour:Minute:Second     0 hit(s): Day-MONTH-Year Hour:Minute:Second[.Millisecond]     0 hit(s): Day-Month-Year Hour:Minute:Second     0 hit(s): TAI64N     0 hit(s): Epoch     0 hit(s): ISO 8601     0 hit(s): Hour:Minute:Second     0 hit(s): <Month/Day/Year@Hour:Minute:Second>          Success, the total number of match is 5188      **auth.log**               Jul 26 14:17:49 servername sshd[12930]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=91.117.124.14  user=root     Jul 26 14:17:51 servername sshd[12930]: Failed password for root from 91.117.124.14 port 37340 ssh2     Jul 26 14:17:51 servername sshd[12930]: Received disconnect from 91.117.124.14: 11: Normal Shutdown, Thank you for playing [preauth]     Jul 26 14:17:51 servername sshd[12932]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=91.117.124.14  user=root     Jul 26 14:17:53 servername sshd[12932]: Failed password for root from 91.117.124.14 port 38980 ssh2     Jul 26 14:17:54 servername sshd[12932]: Received disconnect from 91.117.124.14: 11: Normal Shutdown, Thank you for playing [preauth]     Jul 26 14:17:54 servername sshd[12934]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=91.117.124.14  user=root     Jul 26 14:17:56 servername sshd[12934]: Failed password for root from 91.117.124.14 port 40576 ssh2     Jul 26 14:17:56 servername sshd[12934]: Received disconnect from 91.117.124.14: 11: Normal Shutdown, Thank you for playing [preauth]     Jul 26 14:17:57 servername sshd[12936]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=91.117.124.14  user=root     Jul 26 14:17:58 servername sshd[12936]: Failed password for root from 91.117.124.14 port 42148 ssh2     Jul 26 14:17:58 servername sshd[12936]: Received disconnect from 91.117.124.14: 11: Normal Shutdown, Thank you for playing [preauth]     Jul 26 14:17:59 servername sshd[12938]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=91.117.124.14  user=root     Jul 26 14:18:01 servername CRON[12940]: pam_unix(cron:session): session opened for user root by (uid=0)     Jul 26 14:18:01 servername sshd[12938]: Failed password for root from 91.117.124.14 port 43589 ssh2     Jul 26 14:18:01 servername sshd[12938]: Received disconnect from 91.117.124.14: 11: Normal Shutdown, Thank you for playing [preauth]     Jul 26 14:18:01 servername CRON[12940]: pam_unix(cron:session): session closed for user root     Jul 26 14:18:01 servername sshd[12982]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=91.117.124.14  user=root     Jul 26 14:18:03 servername sshd[12982]: Failed password for root from 91.117.124.14 port 44989 ssh2     Jul 26 14:18:03 servername sshd[12982]: Received disconnect from 91.117.124.14: 11: Normal Shutdown, Thank you for playing [preauth]     Jul 26 14:18:04 servername sshd[12985]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=91.117.124.14  user=root     Jul 26 14:18:06 servername sshd[12985]: Failed password for root from 91.117.124.14 port 46546 ssh2     Jul 26 14:18:06 servername sshd[12985]: Received disconnect from 91.117.124.14: 11: Normal Shutdown, Thank you for playing [preauth]     Jul 26 14:18:06 servername sshd[12987]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=91.117.124.14  user=root     Jul 26 14:18:09 servername sshd[12987]: Failed password for root from 91.117.124.14 port 48192 ssh2     Jul 26 14:18:09 servername sshd[12987]: Received disconnect from 91.117.124.14: 11: Normal Shutdown, Thank you for playing [preauth]     Jul 26 14:18:09 servername sshd[12989]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=91.117.124.14  user=root     Jul 26 14:18:11 servername sshd[12989]: Failed password for root from 91.117.124.14 port 49739 ssh2     Jul 26 14:18:11 servername sshd[12989]: Received disconnect from 91.117.124.14: 11: Normal Shutdown, Thank you for playing [preauth]     Jul 26 14:18:11 servername sshd[12991]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=91.117.124.14  user=root     Jul 26 14:18:13 servername sshd[12991]: Failed password for root from 91.117.124.14 port 51193 ssh2      The login attempts go on for 20 minutes and more and fail2ban doesn't do a thing.


title: How to print a string at the end of line using awk?

text: I am very new to awk. I am trying to add a new calculated column. But awk insert the column to the next line rather to the end of the current line. Here is an example of my data:               ,2013-11-22,12.9,26.0,26.6,,,NW      What I am trying to do is to add a column at the end containing YES, or NO based on the fifth column (if $5 > 0 YES else NO). Here is my awk command:               awk -F, '{         if($5 > 0) print $0, ",YES"; else print $0, ",NO"     }' data.csv      The result is something like this:               ,2013-11-22,12.9,26.0,26.6,,,NW     YES      How can I fix this?


title: How to draw a single pixel in a terminal?

text: Until now I used characters to draw images, shapes etc in a terminal. Is it possible to draw a single pixel? Let's say:               foo 1 1 red      This will draw a red pixel at the coordinate `(1, 1)`. Is there an existing application that will do this job? Currently running Ubuntu 14.04.


title: Is there an algorithm to decide if a symlink loops?

text: Unix systems usually just error out if they are confronted with a path that contains a symlink loop or just too many symlinks, because they have a limit to the number of symlinks they will traverse in one path lookup. But is there a way to actually decide if a given path resolves to something or contains a loop, even if it contains more links than a unix is willing to follow? Or is this a formally undecidable problem? And if it can be decided, can it be decided in a reasonable amount of time/memory (e.g. without having to visit all files on a filesystem)? Some examples:               a/b/c/d     where a/b is a symlink to ../e     and e is a symlink to f     and f is a symlink to a/b          a/b/c/d     where a/b/c is a symlink to ../c          a/b/c/d     where a/b/c is a symlink to ../c/d          a/b/c/d     where a/b/c is a symlink to /a/b/e     where a/b/e is a symlink to /a/b/f     where a/b/f is a symlink to /a/b/g      **Edit** : To clarify, I am not asking about finding loops in the file system, I am asking about a decision algorithm that decides of a given path whether it resolves to a definite file/directory or whether it does not resolve at all. For example in the following system, there is a loop, but the given path still resolves fine:               / -- a -- b     where b is a symlink to /a      This directory tree clearly has a cycle, but the path `a/b/b/b/b/b` still resolves fine to `/a`.


title: How to free space on a completely full volume?

text: I am using Linux. And within an uncontrolled event, my 4GB system disk is full. When I try to uninstall some program by `sudo apt-get purge program-name`, it gives me this error:               /usr/bin/mandb: can't write to /var/cache/man/25843: No space left on device      Is there any system file that can be deleted in this situation?


title: Can find work more efficiently to delete a large number of old files?

text: I want to delete old files in a directory that has a huge number of files in multiple subdirectories. I am trying to use the following - after some googling it seems to be the recommended and efficient way:               find . -mindepth 2 -mtime +5 -print -delete      My expectation is that, this should print a file that satisfies the conditions (modified more than 5 days ago and satisfies the mindepth condition) and then delete it, and then move on to the next file. However, as this command runs, I can see that the find's memory usage is increasing, but nothing has been printed (and therefore I think nothing has been deleted yet). This seems to imply that `find` is first collecting all files that satisfy the conditions and after traversing the whole filesystem tree, it will print and then delete the files. Is there a way to get it to delete it right away after running the tests on the file? This would help do the clean up incrementally - I can choose to kill the command and then rerun it later (which would effectively resume file deletion). This does not seem to happen currently because find has not begun deleting anything until its done traversing the gigantic filesystem tree. Is there any way around this? **EDIT - Including requested data about my use case:** The directories I have to clean up have a maximum depth of about 4; regular files are present only at the leaf of the filesystem. There are around about 600 million regular files, with the leaf directories containing at most 5 files. The directory fan-out at the lower levels is about 3. The fan-out is huge at the upper levels. Total space occupied is 6.5TB on a single 7.2TB LVM disk (with 4 physical ~2 TB HDDs)


title: postfix archive specific emails

text: I would like to know if its possible to archive specific emails based on the /Subject:/ for example if I receive an email with "Website Support" it will archive it in "Support".. is this possible?


title: Embedded device GadgetFS connects to Linux machine and receives one USB setup request more than with a windows machine connected

text: I am using this GadgetFS implementation http://www.linux-usb.org/gadget/usb.c to have my embedded device connect to a Host. What's weird is, when I connect it to a Windows machine everything works great. but when I connect it to a linux, this line makes the application stall:               if (tmp != 0 && index != strings.language)       goto stall;      It's inside the function for handling the setup requests coming from the host. A windows host sends 7 requests. 6 where `bRequest` is `GET_DESCRIPTOR` (0x06) and 1 with `bRequest = SET_CONFIGURATION` (0x09). A Linux host sends 7 `GET_DESCRIPTOR` setup requests and 1 `SET_CONFIGURATION` request and after that another request with `bRequest = GET_DESCRIPTOR` that makes it go to `stall`. This is the setup request:               80 06 EE 03 00 00 00 04          bRequestType = 0x80 (Direction: Incoming)     bRequest = 0x06 (GET_DESCRIPTOR)     wValueL (low byte) = 0xEE (DESCRIPTOR_INDEX) ???     wValueH (high byte) =  0x03 (DESCRIPTOR_TYPE: 0x03 = "String")     wIndex = 0x00 (Zero or Language ID)


title: Convert Month Number to Month Name

text: is there a way to convert month number to name? example: 2013-10-22 will become Oct 22 I don't have the GNU date and my OS is AIX.


title: Terminal: Use different command on previous file

text: I know that there is the `!!` command to reuse the previous command. How would one reuse the file or directory specified in the previous command but use a different command on it? Example: I want to see what is the content of a file, and if necessary delete it. Something like:               $ cat example.txt          "output indicates deletion"          $ rm !!


title: Reset partitions numbers

text: I just decided to delete my Windows partition and only use Linux. My old partition table was:   * sda1: W7 boot partition   * sda2: W7 partition   * sda3: Linux   * sda4: start of logic partitions   * sda5: swap. I deleted sda1 and sda2, and then expanded sda3. Now my partition table is:   * sda3: Linux   * sda4: start of logic partitions   * sda5: swap I would like to change the sda3 to sda1, how? Also my fstab keep showing me the old Windows partition:               # /etc/fstab: static file system information.     #     # <file system> <mount point>   <type>  <options>       <dump>  <pass>          proc    /proc   proc    defaults    0   0     #Entry for /dev/sda3 :     UUID=059c7142-b4d8-4ab0-8d0f-ee460fce905e   /   ext4    rw,errors=remount-ro    0   1     #Entry for /dev/sdb1 :     UUID=5632BCEF32BCD569   /media/Datos    ntfs-3g defaults,locale=en_US.UTF-8 0   0     #Entry for /dev/sda2 :     UUID=60D8A6E5D8A6B8A4   /media/Windows  ntfs-3g defaults,locale=en_US.UTF-8 0   0     #Entry for /dev/sda5 :     UUID=53cd360a-1321-497f-8c3a-ff3adf4cf82c   swap    swap    sw  0   0


title: Configuring Xorg lvl5 symbols

text: I configured Lvl3 via editing `/usr/share/X11/xkb/symbols/typo`. But I found no documentation, how configure lvl5. I tried to add 2 more entries in this file, like this                 key <AD05> { [NoSymbol, NoSymbol, trademark, registered, doubleacute] }; // "t"      But it seems to be error, as even lvl3 on this key ceased to work.


title: How to check input parameter for running shell script

text: I'm writing a shell script to be used for various purposes. Various operations depend on input parameters. How can I check which parameter has been passed to the shell script while it runs? Can someone please explain how this query will work? Say I've 1 shell script `abc.sh` which takes 1 input parameter and depending on its value the shell script should or should not do something. Say I've passed '1' as an input parameter and scheduled a run. While the shell script runs, how do I test the parameter's value?


title: How do I change the number of available workspaces in Cinnamon?

text: I am used to four workspaces in Gnome, but now that I have Cinnamon installed I only have two. Can I increase the number? If so, how?


title: Does Linux Mint support PAE for 32-bit Cinnamon and MATE?

text: Does Linux Mint 32-bit support PAE for both Cinnamon and MATE desktop environments?


title: Process not working when executed in background inside shell script

text: I have an application that runs fine, with and without '&' when run directly from the terminal. However, if I try to execute it from a shell script, it works only if the trailing '&' is skipped. Thus, I am unable to start this process in background from inside the shell script. `<Path to My application> <options> &` The application window opens but makes no progress after that. (The application is a modified(by me) version of qemu 0.13.0. When I run a disk image from that in background in a shell script, I get stuck with a black screen)


title: Where to turn first when out of free space on Cent OS Web Server?

text: I am a very new Systems Administrator. I have a Windows background and am now a Jr. Systems Admin working with Cent OS 5. Our web server runs Cent OS 5 and uses PHP/MySQL for our web applications. Every morning when I come to work I receive emails from the data center that give me reports on the status of our servers. One of the pieces of data is the amount of usage (used space/remaining space) ... this is a small business and the last admin jumped ship. So I have minimal training on these specific systems and the documentation that was left can't possibly cover everything. This is what it reads:               Filesystem            Size  Used Avail Use% Mounted on     /dev/xvda1            7.8G  7.3G   62M 100% /          As you can see above. That is a problem. Many clients use these web services. So if this was you ... what would your very first course of action be? Thanks


title: Change window manager in Fedora 18

text: Fedora 17 would let me choose my window manager on login; now with Fedora 18 not only can I not choose it on login, but I can't find a way to change it anywhere. Is there a way to easily switch between window managers in Fedora 18?


title: Writing To Disk Before Install

text: I burned Pinguy to a disk, and loaded the disk. If I create files, then save them, but don't install Pinguy, and then take out the disk, will those files be gone the next time I boot from the disk, or will they still be there?


title: using all callin different targets in makefile

text: I wrote a `makefile` as given below:               .PHONY: clean_lib all          a: lib             make $@.exe          c: lib             make $@.exe          clean_lib:             rm -f lib          all: a clean_lib c      When I call `make all` I would like the "a" target to build a `lib` and `a.exe` and after that "clean" that `lib` and then call "c". which would build again `lib` for "c" and build `c.exe`. Here the `a.exe` and `c.exe` only builds if `lib` builds. The problem is that after "clean" the `lib` that I want to rebuild for "c" is not building, so `c.exe` cannot build. Can anyone can help me?


title: Deleted user but files keep his group?

text: I removed a user from my computer. Now there's a lot of files that I need to modify that are from the deleted user group. How can I change ALL file group and owner from that deleted user without having to manually change the group for each file?


title: How do you send command line apps directly to the background?

text: I already know that pressing `ctrl+z` stops the app, then I can send the app to background with the `bg` command, but that means there is a brief preiod of time that the app is stopped. How do I send the app directly to the background without stopping it?


title: Opening install.txt when installing Arch Linux

text: I know this may sound sily but I don't how to open install.txt. I tried 'w3m install.txt' and '_w3m install.txt' but still don't open. Can someone specify the code to do this?


title: How to checkpoint using CRIU on ubuntu 14?

text: I tried to install CRIU in ubuntu 14.04 Desktop. When I used               $ sudo ./criu check      , it showed               Error (cr-check.c:268): fdinfo doesn't contain the mnt_id field      And when I tried to checkpoint joomla or xampp using               $sudo ./criu dump -D checkpoint -t 4761      , it shows               Error (proc_parse.c:502): Can't open 4761/stat on procfs: No such file or directory      CRIU: Verison: criu-1.3-rc1 Location: /home/criu-1.3-rc1/ How should I do to solve the problems?


title: ls *.* gives: "*.*: No such file or directory" message

text: I'm using Linux app-server 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux. When I go to a directory with several files named `name1.php`, `name1.html`, `name2.php`, etc. and type:               $ sudo ls *.*      I get:               ls: cannot access *.*: No such file or directory      I have the same sort of problem with `grep`:               $ grep "TOS.html" *.*     grep: *.*: No such file or directory      Why is that and how do I get around this problem? ### Edit #1:               $ shopt | grep glob     + grep glob     + shopt     dotglob         off     extglob         on     failglob        off     globstar        off     nocaseglob      off     nullglob        off      ### Edit #2:               $ ls -ld;echo --;sudo ls -ld      + ls --color=auto -ld     drwxr-x--x 16 www-data root 12288 Oct 10 17:08 .     + echo --     --     + sudo ls -ld     drwxr-x--x 16 www-data root 12288 Oct 10 17:08 .


title: Printing UTF-8 (including Chinese) text

text: I am trying to print a large quantity (several megabytes) of UTF-8 encoded text which consists of Chinese and Latin characters (and maybe a sprinkling of others). I would like to print it in several columns per page, in a very small, condensed font, preferably with control over line spacing. I'd quite like inter-column lines, but I can live without them. The aim is to print to PDF for transfer, as well as to paper. I have tried `enscript` and `a2ps`, but neither of these support Unicode. I have also tried `paps`, but this produces bitmapped outputs which cannot be PDF'd effectively, and also look terrible. Is there a modern way to print UTF-8 text like this without resorting to something like constructing it manually in Python?


title: Vim Highlight only the characters, which produce comments

text: I am trying to achieve the following. If I have a file, e.g. a tex document and I want to have the following with commenting characters (% symbols) highlighted:                   %         Some text and end of the sentence.         %         Some more text.      I already know how to highlight commented lines, but that is not exactly what I want. Also, I can achieve the desired effect if I just search for the % symbol, but I am too lazy to do that every time after I search anything else. I also would like to have a config so that in other languages I would have the same (e.g. -- symbols for lua, or # symbol for bash) Does anybody know how to do that elegantly in my .vimrc file?


title: How to run an interactive script in CUPS's pipe?

text: On our custom system, we run a Windows VM. The task is to print via the system below it (linux), which is responsible for the identity management, such that print jobs can be accounted at the print server. The windows environment shall not know anything specific, hence we use the a generic printer in the win settings. A script should be run somewhere in CUPS, which runs a dialog asking for the identity and offer a choice for the printers. How is this possible?


title: Qt based apps have wrong encoding?

text: I have Ubuntu 11.04. Yesterday I installed VirtualBox and the encoding was wrong (I couldn't read anything). I know its UI very well so I tried changing the UI display language but it didn't work as all the languages had the same issue. I also noticed that libreOffice had exactly the same problem so I decided to look deeper into it. I found that:   * Both VirtualBox and LibreOffice depend on Qt libs like libqtcore4. And Qt is used by KDE apps. But other Qt based apps like Okular are functional.   * In previous installations, I remember that VirtualBox and LibreOffice were using Greek by default. My attempts to change the language to English failed as well.   * I experimented with locale, update-locale and their ENV variables (LC_ALL, LANG and LANGUAGE) but it had no effect. I'm out of ideas and I haven't been able to find a decent solution. I'd really appreciate tips, hints or suggestions.


title: Fresh Linux (Debian and CentOS) installation will not boot

text: I am trying to install either Debian or CentOS on a home server (Fujitsu PRIMERGY TX100 S3). I first tried installing Debian. The whole installation was successful (including grub). But after rebooting, the OS would not boot up. My partition was the default setting for new users:               /dev/sda1 primary     /dev/sda5 logical (swap)      After booting, it gets to Intel Boot Agent and says it can't boot from media. I even tried disabling the DVD drive as a boot option. There is another device listed in boot options but the name is so ambiguous (IBA GE Slot 0200 v1372), I don't even know for sure if it refers to the hard drive. I then tried CentOS, and the same problem occurred. I have looked around this website, some other StackExchange websites, and also general internet searching, and it seems that my problem is related to the boot process. My problem is that I just don't know exactly where to begin looking. This is my first time setting up a Linux OS on a physical machine. Am I correct in assuming it is not reaching the BootLoader program properly? Or could this problem be caused by other things (ie, hardware)?


title: Disabling mouse-wheel window-shading in XFce?

text: If I place the mouse over the titlebar of a window, and roll the mouse-wheel, the window will become shaded. Is there any way to disable this feature?


title: How to install daemontools on ubuntu or debian from source

text: I am installing D.J.B.'s `daemontools` on an ubuntu 10.04 server (64 bit). (This question is about `daemontools`, which is a free and open software for managing UNIX services. It is not about 'DAEMON tools', which is a commercial software for disk images, running on windows.) I first installed the build-essential package and afterwards followed the instructions on http://cr.yp.to/daemontools/install.html 1:1, but it fails:               Script started on Sa 28 Apr 2012 21:41:34 CEST     root@daemontools1:/# mkdir -p /package     root@daemontools1:/#      chmod 1755 /package     root@daemontools1:/#      cd /package     root@daemontools1:/package# wget http://cr.yp.to/daemontools/daemontools-0.76.ta ^Mr.gz     --2012-04-28 21:42:10--  http://cr.yp.to/daemontools/daemontools-0.76.tar.gz     Resolving cr.yp.to... 131.193.32.142, 80.101.159.118     Connecting to cr.yp.to|131.193.32.142|:80... connected.     HTTP request sent, awaiting response... 200 OK     Length: 36975 (36K) [application/x-gzip]     Saving to: `daemontools-0.76.tar.gz'          ^M 0% [                                       ] 0           --.-K/s              ^M58% [=====================>              $          2012-04-28 21:42:11 (125 KB/s) - `daemontools-0.76.tar.gz' saved [36975/36975]          root@daemontools1:/package# gunzip daemontools-0.76.tar     root@daemontools1:/package#      tar -xpf daemontools-0.76.tar     root@daemontools1:/package#      rm -f daemontools-0.76.tar     root@daemontools1:/package#      cd admin/daemontools-0.76     root@daemontools1:/package/admin/daemontools-0.76#     root@daemontools1:/package/admin/daemontools-0.76#     root@daemontools1:/package/admin/daemontools-0.76# package/install     Linking ./src/* into ./compile...     Compiling everything in ./compile...     sh find-systype.sh > systype     rm -f compile     sh print-cc.sh > compile     chmod 555 compile     ./compile byte_chr.c     ./compile byte_copy.c     ./compile byte_cr.c     ./compile byte_diff.c     ./compile byte_rchr.c     ./compile fmt_uint.c     ./compile fmt_uint0.c     ./compile fmt_ulong.c     rm -f makelib     sh print-ar.sh > makelib     chmod 555 makelib     ./compile scan_ulong.c     ./compile str_chr.c     ./compile str_diff.c     ./compile str_len.c     ./compile str_start.c     ./makelib byte.a byte_chr.o byte_copy.o byte_cr.o byte_diff.o \             byte_rchr.o fmt_uint.o fmt_uint0.o fmt_ulong.o scan_ulong.o str_chr.o \             str_diff.o str_len.o str_start.o     rm -f choose     cat warn-auto.sh choose.sh \             | sed s}HOME}"`head -1 home`"}g \             > choose     chmod 555 choose     ./choose c trydrent direntry.h1 direntry.h2 > direntry.h     ./compile envdir.c     rm -f load     sh print-ld.sh > load     chmod 555 load     ./compile alloc.c     ./compile alloc_re.c     ./compile buffer.c     ./compile buffer_0.c     ./compile buffer_1.c     ./compile buffer_2.c     ./compile buffer_get.c     ./compile buffer_put.c     ./compile buffer_read.c     ./compile buffer_write.c     ./compile coe.c     ./compile env.c     ./compile error.c     ./compile error_str.c     ./compile fd_copy.c     ./compile fd_move.c     ./choose cl trymkffo hasmkffo.h1 hasmkffo.h2 > hasmkffo.h     ./compile fifo.c     ./choose cl tryflock hasflock.h1 hasflock.h2 > hasflock.h     ./compile lock_ex.c     ./compile lock_exnb.c     ./compile ndelay_off.c     ./compile ndelay_on.c     ./compile open_append.c     ./compile open_read.c     ./compile open_trunc.c     ./compile open_write.c     ./compile openreadclose.c     ./compile pathexec_env.c     ./compile pathexec_run.c     pathexec_run.c: In function ‘pathexec_run’:     pathexec_run.c:18: warning: implicit declaration of function ‘execve’     ./compile chkshsgr.c     chkshsgr.c: In function ‘main’:     chkshsgr.c:10: warning: passing argument 2 of ‘getgroups’ from incompatible pointer type     /usr/include/bits/unistd.h:266: note: expected ‘__gid_t *’ but argument is of type ‘short int *’     chkshsgr.c:10: warning: implicit declaration of function ‘setgroups’     ./load chkshsgr     ./chkshsgr || ( cat warn-shsgr; exit 1 )     ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h     ./compile prot.c     prot.c: In function ‘prot_gid’:     prot.c:13: warning: implicit declaration of function ‘setgroups’     prot.c:15: warning: implicit declaration of function ‘setgid’     prot.c: In function ‘prot_uid’:     prot.c:20: warning: implicit declaration of function ‘setuid’     ./compile readclose.c     ./compile seek_set.c     seek_set.c: In function ‘seek_set’:     seek_set.c:9: warning: implicit declaration of function ‘lseek’     ./compile sgetopt.c     ./compile sig.c     ./choose cl trysgprm hassgprm.h1 hassgprm.h2 > hassgprm.h     ./compile sig_block.c     ./choose cl trysgact hassgact.h1 hassgact.h2 > hassgact.h     ./compile sig_catch.c     ./compile sig_pause.c     ./compile stralloc_cat.c     ./compile stralloc_catb.c     ./compile stralloc_cats.c     ./compile stralloc_eady.c     ./compile stralloc_opyb.c     ./compile stralloc_opys.c     ./compile stralloc_pend.c     ./compile strerr_die.c     ./compile strerr_sys.c     ./compile subgetopt.c     ./choose cl trywaitp haswaitp.h1 haswaitp.h2 > haswaitp.h     ./compile wait_nohang.c     ./compile wait_pid.c     ./makelib unix.a alloc.o alloc_re.o buffer.o buffer_0.o buffer_1.o \             buffer_2.o buffer_get.o buffer_put.o buffer_read.o buffer_write.o \             coe.o env.o error.o error_str.o fd_copy.o fd_move.o fifo.o lock_ex.o \             lock_exnb.o ndelay_off.o ndelay_on.o open_append.o open_read.o \             open_trunc.o open_write.o openreadclose.o pathexec_env.o \             pathexec_run.o prot.o readclose.o seek_set.o sgetopt.o sig.o \             sig_block.o sig_catch.o sig_pause.o stralloc_cat.o stralloc_catb.o \             stralloc_cats.o stralloc_eady.o stralloc_opyb.o stralloc_opys.o \             stralloc_pend.o strerr_die.o strerr_sys.o subgetopt.o wait_nohang.o \             wait_pid.o     ./load envdir unix.a byte.a     collect2: ld terminated with signal 11 [Segmentation fault]     /usr/bin/ld: make: *** [envdir] Error 1     Copying commands into ./command...     cp: cannot stat `compile/svscan': No such file or directory      I also tried to do it on debian squeeze, the result is similar: http://pastebin.com/VNAWLU57 I know I can install daemontools from the ubuntu and also debian repository, but how do I compile it myself?


title: Personal Drawing Board

text: I am a computer science major who has a lot of theoretical classes that involve a lot of math. I hate using pen and paper for scratch work because I keep on losing them so I am planning on getting a new bamboo input tablet so that I can do all the "scratch work" in an accessible format on my laptop. However, I am finding it hard locating an application in Linux that essentially acts as an accessible white board. All of the apps I look at are geared towards artists and so are not designed to accommodate my needs. Is there an app geared to people who have requirements like mine? P.S I already use latex but that is usually for work already done and thus not very effective for the things that I am still figuring out.


title: Move line in Joe's Own Editor

text: Is there a way to move a line up and down in the joe editor?


title: List the files accessed by a program

text: `time` is a brilliant command if you want to figure out how much CPU time a given command takes. I am looking for something similar that can list the files being accessed by a program and its children. Either in real time or as a report afterwards. Currently I use:               #!/bin/bash          strace -ff -e trace=file "$@" 2>&1 | perl -ne 's/^[^"]+"(([^\\"]|\\[\\"nt])*)".*/$1/ && print'      but its fails if the command to run involves `sudo`. It is not very intelligent (it would be nice if it could only list files existing or that had permission problems or group them into files that are read and files that are written). Also `strace` is slow, so it would be good with a faster choice.


title: LXC container network/routing issues

text: I have been experimenting with LXC virtualisation in order to run virtual machines on a dedicated server, but am having trouble setting up the networking properly. I am using veth bridged networking, as instructed here: http://blog.foaa.de/2010/05/lxc-on-debian-squeeze/ (the guide I used to setup the LXC container) When I start the container, it functions fine, can access the Internet and accepts incoming connections to it's own IP. However, as soon as I start it, the networking on my host box (dedicated server) goes down completely, and will not come back until the server is rebooted. The only thing I can think of that would be causing this is incorrectly configured bridging settings, however I'm not sure entirely what the proper ones should be. Any advice on how I could reconfigure this? Thanks. Both the host node and the container itself are running Debian Squeeze, with packages upgraded to the latest versions. Host node (dedicated server) network configuration (/etc/network/interfaces):               allow-hotplug eth0     auto br0     iface br0 inet static         bridge_ports eth0         bridge_fd 0         bridge_stp off         bridge_maxwait 0          address 46.105.102.29         netmask 255.255.255.0         network 46.105.102.0         broadcast 46.105.102.255         gateway 46.105.102.254      LXC container network configuration (/etc/network/interfaces):               auto eth0     iface eth0 inet static         address 94.23.153.205         netmask 255.255.255.0         broadcast 94.23.153.205         post-up route add 46.105.102.254 dev eth0         post-up route add default gw 46.105.102.254         post-down route del 46.105.102.254 dev eth0      Container network configuration (from LXC config file):               lxc.utsname = paradox     lxc.network.type = veth     lxc.network.flags = up     lxc.network.link = br0     lxc.network.hwaddr = 02:00:00:ba:47:a0     lxc.network.ipv4 = 94.23.153.205


title: openSUSE 11.4 doesn't wake up from suspend to ram, sometimes doesn't logout

text: I have openSUSE 11.4 on a vaio S series laptop, using KDE, and it is nearly up-to-date. Everything was fine but after an update (whose details I can't remember), these problems appeared:   * Nearly every time I suspend to ram, it doesn't wake up.   * Sometimes when I'm working in KDE, the mouse doesn't do anything. It just moves around but its clicks don't have any effect. I have to logout and login again to resolve that problem. I think that these two problems are the same. Also, I'm using nvidia proprietary driver version **275.21-7.1**. What should I do to debug this? What's your opinion about downgrading nvidia driver?


title: How to monitor other nodes to get RSSI?

text: I need to measure RSSI between two peers of nodes in same network. If I have these two information:   1. SSID for their network.   2. IP for the target node to get the RSSI regarding it. So I found this command: `iwspy` but it seems that not found in the kernel and I see this link  that talk about: > We removed iwspy support a very long time ago because it is useless, but > forgot to stop claiming to support it. Apparently, nobody cares, but remove > it nonetheless.


title: List of netfilter modules for which I can leave out the -m option and other implied information

text: Rules in `iptables`/`ip6tables` can sometimes become a bit verbose to read. I am looking for a list of information that I can skip from `iptables`/`ip6tables` that I write. ### Examples:   * if you say `-s 1.2.3.4` it implies `\--mask 255.255.255.255`, i.e. it matches only the exact IPv4 address. Similar stuff exists in the IPv6 realm.   * if you say `-p tcp --dport http` this implies `-m tcp`, the same can be done for the `udp` module, i.e. `\--dport` and `\--sport` imply the respective module as long the protocol in `-p` matches. Rationale: The number of implied data for a rule should be finite, which means this isn't an open-ended question, which I had pondered before typing it up. NB: you can see what's implied for the rules you write by comparing your input with the output if `iptables-save`/`ip6tables-save`. Alas, the problem is that I cannot write up every possible rule, so I am looking for a list or specifically **documentation** outlining what data is implied.


title: what does 'old' mean in the output of `who -u`?

text: Title says it all. In the listings of `who -u`, some of the records show the string "old" in the idle time column. I know that "." means the session is not idle. What's the meaning of "old"? The manpage and Google didn't help me.


title: Multivariable For Loops

text: Is there a way to specify multiple variables (not just integers) in for loops in bash? I may have 2 files containing arbitrary text that i would need to work with. What i functionally need is something like this: for i in $(cat file1) and j in $(cat file2); do command $i $j; done Any ideas?


title: Get a Kerberos service ticket from the command line

text: I am in the process of debugging a Kerberos setup. I have a valid `krb5.conf` and I can call `kinit USERNAME` to get a Ticket Granting Ticket (TGT):               Credentials cache: /root/krb5cc_root     Default principal: USERNAME@EXAMPLE.COM     Number of entries: 1          [1] Service principal: krbtgt/EXAMPLE.COM@EXAMPLE.COM             Valid starting: Wednesday, June 4, 2014 at 10:02:29 PM             Expires: Thursday, June 5, 2014 at 8:02:29 AM      I would like to use that TGT to request a Kerberos **service ticket** on the command line, so I can look at it with klist. It will help with debugging a Kerberos problem I am trying to solve. Is there a command or program to retreive a Kerberos service ticket for a given service ?


title: script to zip a file and change its owenrship

text: I have a script I am working on that reads off of a text file and will use the information stored in the text file to put each line entered in as an array. This array is a reference to files that are imported to a directory in another script. The problem is I built a function to zip the contents of the directory and change it's ownerships, but when I run the script it was zipping and attempting to change ownerships of the `pwd`. Here is my code below:               file=~/exporttool/zipFiles.txt     index=0     declare -a studyinstanceuids     while read line ; do             studyinstanceuids[$index]="$line"             index=$((index+1))             echo $line     done < $file     for i in "${studyinstanceuids[@]}"     do     echo "$i" | ./cmd2;     done     echo "Exams are in!";          ##Function with argument that will take prompt to change ownerships     echo "What is the name of the owner: "     read $owner          zipForOwner(){             arg1=$1             for i in "${studyinstanceuids[@]}"; do                     zip -r ~/export/"${studyinstanceuids[@]}"/20140620_"${studyinstanceuids[@]}".zip .                     sudo chown $1:$1 ~/export/"${studyinstanceuids[@]}"/"${studyinstanceuids[@]}".zip                     sudo mv ~/export/"${studyinstanceuids[@]}"/"${studyinstanceuids[@]}".zip ~/home/"$1"             done     }          zipForOwner $owner     exit;      Does anyone have any suggestions?


title: Can a terminal emulator be as fast as TTY 1-6?

text: I've been trying various terminal emulators lately, from the built-in gnome- terminal, aterm, xterm, wterm, to rxvt. The test I've been doing is in this order:   1. Open up a tmux window with 2 panes   2. The left pane will be an verbose-intensive task such as `grep a /et/c -r` or a simple `time seq -f 'blah blah %g' 100000`   3. The right pane will be a vim window with syntax on, opening any file that has more than >100 lines of code. When the left pane is printing a lot of output, the right pane seems to be very slow and unresponsive, I tried to scroll in vim but it takes 1-2 second for it to change. When I try to press `Ctrl``C` on the left pane it waits for more than 10 second before it stopped When I do the same thing in TTY (pressing `CTRL`+`ALT`+(`F[1-6]`)), it doesn't happen and both panes are very responsive. I've turned of some config such as antialias fonts, turn of coloring, use default settings, and change to xmonad and openbox, but it doesn't change anything. The result of `time seq -f 'blah blah %g' 100000` is not really different among these terminals, but the responsiveness is really different especially when I'm running spitted pane tmux (or other multiplexers). FYI, I'm running all of them in a maximized mode. I've read about frame buffered terminals but not sure how does it work and how can it be used to speed up my terminal emulator. So my question is, what makes terminal emulator far slower than TTY? Is there any possibility to make it as fast as TTY? Maybe hardware acceleration or something?. One thing I know, my resolution in X server when running a maximized terminal emulator is 1920x1080, and when I'm running TTY it is less than that, but I'm not sure how this would affect the performance.


title: Passing a variable to sed

text: I cannot not use a shell variable in `sed` in the `$NUMBER` form. I have this line in my shell script:               cat shared.txt sed 's/whatever1/$2 ... whatever2/' > shared2.txt      The result in `shared2.txt` looks like:               ...$2....      What did I do wrong?


title: CentOS use .pac file as proxy

text: I have to use a proxy with authentication to connect to the Internet. But I can't find any solution for this. I have modify my `yum.conf`, with a lot of possibilities:               proxy=http://myproxy.domaine.com:8080/     proxy_username=DOMAIN\user    or just   USER     proxy_password=mypasswd1      or leave blank      or I did this too:               proxy=http://DOMAIN\User:password@myproxy.domain.com:8080/      I also tried this:               http_proxy=http://DOMAIN\User:password@myproxy.domain.com:8080/     export http_proxy      But nothing works! When I do a `yum update`, it tells me: > [Errno 14] HTTP Error 407: Proxy Authentication Required Does anyone have a solution, because since yesterday, I have tried all of these approaches, and I stil cannot connect to the Internet. EDIT : I have a `.pac` file too. But no graphical mode in my host. So I don't know what to do with this file.


title: Why is it recommended to create a group and user for some applications?

text: Most of the time, when installing a program from source it is recommended to create a new user and a new group and give `/usr/local/<myapp>` the recently created user and group ownership.   * Why is such pratice considered as a good practice?   * What does it improve? Example: mysql user/mysql group for the MySQL database server.


title: Setting a variable whose value depends on another variable

text: i have a text file **variables.txt** where i store my variables > host=/srv/www/vhosts/hosting > > index= **$host** /index.php as you see the second variables depends on the first one. i also have a script file to load these variables               f=~/variables.txt     for line in $(cat $f)     do     export $line     done      when i execute the script file, my first variable gets loaded, while the second doesn't:               bash: $host/index.php: No such file or directory      it's because after loading the first variable **host** , it doesn't remember its value to use for setting the second variable **index**. So how to solve this problem? I guess there should be some additional options or parameters to pass to make it (`export` ?) remember the set variable value in a `for` loop.


title: How automatically change the orientation according to display's pivot position?

text: I have a display I use for programming in portrait mode. To watch videos, I pivot it to landscape mode multiple times a day. The physical transformation is quick but I have to dig into the monitor configuration each time to adjust the orientation / the resolution. Is there any way to automate this under Linux? The Monitor in question is a BenQ BL2410PT, which has an auto-pivot feature in the software it comes with and I use an AMD graphics card. I can change the rotation to portrait mode with               $ xrandr --output DVI-1 --rotation left      and back to landscape mode with               $ xrandr --output DVI-1 --rotation normal      so the question boils down to detecting the orientation change of the monitor.


title: Dual-booting Windows 7 and Mint 14 with "something else" option

text: I would like to do a dual boot of Windows 7 and Mint 14 on my Acer netbook which already has Windows 7 Pro 64-bit installed on an 1 TB hard drive. I have already shrunk the Windows 7 partition to 330 G and the other partition I want to install Mint 14 on. The problem is that I would like to install Mint with the "something else option". If I'm giving Mint a 600GB partition, I don't know what size I should make the following:   * Swap - I have 4GB of RAM, should I make this 2GB and should it be at beginning or end of partition?    * /   * /boot   * /home I think those are the 4 main partitions I will need to allocate space to. But if I'm leaving anything out please feel free to point it out.


title: How to remove a directory with "Too many levels of symlinks"

text: I have a bit of an odd problem on a RHEL system. On our systems we have our home directory automounted under `/export/home`. There are a few exceptions, as I'm experimenting with using gluster for our home dirs. These are automounted under `/gluster/home` This works on all our (30+) servers. Today this stopped working on one of them. I get the error:               Too many levels of symlinks      when trying to `cd` into `/gluster/home/$HOME`... I ended up temporary moving `/gluster` to `/gluster_broken`, and made a new `/gluster/home`, restarted autofs and things work again. Now I want to remove `/gluster_broken`. The problem is that aparently there is some symlink loop in `/gluster_broken/home`. I don't know where it came from. My attempts to get rid of it have been fruitless so far.               [root@dc1-03 /]# rm -rf gluster_broken/     rm: cannot remove `gluster_broken/home': Too many levels of symbolic links     [root@dc1-03 /]# rm -rf /gluster_broken/     rm: cannot remove `/gluster_broken/home': Too many levels of symbolic links     [root@dc1-03 /]# rm -rf /gluster_broken/home/     rm: cannot remove `/gluster_broken/home/': Is a directory     [root@dc1-03 /]# rm -rf /gluster_broken/home     rm: cannot remove `/gluster_broken/home': Too many levels of symbolic links     [root@dc1-03 /]# rmdir /gluster_broken/home/     rmdir: failed to remove `/gluster_broken/home/': Device or resource busy     [root@dc1-03 /]# fuser -m /gluster_broken/home/     Cannot stat /gluster_broken/home/: Too many levels of symbolic links     Cannot stat /gluster_broken/home/: Too many levels of symbolic links     Cannot stat /gluster_broken/home/: Too many levels of symbolic links     [root@dc1-03 /]# ls -ld /gluster_broken/home/     ls: cannot access /gluster_broken/home/: Too many levels of symbolic links     [root@dc1-03 /]# ls -ld /gluster_broken/home     drwxr-xr-x. 2 root root 0 Jan 22 10:20 /gluster_broken/home     [root@dc1-03 /]# fuser -m /gluster_broken/home      As you can see most commands all yield the same error message. I would really like to get rid of this problem. But I'm a bit at a loss here. Any suggestions? Output of suggested commands:               [root@dc1-03 /]# ls /gluster_broken/     home     [root@dc1-03 /]# ls /gluster_broken/home/     ls: cannot access /gluster_broken/home/: Too many levels of symbolic links     [root@dc1-03 /]# ls -hblF /gluster_broken /gluster_broken/home      /gluster_broken:     total 0     drwxr-xr-x. 2 root root 0 Feb  4 12:00 home/     ls: cannot open directory /gluster_broken/home: Too many levels of symbolic links


title: Remove unused packages

text: I have installed some rpm package on my Fedora 17. Some packages had a lot of dependencies. I have removed some packages but I forgot remove unused dependencies with yum remove. How can I do that now?


title: Command line streaming string manipulation from netcat

text: I have a netcat udp connection listening with `nc -l -u ...`. I've been trying to do a per packet manipulation of the incoming data with just command line, but it doesn't look like there is a flag in `netcat` to indicate a new packet. First, is it possible to just apply a new line to the end of each packet coming in from netcat? If not, is there a way instead to match a string and output a new line while netcat is streaming in data?


title: Samba 4 gives "Failed to find a writeable DC for domain" on samba-tool domain join

text: I have a CentOS 6.4 box with SerNet's Samba 4.0.8 installed and no smb.conf file yet, as it should be. I want it to become an AD DC in my existing Windows domain, replicating from the existing Windows Server 2003 box. I have SELinux enabled and want it to stay that way in the end, but would be willing to attempt to disable it temporarily. But I've run `sudo setsebool -P samba_domain_controller on` and `sudo setsebool -P samba_enable_home_dirs on` and they returned no errors. Also I opted to try using Samba 4's internal DNS rather than BIND. I'm getting this error trying to run samba-tool:               $ sudo samba-tool domain join currentwindowsadserver.mydomain.lan DC -Uadministrator --realm=currentwindowsadserver.mydomain.lan     Finding a writeable DC for domain 'currentwindowsadserver.mydomain.lan'     ERROR(exception): uncaught exception - Failed to find a writeable DC for domain 'currentwindowsadserver.mydomain.lan'       File "/usr/lib64/python2.6/site-packages/samba/netcmd/__init__.py", line 175, in _run         return self.run(*args, **kwargs)       File "/usr/lib64/python2.6/site-packages/samba/netcmd/domain.py", line 552, in run         machinepass=machinepass, use_ntvfs=use_ntvfs, dns_backend=dns_backend)       File "/usr/lib64/python2.6/site-packages/samba/join.py", line 1082, in join_DC         machinepass, use_ntvfs, dns_backend, promote_existing)       File "/usr/lib64/python2.6/site-packages/samba/join.py", line 73, in __init__         ctx.server = ctx.find_dc(domain)       File "/usr/lib64/python2.6/site-packages/samba/join.py", line 246, in find_dc         raise Exception("Failed to find a writeable DC for domain '%s'" % domain)      Same situation as described here, but the suggested `-S` does not seem to exist anymore--it spits out usage directions when I try it and said:               samba-tool domain join: error: no such option: -S      I tried adding the old and new to `/etc/hosts` but that didn't change the results. `kinit` and `klist` work as they should, and `host -t A mynewserver` also produces correct output (giving the correct IP and the correct name, see below.) Currently, my windows AD server has 5 names and 5 IP addresses, but if I ping it from CentOS by its main name that I use for everything Windows (the other 4 I only use for Apache, yes I know, running Apache on Windows...you can see why I'm migrating) it returns correctly as that name. Nonetheless I thought maybe that was causing some problems, so seeing this page (and even `samba-tool domain join -h`) I also tried adding `\--ipaddress=192.168.1.2` and it said that it wasn't a valid option either:               samba-tool domain join: error: no such option: --ip-address      `samba-tool domain info` without `DC` but otherwise the same parameters as at the start, correctly gives me info about the Windows DC. Also DNS seems to be fine:               $ host -t SRV _ldap._tcp.mydomain.lan     _ldap._tcp.mydomain.lan has SRV record 0 100 389 currentwindowsadserver.mydomain.lan     $ host -t SRV _kerberos._udp.mydomain.lan     _kerberos._udp.mydomain.lan has SRV record 0 100 88 currentwindowsadserver.mydomain.lan     $ host -t SRV _ldap._tcp.dc._msdcs.mydomain.lan     _ldap._tcp.dc._msdcs.mydomain.lan has SRV record 0 100 389 currentwindowsadserver.mydomain.lan     $ host -t SRV _kerberos._tcp.dc._msdcs.mydomain.lan     _kerberos._tcp.dc._msdcs.mydomain.lan has SRV record 0 100 88 currentwindowsadserver.mydomain.lan     $ host -t SRV _kpasswd._tcp.mydomain.lan     _kpasswd._tcp.mydomain.lan has SRV record 0 100 464 currentwindowsadserver.mydomain.lan.     $ host -t SRV _kpasswd._udp.mydomain.lan     _kpasswd._udp.mydomain.lan has SRV record 0 100 464 currentwindowsadserver.mydomain.lan.     $ host -t SRV _ldap._tcp.gc._msdcs.mydomain.lan     _ldap._tcp.gc._msdcs.mydomain.lan has SRV record 0 100 3268 currentwindowsadserver.mydomain.lan.     $ host -t SRV _gc._tcp.mydomain.lan     _gc._tcp.mydomain.lan has SRV record 0 100 3268 currentwindowsadserver.mydomain.lan.      ATM, AFAIK, we're an IPv4-only network (one page mentioned IPv6 issues). I don't see any IPv6 addresses when I ping or run `host -t A` or anything like that--if this is the issue I'm not sure what to do to verify or fix it, maybe someone could help me out with that. `sudo netstat -tunpe | grep ":53"` returns nothing, and I have iptables open on 445 UDP and TCP. Update, I now have it open on everything listed here except the NetBIOS ones, and reloaded iptables without error, but still no change. I've also tried stopping the iptables service temporarily, no difference. I also have both `domain` and `search` directives with mydomain.lan after them in `/etc/resolv.conf`, as well as `nameserver` with the primary IP of the Windows box. What else could it be? Google isn't giving me much else to try here.


title: List of Recently Modified Files of a specified user in whole disk?

text: One of my colleague is suddenly getting sick seriously and I need to finish his part, so knowing what he is working on most recently would be useful... For example, if I want to see the most recent files `Bob` has worked on(or in other words, he modified them most recently) and then sort them by the time. Is there an easy way to do this?


title: Copy specific file type keeping the folder structure

text: I have a folder structure with a bunch of *.csv files scattered across the folders. Now I want to copy all *.csv files to another destination keeping the folder structure. it works using:               cp --parent *.csv /target     cp --parent */*.csv" /target     cp --parent */*/*.csv /target     cp --parent */*/*/*.csv /target     ...      and so on, but I would like to do it using one command.


title: Mercurial (hg) not respecting default ACL settings

text: I'm trying to set fine grained access control to various mercurial repositories using ACL. When I push changes to repository any new files created under `/myrepo/.hg/store/data` do not have default permissions and users can't access them. The issue is reproducible. Assume the user "myuser" is part of www-data group. On the server:               hg init /tmp/test     chown root:root /tmp/test     chmod 770 /tmp/test     setfacl -Rdm g:www-data:rwx /tmp/test     setfacl -Rm g:www-data:rwx /tmp/test      On a windows box with TortoiseHg, set to use `plink.exe` for ssh with shared key:               hg clone ssh://myuser@servername//tmp/test test     #add file test1.txt and commit to test     hg push ssh://myuser@server//tmp/test     cd ..     hg clone ssh://myuser@servername//tmp/test test2  <---FAIL      Back on the server checking ACL               getfacl /tmp/test/.hg/store/data/test1.txt.i     # file: tmp/test/.hg/store/data/test1.txt.i     # owner: myuser     # group: myuser     user::rw-     group::rw-     other::r--      So the new file was not created with default permissions I added to parent folder `/tmp/test`. This problem also happens when you do `hg pull` on the server and `hg serve` on the client. My `/etc/fstab` is mounting the partition with "default,acl" options. Also `touch /tmp/test/test1` creates file with appropriate default permissions as expected **Edit**   * Mercurial version: 2.0.2-1ubuntu1   * Linux Ubuntu 12.04


title: IPtables Packet Balancing

text: I would like to see the below work as a result of seeing several posts online that have this working but not quite the same as my situation. Forgive me if it appears to be a stupid idea as I'm now chasing a white rabbit for curiosity's sake. I would like for every three packets sent out on WAN link 1 (faster) one packet sent out on WAN link 2 (slower). The two links are OpenVPNed to same remote host with tun0 for slower link and tun1 for faster link. I am then going to forward traffic from a guest through libvirt host. So, let's have a look see what I've done on the libvirt host: Create routing tables with rules:               ip ru add fwmark 1 table diginet     ip ru add fwmark 2 table iburst                    [root@collector tmp]# ip ru l     0:  from all lookup local     32762:  from all fwmark 0x2 lookup iburst     32763:  from all fwmark 0x1 lookup diginet     32766:  from all lookup main     32767:  from all lookup default      Add default routes (tun0 and tun1 courtesy of OpenVPN):               ip r a default via 172.20.35.9 table diginet     ip r a default via 172.20.36.9 table iburst      Mark packets so that we have a "balance-rr" like situation:               iptables -t mangle -A PREROUTING -d 172.20.10.33 -p icmp -m statistic --mode nth --every 4 --packet 0 -j MARK --set-mark 1     iptables -t mangle -A PREROUTING -d 172.20.10.33 -p icmp -m statistic --mode nth --every 4 --packet 1 -j MARK --set-mark 1     iptables -t mangle -A PREROUTING -d 172.20.10.33 -p icmp -m statistic --mode nth --every 4 --packet 2 -j MARK --set-mark 1     iptables -t mangle -A PREROUTING -d 172.20.10.33 -p icmp -m statistic --mode nth --every 4 --packet 3 -j MARK --set-mark 2      Testing from guest:               [robert@pluto ~]$ ip a l eth0     2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000         link/ether 52:54:00:15:ac:e6 brd ff:ff:ff:ff:ff:ff         inet 192.168.122.2/24 brd 192.168.122.255 scope global eth0         inet6 fe80::5054:ff:fe15:ace6/64 scope link             valid_lft forever preferred_lft forever          [robert@pluto ~]$ ping 172.20.10.33     PING 172.20.10.33 (172.20.10.33) 56(84) bytes of data.      ICMP packets come in virbr0 and out on tun0, tun1.               [robert@collector tmp]$ ip a l     9: virbr0:  mtu 1500 qdisc noqueue state UNKNOWN          link/ether 52:54:00:9c:d3:02 brd ff:ff:ff:ff:ff:ff         inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0     10: virbr0-nic:  mtu 1500 qdisc noop state DOWN qlen 500         link/ether 52:54:00:9c:d3:02 brd ff:ff:ff:ff:ff:ff     11: vnet0:  mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500         link/ether fe:54:00:15:ac:e6 brd ff:ff:ff:ff:ff:ff         inet6 fe80::fc54:ff:fe15:ace6/64 scope link             valid_lft forever preferred_lft forever     21: tun1:  mtu 1500 qdisc pfifo_fast master bond0 state UNKNOWN qlen 100         link/[65534]          inet 172.20.36.10 peer 172.20.36.9/32 scope global tun1     22: tun0:  mtu 1500 qdisc pfifo_fast master bond0 state UNKNOWN qlen 100         link/[65534]          inet 172.20.35.10 peer 172.20.35.9/32 scope global tun0     23: bond0:  mtu 1500 qdisc noqueue state UP          link/[65534]          inet 172.20.37.2/24 brd 172.20.37.255 scope global bond0      All seems good on libvirt host and packets are been marked:               #Monitor.     watch -n 1 iptables -t mangle -L PREROUTING -nv     Every 1.0s: iptables -t mangle -L PREROUTING -nv                             Mon Aug  4 19:15:40 2014          Chain PREROUTING (policy ACCEPT 2130K packets, 1031M bytes)      pkts bytes target     prot opt in     out     source               destination       679 57036 MARK       icmp --  *      *       0.0.0.0/0            172.20.10.33        statistic mod     e nth every 4 MARK set 0x1       678 56952 MARK       icmp --  *      *       0.0.0.0/0            172.20.10.33        statistic mod     e nth every 4 packet 1 MARK set 0x1       677 56868 MARK       icmp --  *      *       0.0.0.0/0            172.20.10.33        statistic mod     e nth every 4 packet 2 MARK set 0x1       675 56700 MARK       icmp --  *      *       0.0.0.0/0            172.20.10.33        statistic mod     e nth every 4 packet 3 MARK set 0x2       And on remote host packets are arriving:               [root@redrouter tmp]# ip a l     1: lo:  mtu 16436 qdisc noqueue state UNKNOWN          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00         inet 127.0.0.1/8 scope host lo         inet6 ::1/128 scope host             valid_lft forever preferred_lft forever     13: tun1:  mtu 1500 qdisc pfifo_fast master bond0 state UNKNOWN qlen 100         link/[65534]          inet 172.20.36.9 peer 172.20.36.10/32 scope global tun1     14: tun0:  mtu 1500 qdisc pfifo_fast master bond0 state UNKNOWN qlen 100         link/[65534]          inet 172.20.35.9 peer 172.20.35.10/32 scope global tun0     15: bond0:  mtu 1500 qdisc noqueue state UP          link/[65534]          inet 172.20.37.1/24 brd 172.20.37.255 scope global bond0          [root@redrouter tmp]# tcpdump -nni tun1 icmp     tcpdump: verbose output suppressed, use -v or -vv for full protocol decode     listening on tun1, link-type RAW (Raw IP), capture size 65535 bytes     19:14:14.669018 IP 192.168.122.2 > 172.20.10.33: ICMP echo request, id 57951, seq 39, length 64     19:14:15.466163 IP 192.168.122.2 > 172.20.10.33: ICMP echo request, id 57951, seq 43, length 64     19:14:19.466224 IP 192.168.122.2 > 172.20.10.33: ICMP echo request, id 57951, seq 47, length 64          [root@redrouter tmp]# tcpdump -nni tun0 icmp     tcpdump: verbose output suppressed, use -v or -vv for full protocol decode     listening on tun0, link-type RAW (Raw IP), capture size 65535 bytes     19:14:38.468565 IP 192.168.122.2 > 172.20.10.33: ICMP echo request, id 57951, seq 66, length 64     19:14:40.468711 IP 192.168.122.2 > 172.20.10.33: ICMP echo request, id 57951, seq 68, length 64     19:14:41.468687 IP 192.168.122.2 > 172.20.10.33: ICMP echo request, id 57951, seq 69, length 64     19:14:42.468785 IP 192.168.122.2 > 172.20.10.33: ICMP echo request, id 57951, seq 70, length 64     19:14:44.468789 IP 192.168.122.2 > 172.20.10.33: ICMP echo request, id 57951, seq 72, length 64     19:14:45.468749 IP 192.168.122.2 > 172.20.10.33: ICMP echo request, id 57951, seq 73, length 64     19:14:46.468816 IP 192.168.122.2 > 172.20.10.33: ICMP echo request, id 57951, seq 74, length 64      So 3 packets on tun1 and one on tun0, good. But I need to do something about the 192.168.122.2 address. As soon as I add a SNAT rule it breaks by only SNATting it seems the .35 or .36 IP (not not alternating both) and is unpredictable as to which IP it chooses upon ping start.               # Testing SNAT. Does not work, SNATs from one IP only all the time.     # After several retries then does .35 SNAT. Unpredictable.     iptables -t nat -A POSTROUTING -o tun0 -p icmp -d 172.20.10.33 -j SNAT --to-source 172.20.35.10     iptables -t nat -A POSTROUTING -o tun1 -p icmp -d 172.20.10.33 -j SNAT --to-source 172.20.36.10          # Similarly SNAT based on mark.     iptables -t nat -A POSTROUTING -m mark --mark 1 -j SNAT --to-source 172.20.35.10     iptables -t nat -A POSTROUTING -m mark --mark 2 -j SNAT --to-source 172.20.36.10      I have since then done VPN bonding which works cool but this solution could do also do 3/1 etc. which the bonding kernel module does not do (yet?). Can anyone advise as to why the SNAT breaks? Apologies if the post is unclear or lacks coherency in certain parts. Thank you.


title: Search and replace text within multiple files

text: I am migrating my blog, and all the posts have metadata at the top of the file. As a result I have a group of nearly 100 files in a directory where I want to do a search and replace for:               ^permalink: http://blog.olddomain.com/(.*)$      to               permalink: http://blog.newdomain.com/$1      in all 100 files. What commands would I use to do this?


title: How to disable wifi autonegotiation on debian6.0

text: I would like to disable automatic wifi negotiation on my 1000HE eeepc. WiFi Chipset is a ralink2860sta. I am using the non-free module and everything is working as intended except it tends to pick up first available access point everytime I boot up. I have various ways to configure wlan0 in /etc/network/interfaces but whatever I set up I would like to prevent negotiation or essid setting up.


title: Search and replace in multiple files based on condition

text: I am porting a Visual Studio C++ project to Linux, and would like to find all lines in all .h and .cpp files that start with #include and in any of those lines would like to replace the backslash with the forward slash. There are a few scripts on how to do a search and replace online (using perl or sed for example), but none with a condition. What's the best way? Thanks


title: Compiz - making sure windows do not overlap

text: I'm using compiz and the grid plugin with 2 24" widescreen monitors to work emulating a tiling wm workflow. I have a dark wallpaper and use lilyterm for transparency. Most of my work is entirely constrained to a terminal, but of- course I like to have a browser open often (browsers and other desktop gui apps obviously don't support transparency). I want to make sure that only applications at the foreground are visually present in their tiling locations, and any other applications behind them don't count till they are activated. Is this possible with compiz ? or any other workaround for it ?


title: Making a duplicate of a path in Unix

text: My Unix vocabulary is failing me. I have 5 billion images in `/foo/live/images`. For the purposes of developing a new version of the app I'd like to make `/foo/dev/images` into a working path without making a copy of the images. Is this a soft link? What's the right term? What's the command-line syntax to create the link?


title: Globally stop editors from creating ~ files

text: Is there a global setting to prevent all text editors from creating backup files? I'm sick of changing it in 11 different places.


title: Deleting large number of files

text: I'm writing a script to delete large number of files in linux. The script will run every two minutes in crontab. I tried using the `find /mnt/md0/capture/DCN/ -maxdepth 1 -type f -name "*.pcap" -print0 | xargs -0 ls -lt | tail -$del | awk '{print $8}'` and saving this to a variable and tried to delete using `rm` command, but dint run. I have found out that `find . -type f -delete` can be used to delete the files, but I don't know how to add this part to my command. How would I do this?


title: Concept of 'mount point' while installing LINUX

text: While installing Linux, it asks for a 'mount point' selection. I gave it `/`, but I don't know the exact meaning and aim of this. Also, now I want to create one more mount point, `/home` in my machine with the already installed Linux with mount point `/`. Is it possible to do that from my current Linux install? If yes, what are the steps/commands? My understanding of 'mount point' is, when I need to preserve my `/home` contents in a safer way that it wont get deleted if my current Linux get corrupted. For example, by detaching and connecting the hard disk from the machine with corrupted Linux to a new Linux machine, I should get my `/home` content


title: ssh: define group of servers

text: I am using a script to connect to multiple servers. At the moment, I am using something like:               for SERVER in server1 server2 server3 ; do ssh $SERVER "my-command" ; done      I have to specify the (many) servers every time. I was wondering if there is a better way, for example if ssh has any possibility to define "groups of servers", so that I could refer to it as               for SERVER in $SERVERLIST ; do ssh $SERVER "my-command" ; done      or is this a bad idea, and should be done in bash instead?


title: Arch linux weird ram issues

text: I installed Arch linux (I have reinstalled it a couple of times, actually, in the past 3 months, just to get to know it better). My problem is, that I have 4GB RAM, and as soon as my free RAM hits 1GB (I have 3837MB RAM) and as soon as it hits exactly 1GB (like per MB, for example 2837MB and above) of free memory, my system starts to lag out. It becomes unresponsive for several minutes. As soon as I get it back above 1GB of free RAM, it suddenly becomes super responsive. It doesnt matter what programs I have opened. Problem happens even on a clean install. Extra info: >   * Arch linux (64BIT) the latest version >   * Have laptop Acer E1-572 >   * Ram DDR3 1GB (one stick, but have place for 2) > What I have tried: >   * checked physical ram condition (ram is fully working) >   * tried another ram from the store (the same problem) >   * changed swappiness to 1 and then 0 (the same result) > I cant figure out what the problem is. Like, 1GB should be plenty of space, right?


title: Using CSV line as command parameters

text: I have a CSV file like:               Name,Age,Address     Daniel Dvorkin,28,Some Address St. 1234     (... N ...)     Foo Bar,90,Other Address Av. 3210      And I have a command that take this parameters:               ./mycommand --name="Daniel Dvorkin" --age=28 --address="Some Address St. 1234"      What is the easiest way to run _mycommand_ for each line of the CSV?