Visual Studio: IIS Express

Visual Studio: IIS Express webserver

Documentation for IIS express:

%USERPROFILE%\Documents\IISExpress\config\application.host.config

<site name="Backend" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="D:\source\c5-backend-v09\c5backend" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:61000:localhost" />
    </bindings>
</site>

change to

<site name="Backend" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="D:\source\c5-backend-v09\c5backend" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:61000:*" />
    </bindings>
</site>

then

λ netsh http add urlacl url=http://*:61000/ user=everyone

What ?!?

Create SDDL failed, Error: 1332

A Google search gave an indirect answer.

It turns out the user-parameter need to be expressed in the OS locale.

That is with danish locale everone=alle so

λ netsh http add urlacl url=http://*:61000/ user=alle

URL reservation successfully added

Arch: sshd – authorized_keys

Debugging: No supported authentication methods available

# systemctl stop sshd && systemctl disable sshd
# /usr/bin/sshd -d

If you want to use your public keyfile from puttygen in the ssh-authorized_keys file you are looking for trouble.

[root@tsa]# /usr/bin/sshd -d
debug1: sshd version OpenSSH_6.7, OpenSSL 1.0.1l 15 Jan 2015
...
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.    
Failed publickey for root from 192.168.1.100 port 49393 ssh2: RSA f3:d4:90:c1:95:4d:b5:ce:9e:db:56:4a:84:79:15:43
Received disconnect from 192.168.1.100: 14: No supported authentication methods available [preauth]
...
debug1: do_cleanup
debug1: Killing privsep child 9921

Here is the reason

# cat .ssh/authorized_keys
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20150125"
AAAAB3NzaC1yc2EAAAABJQAAAQEAsKx3JfVH3D9aMdKTlwmsG6osXs3WN/aGXcAD
zKw0Wy8Bbou+/VWwXL+TR0IGIFoTSN6KYpw0K4bUCQWopdWlQAbV4+roe7gHcxzm
HLLPQDQvqAt7FZsv5u666/DDzpGbwwGniOARdBPEyWhVkKx1r5DE6jyDVNBgSDWh
eAXicW43ytbIZHx+xMcCb6zQ2U08UiOw8oUW6N2mUKJ/Shgk19WM4DqsHl8Yq8P5
61g109b2OdLJQw4MoKdjvJZFkf+g170goUo/mT8HesEYlEIHSpliwWLmb+kqv0lI
neYanV9cxiqKmeFxs4UgomCURobxGx3p2iNtaCHmRNTJHvIeSQ==
---- END SSH2 PUBLIC KEY ----

This is a no-go – not usable – authorized_keys does not contain LF. Copy/paste from inside puttygen to ssh-authorized_keys

# cat .ssh/autorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAsKx3JfVH3D9aMdKTlwmsG6osXs3WN/aGXcADzKw0Wy8Bbou+/VWwXL+TR0IGIFoTSN6KYpw0K4bUCQWopdWlQAbV4+roe7gHcxzmHLLPQDQvqAt7FZsv5u666/DDzpGbwwGniOARdBPEyWhVkKx1r5DE6jyDVNBgSDWheAXicW43ytbIZHx+xMcCb6zQ2U08UiOw8oUW6N2mUKJ/Shgk19WM4DqsHl8Yq8P561g109b2OdLJQw4MoKdjvJZFkf+g170goUo/mT8HesEYlEIHSpliwWLmb+kqv0lIneYanV9cxiqKmeFxs4UgomCURobxGx3p2iNtaCHmRNTJHvIeSQ== rsa-key-20150125

Output from /usr/bin/sshd -d

[root@tsa]# /usr/bin/sshd -d
debug1: sshd version OpenSSH_6.7, OpenSSL 1.0.1l 15 Jan 2015
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
...
debug1: trying public key file /root/.ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
debug1: matching key found: file /root/.ssh/authorized_keys, line 1 RSA f3:d4:90:c1:95:4d:b5:ce:9e:db:56:4a:84:79:15:43
...
debug1: trying public key file /root/.ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
debug1: matching key found: file /root/.ssh/authorized_keys, line 1 RSA f3:d4:90:c1:95:4d:b5:ce:9e:db:56:4a:84:79:15:43
debug1: restore_uid: 0/0
Accepted publickey for root from 192.168.1.100 port 49421 ssh2: RSA f3:d4:90:c1:95:4d:b5:ce:9e:db:56:4a:84:79:15:43
debug1: monitor_child_preauth: root has been authenticated by privileged process
...
Starting session: shell on pts/1 for fh from 192.168.1.100 port 49421
...
Closing connection to 192.168.1.100 port 49421

