17.08.2017

Bash Skript zum Erstellen von 70 xrdp Usern auf einem ubuntu Server

image

image


__

+ openssh server

sudo apt-get install xrdp

apt-get install net-tools

apt-get install openbox

apt-get install gedit

apt-get install kate


___


#/bin/bash
sudo adduser --disabled-password --gecos "" u001
echo 'u001:p' | sudo chpasswd
sudo adduser u001 xrdp
sudo adduser --disabled-password --gecos "" u002
echo 'u002:p' | sudo chpasswd
sudo adduser u002 xrdp
sudo adduser --disabled-password --gecos "" u003
echo 'u003:p' | sudo chpasswd
sudo adduser u003 xrdp
sudo adduser --disabled-password --gecos "" u004
echo 'u004:p' | sudo chpasswd
sudo adduser u004 xrdp
sudo adduser --disabled-password --gecos "" u005
echo 'u005:p' | sudo chpasswd
sudo adduser u005 xrdp
sudo adduser --disabled-password --gecos "" u006
echo 'u006:p' | sudo chpasswd
sudo adduser u006 xrdp
sudo adduser --disabled-password --gecos "" u007
echo 'u007:p' | sudo chpasswd
sudo adduser u007 xrdp
sudo adduser --disabled-password --gecos "" u008
echo 'u008:p' | sudo chpasswd
sudo adduser u008 xrdp
sudo adduser --disabled-password --gecos "" u009
echo 'u009:p' | sudo chpasswd
sudo adduser u009 xrdp
sudo adduser --disabled-password --gecos "" u010
echo 'u010:p' | sudo chpasswd
sudo adduser u010 xrdp
sudo adduser --disabled-password --gecos "" u011
echo 'u011:p' | sudo chpasswd
sudo adduser u011 xrdp
sudo adduser --disabled-password --gecos "" u012
echo 'u012:p' | sudo chpasswd
sudo adduser u012 xrdp
sudo adduser --disabled-password --gecos "" u013
echo 'u013:p' | sudo chpasswd
sudo adduser u013 xrdp
sudo adduser --disabled-password --gecos "" u014
echo 'u014:p' | sudo chpasswd
sudo adduser u014 xrdp
sudo adduser --disabled-password --gecos "" u015
echo 'u015:p' | sudo chpasswd
sudo adduser u015 xrdp
sudo adduser --disabled-password --gecos "" u016
echo 'u016:p' | sudo chpasswd
sudo adduser u016 xrdp
sudo adduser --disabled-password --gecos "" u017
echo 'u017:p' | sudo chpasswd
sudo adduser u017 xrdp
sudo adduser --disabled-password --gecos "" u018
echo 'u018:p' | sudo chpasswd
sudo adduser u018 xrdp
sudo adduser --disabled-password --gecos "" u019
echo 'u019:p' | sudo chpasswd
sudo adduser u019 xrdp
sudo adduser --disabled-password --gecos "" u020
echo 'u020:p' | sudo chpasswd
sudo adduser u020 xrdp
sudo adduser --disabled-password --gecos "" u021
echo 'u021:p' | sudo chpasswd
sudo adduser u021 xrdp
sudo adduser --disabled-password --gecos "" u022
echo 'u022:p' | sudo chpasswd
sudo adduser u022 xrdp
sudo adduser --disabled-password --gecos "" u023
echo 'u023:p' | sudo chpasswd
sudo adduser u023 xrdp
sudo adduser --disabled-password --gecos "" u024
echo 'u024:p' | sudo chpasswd
sudo adduser u024 xrdp
sudo adduser --disabled-password --gecos "" u025
echo 'u025:p' | sudo chpasswd
sudo adduser u025 xrdp
sudo adduser --disabled-password --gecos "" u026
echo 'u026:p' | sudo chpasswd
sudo adduser u026 xrdp
sudo adduser --disabled-password --gecos "" u027
echo 'u027:p' | sudo chpasswd
sudo adduser u027 xrdp
sudo adduser --disabled-password --gecos "" u028
echo 'u028:p' | sudo chpasswd
sudo adduser u028 xrdp
sudo adduser --disabled-password --gecos "" u029
echo 'u029:p' | sudo chpasswd
sudo adduser u029 xrdp
sudo adduser --disabled-password --gecos "" u030
echo 'u030:p' | sudo chpasswd
sudo adduser u030 xrdp
sudo adduser --disabled-password --gecos "" u031
echo 'u031:p' | sudo chpasswd
sudo adduser u031 xrdp
sudo adduser --disabled-password --gecos "" u032
echo 'u032:p' | sudo chpasswd
sudo adduser u032 xrdp
sudo adduser --disabled-password --gecos "" u033
echo 'u033:p' | sudo chpasswd
sudo adduser u033 xrdp
sudo adduser --disabled-password --gecos "" u034
echo 'u034:p' | sudo chpasswd
sudo adduser u034 xrdp
sudo adduser --disabled-password --gecos "" u035
echo 'u035:p' | sudo chpasswd
sudo adduser u035 xrdp
sudo adduser --disabled-password --gecos "" u036
echo 'u036:p' | sudo chpasswd
sudo adduser u036 xrdp
sudo adduser --disabled-password --gecos "" u037
echo 'u037:p' | sudo chpasswd
sudo adduser u037 xrdp
sudo adduser --disabled-password --gecos "" u038
echo 'u038:p' | sudo chpasswd
sudo adduser u038 xrdp
sudo adduser --disabled-password --gecos "" u039
echo 'u039:p' | sudo chpasswd
sudo adduser u039 xrdp
sudo adduser --disabled-password --gecos "" u040
echo 'u040:p' | sudo chpasswd
sudo adduser u040 xrdp
sudo adduser --disabled-password --gecos "" u041
echo 'u041:p' | sudo chpasswd
sudo adduser u041 xrdp
sudo adduser --disabled-password --gecos "" u042
echo 'u042:p' | sudo chpasswd
sudo adduser u042 xrdp
sudo adduser --disabled-password --gecos "" u043
echo 'u043:p' | sudo chpasswd
sudo adduser u043 xrdp
sudo adduser --disabled-password --gecos "" u044
echo 'u044:p' | sudo chpasswd
sudo adduser u044 xrdp
sudo adduser --disabled-password --gecos "" u045
echo 'u045:p' | sudo chpasswd
sudo adduser u045 xrdp
sudo adduser --disabled-password --gecos "" u046
echo 'u046:p' | sudo chpasswd
sudo adduser u046 xrdp
sudo adduser --disabled-password --gecos "" u047
echo 'u047:p' | sudo chpasswd
sudo adduser u047 xrdp
sudo adduser --disabled-password --gecos "" u048
echo 'u048:p' | sudo chpasswd
sudo adduser u048 xrdp
sudo adduser --disabled-password --gecos "" u049
echo 'u049:p' | sudo chpasswd
sudo adduser u049 xrdp
sudo adduser --disabled-password --gecos "" u050
echo 'u050:p' | sudo chpasswd
sudo adduser u050 xrdp
sudo adduser --disabled-password --gecos "" u051
echo 'u051:p' | sudo chpasswd
sudo adduser u051 xrdp
sudo adduser --disabled-password --gecos "" u052
echo 'u052:p' | sudo chpasswd
sudo adduser u052 xrdp
sudo adduser --disabled-password --gecos "" u053
echo 'u053:p' | sudo chpasswd
sudo adduser u053 xrdp
sudo adduser --disabled-password --gecos "" u054
echo 'u054:p' | sudo chpasswd
sudo adduser u054 xrdp
sudo adduser --disabled-password --gecos "" u055
echo 'u055:p' | sudo chpasswd
sudo adduser u055 xrdp
sudo adduser --disabled-password --gecos "" u056
echo 'u056:p' | sudo chpasswd
sudo adduser u056 xrdp
sudo adduser --disabled-password --gecos "" u057
echo 'u057:p' | sudo chpasswd
sudo adduser u057 xrdp
sudo adduser --disabled-password --gecos "" u058
echo 'u058:p' | sudo chpasswd
sudo adduser u058 xrdp
sudo adduser --disabled-password --gecos "" u059
echo 'u059:p' | sudo chpasswd
sudo adduser u059 xrdp
sudo adduser --disabled-password --gecos "" u060
echo 'u060:p' | sudo chpasswd
sudo adduser u060 xrdp
sudo adduser --disabled-password --gecos "" u061
echo 'u061:p' | sudo chpasswd
sudo adduser u061 xrdp
sudo adduser --disabled-password --gecos "" u062
echo 'u062:p' | sudo chpasswd
sudo adduser u062 xrdp
sudo adduser --disabled-password --gecos "" u063
echo 'u063:p' | sudo chpasswd
sudo adduser u063 xrdp
sudo adduser --disabled-password --gecos "" u064
echo 'u064:p' | sudo chpasswd
sudo adduser u064 xrdp
sudo adduser --disabled-password --gecos "" u065
echo 'u065:p' | sudo chpasswd
sudo adduser u065 xrdp
sudo adduser --disabled-password --gecos "" u066
echo 'u066:p' | sudo chpasswd
sudo adduser u066 xrdp
sudo adduser --disabled-password --gecos "" u067
echo 'u067:p' | sudo chpasswd
sudo adduser u067 xrdp
sudo adduser --disabled-password --gecos "" u068
echo 'u068:p' | sudo chpasswd
sudo adduser u068 xrdp
sudo adduser --disabled-password --gecos "" u069
echo 'u069:p' | sudo chpasswd
sudo adduser u069 xrdp
sudo adduser --disabled-password --gecos "" u070
echo 'u070:p' | sudo chpasswd
sudo adduser u070 xrdp
sudo adduser --disabled-password --gecos "" u071
echo 'u071:p' | sudo chpasswd
sudo adduser u071 xrdp
sudo adduser --disabled-password --gecos "" u072
echo 'u072:p' | sudo chpasswd
sudo adduser u072 xrdp
sudo adduser --disabled-password --gecos "" u073