That’s better

# systemctl start sshd && systemctl enable sshd

Synology: Preserve your path

After DSM update ipkg/opkg stops working.

Always remember > Trust is good – verification is better

EDIT: apply to /root/.profile as well

Use your favorite ssh-client to connect to your diskstation as root

# ssh root@your-ds
# cp /etc/profile /etc/profile.org
# vi /etc/profile

If you mess up in vi Esc:q! and start again

Find the line reading

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin

Place the cursor under the first slash ‘/’ and press i to insert text.

Modify path according to your environment ipkg or opkg

PATH=opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin

PATH=/Apps/opt/bin:/Apps/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin

Press Esc to go back to command mode and then press uppercase Z twice to save and close vi.

For good measure – verify the changes you made

# cat /etc/profile

Activate the path modification by sourcing profile

# source /etc/profile

During the next DSM update your profile will probably be replaced by the update process and to prevent that you can make the file readonly by doing

# chmod 0444 /etc/profile[/code]

Bash: persistent path

Bash: preserving path

Edit ~/.profile

#ruby gems
#remember - : = security-breach
export PATH=$PATH:~/.gem/ruby/2.2.0/bin
#node_gyp fordrer python2
export PYTHON=/usr/bin/python2

Source your profile to use immidiately

source ~/.profile

Logout / Login to verify your path

echo $PATH
echo $PYTHON

Arch: My preferred packages

My preferred packages

archlinux

base 
base-devel

boot

gptfdisk
syslinux

workstation

xf86-video-intel
xorg-server 
xorg-server-utils 
xorg-xinit 
xorg-apps 
xorg-twm 
xorg-xclock 
xterm
xorg-xdm
xorg-server-xephyr
xfce4 
xfce4-goodies 
xfce4-settings
lightdm
firefox
chromium
abs
xfce4-whiskermenu-plugin
yajl   

Xorg :0 -configure

Keyring opdate

haveged
systemctl start haveged
systemctl enable haveged

pacman-key --init

antergos.mirrorlist
kopier /etc/pacman.d/mirrorlist => antergos.mirrorlist
edit antergos.mirrorlist

Server = http://mirrors.antergos.com/$repo/$arch

edit /etc/pacman.conf

[antergos]
SigLevel = TrustAll
Include = /etc/pacman.d/antergos.mirrorlist

antergos packages

numix-themes
numix-frost-themes
numix-icon-theme
numix-icon-theme-square

synaptics touch thinkpad labtop

xf86-input-synaptics

frosting

Indstillinger => Udseende => Numix Frost (Light)
Indstillinger => Udseende => Ikoner => Numix-Square
Indstillinger => Vindueshåndtering => Stil => Numix Frost (Light)
Skrivebordsbaggrund => noget andet end xfce-musen :)

download

mozilla firefox developer edition
oracle java
jetbrains webstorm
syntevo smartgit
aur package-query
aur yaourt

build and install package-query

makepkg -i

build and install yaourt

makepkg -i

install pacmatic

yaourt pacmatic

install virtualbox

pacmatic virtualbox virtualbox-guest-iso

Arch: Network Setup

Network setup

# ip addr

nic

# ip link set dev enp0s25 up

the easy way dhcp

# systemctl enable dhcpcd.service
# systemctl start dhcpcd.service

the manual setup

# systemctl stop dhcpcd.service
# systemctl disable dhcpcd.service
# ip addr add 192.168.x.y/24 broadcast 192.168.x.255 dev enp0s25
# ip route add via 192.168.x.1

remember dns

# nano /etc/resolv.conf                                          
nameserver v.x.y.z
search example.com

Arch: Install using TFTP

Local pxe installation