18.05.2017

Setup Jenkins Server on Ubuntu 16.04

 

see: https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04

> wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
> echo deb http://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list
> sudo apt-get update
> sudo apt-get update
> sudo apt-get install jenkins
> sudo apt-get install maven
> sudo apt-get openjdk-8-jdk-headless

[solved/gelöst] Synology DSM 6 SSH key login + git

 

Synology 415+, SSH Aktiv, git Server installiert, weitere Voraussetzungen im Detail:

https://www.chainsawonatireswing.com/2012/01/15/ssh-into-your-synology-diskstation-with-ssh-keys/

image

Fehlermeldung: “Server refused our key”

Lösungsideen / Fehlerquellen:

  • /etc/ssh/sshd_config:
    #RSAAuthentication yes
    PubkeyAuthentication yes
    AuthorizedKeysFile .ssh/authorized_keys

 

  • Zugriffsrechte Datei .ssh/authorized_keys und Ordner .ssh
    > sudo chmod 700 .ssh
    > sudo chmod 644 .ssh/authorized_keys

 

  • Putty –Public-Key :
    image
  • Dateiinhalt authorized_keys: jeder Key vollständig nur in eine Zeile (keine Zeilenumbrüche)

… und es klappt immer noch nicht, dann

  • die Rechte der User-Ordner /var/services/homes/ prüfen. Bei Synology sind diese standardmässig auf “777” gesetzt - einfach auf 755 ändern
    > sudo chmod 755 uusseerr

    image