Remember – every action by YOU is YOUR responsibility – not mine.

Recommended reading

The following is my preferences

  • and therefore might not suit you – so change what ever you like, to fit your needs.

The approach is more than average geeky, and requires a local server to serve pxe-boot and fast internet connection, but you will benefit by getting an up2date killer-installation just as you prefer it.

You need at machine to serve as TFTP server. If you have Synology NAS you are in luck.

The machine you want to install must be able to boot from the network. This is a setting in BIOS.

When booted you must select an installation mirror. It makes sense to select a mirror in your neighborhood – or at least in your country

http://mirrors.dotsrc.org/archlinux/$repo/os/$arch

Above mirror is Ålborg University in Denmark so this works for me.

Wait while 250MB data is fetched …

Keyboard layout

# loadkeys dk

Get disk ready

remember backup – all my files is located at network-shares so this works for me.

# sgdisk --zap-all /dev/sdc
# reboot

The terminal font can be a pain (this one lacks danish accent chars æøå) but is good on my tired eyes

# setfont Lat2-Terminus16

This one has support for above mentioned accent chars

# setfont cp865-8x16

Partitioning

I run from a PCIe card with mSATA disk raid so my bootdrive is not the common choice. You will need to modify according to your actual setup

# cgdisk /dev/sdc

    sdc1 type 8200 name root filesystem ext4
    sdc2 type 8302 name home filesystem ext4
    sdc3 type 8300 name boot filesystem ext2

Create filesystems and mount them

# mkfs.ext4 /dev/sdc1
# mkfs.ext4 /dev/sdc2 
# mkfs.ext2 /dev/sdc3
# mount /dev/sdc1 /mnt
# mkdir /mnt/home
# mkdir /mnt/boot
# mount /dev/sdc2 /mnt/home
# mount /dev/sdc3 /mnt/boot
# lsblk -f

Base installation

# pacman -Syy                                                 
# pacstrap /mnt base base-devel
# genfstab -U -p /mnt >> /mnt/etc/fstab
# cat /mnt/etc/fstab
# arch-chroot /mnt /bin/bash

Locale

# echo LANG=da_DK.UTF-8 > /etc/locale.conf
# echo da_DK.UTF-8 UTF-8 > /etc/locale.gen
# locale-gen                                                  
# echo KEYMAP=dk > /etc/vconsole.conf            
# echo FONT=Lat2-Terminus16 >> /etc/vconsole.conf
# ln -s /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime  
# hwclock --systohc --utc

Network

# echo ts1 > /etc/hostname
# nano /etc/hosts

    127.0.0.1         localhost.localdomain    localhost
    127.0.1.1         sfinx
    192.168.10.200    sfinx.uex.lan sfinx

Info

# ip link
# ip addr

DHCP

# systemctl enable            

Boot-loader

# pacman -S gptfdisk syslinux
# syslinux-install_update -iam                      
# nano /boot/syslinux/syslinux.cfg

    ...
    LABEL arch
        ...
        APPEND root=/dev/sdc3 rw
        ...
    LABEL archfallback
        ...
        APPEND root=/dev/sdc3 rw
        ...

The raisin in the hotdog-end

# passwd                                            
# exit
# umount -R /mnt
# reboot

References

Beginners’ guide
Installation guide
General recommendations

Arch: XDMCP

XDMCP desktop over LAN

Install XDM, LightDM and a greeter

$ sudo pacman -S xorg-xdm lightdm lightdm-gtk-greeter

/etc/X11/xdm/Xaccess => remove # at beginning of line

#*                  #any host can get a login window    

/etc/X11/xdm/Xservers => insert # at beginning of line

:0 local /usr/bin/X :0

/etc/X11/xdm/xdm-config => insert ! at beginning of line

DisplayManager.requestPort: 0

/etc/lightdm/lightdm.conf => edit section [XDMCPServer]

[XDMCPServer]
enabled=true
port=177
#key=

su

$ su -l root
# xdm -config /etc/X11/xdm/xdm-config
# exit

Activate and start LightDM

$ sudo systemctl enable lightdm
$ sudo systemctl start lightdm

Install Xming on Windows.

I recommend the donation approach. These versions are much-much than community version.