und TATAAA - es klappt !

16.05.2017

Servicemix + Camel + Activemq

 

 

Hawt.io Installation

feature:repo-add hawtio

feature:install hawtio

 

http://localhost:8181/hawtio/

Login: smx:smx , karaf:karaf

image

image

http://hawt.io/getstarted/

Install Karaf Webconsole

feature install webconsole

Default Login: karaf, Pass: karaf

http://localhost:8181/system/console 

image

Install ActiveMq WebConsole

feature install activemq-web-console

http://127.0.0.1:8181/activemqweb/index.jsp

image

 

Camel from File / Noop=true

http://camel.apache.org/file2.html

Gogo ServiceMix Web-Konsole

http://127.0.0.1:8181/gogo 

 

image

Java-Code

Simple File2File Route

from("file:data/in?noop=true").id("file-in")
                .log("Nachricht: ${body}")
       
        .to("file:data/out")
       
        ;

 

pom.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <groupId>de.predic8</groupId>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>vacation-camel</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>

    <name>Vacation ESB Sample Apache Camel</name>

    <properties>
        <camel.version>2.14.0</camel.version>
        <activemq-version>5.10.0</activemq-version>
        <hawtio.version>1.4.45</hawtio.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <targetJdk>1.8</targetJdk>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <gmaven.runtime>1.8</gmaven.runtime>
    </properties>

    <dependencies>

        <!-- Camel -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core</artifactId>
            <version>${camel.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring</artifactId>
            <version>${camel.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jetty</artifactId>
            <version>${camel.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-xmljson</artifactId>
            <version>${camel.version}</version>
        </dependency>

        <!-- hawt.io, jolokia -->
        <dependency>
            <groupId>org.jolokia</groupId>
            <artifactId>jolokia-core</artifactId>
            <version>1.2.3</version>
        </dependency>
        <dependency>
            <groupId>org.jolokia</groupId>
            <artifactId>jolokia-jvm</artifactId>
            <version>1.2.3</version>
        </dependency>   
        <dependency>
            <groupId>io.hawt</groupId>
            <artifactId>hawtio-embedded</artifactId>
            <version>${hawtio.version}</version>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.7</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.7</version>
        </dependency>

        <!-- ActiveMQ -->
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-camel</artifactId>
            <version>5.10.0</version>
        </dependency>
        <!-- Spring -->
        <!-- dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId>
            <version>3.2.8.RELEASE</version> </dependency> -->
    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>
        <finalName>WeatherMapping</finalName>
        <plugins>

            <plugin>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-maven-plugin</artifactId>
                <configuration>
                    <applicationContextUri>META-INF/spring/*.xml</applicationContextUri>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tomcat-maven-plugin</artifactId>
                <version>1.1</version>
                <configuration>
                    <server>myTomcat</server>
                    <url>http://localhost:8081</url>
                    <path>/weatherMapping</path>
                    <!--<warFile>target/${deploy.name}.war</warFile> -->
                </configuration>
            </plugin>

            <!-- Tomcat 7 Deployment -->
            <!-- mvn tomcat7:deploy -Dserver=localhost -Dport=8080 -->
            <!--mvn tomcat7:deploy -Dserver=217.31.84.148 -Dport=8081 -->
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <url>http://${server}:${port}/manager/text</url>
                    <path>/${deploy.name}</path>
                    <update>true</update>
                    <server>tomcatserver</server>
                    <username>admin</username>
                    <password>2grExP8q3WBRIqye</password>
                    <warFile>target/${deploy.name}.war</warFile>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generateTestStubs</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings
                    only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.codehaus.gmaven
                                        </groupId>
                                        <artifactId>
                                            gmaven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [1.4,)
                                        </versionRange>
                                        <goals>
                                            <goal>
                                                generateTestStubs
                                            </goal>
                                            <goal>testCompile</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>

 

WebLinks:

https://activemq.apache.org/web-console.html

http://marcelojabali.blogspot.de/2011/08/how-to-enable-activemq-web-console-on.html