リモートコンソール

xrdp のインストール

munakata@mvc:~$ sudo apt install -y xrdp

パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
以下の追加パッケージがインストールされます:
  xorgxrdp
提案パッケージ:
  guacamole xrdp-pulseaudio-installer
以下のパッケージが新たにインストールされます:
  xorgxrdp xrdp
アップグレード: 0 個、新規インストール: 2 個、削除: 0 個、保留: 0 個。
498 kB のアーカイブを取得する必要があります。
この操作後に追加で 3,303 kB のディスク容量が消費されます。

取得:1 http://jp.archive.ubuntu.com/ubuntu bionic/universe amd64 xorgxrdp amd64 0.9.5-2 [78.7 kB]
取得:2 http://jp.archive.ubuntu.com/ubuntu bionic/universe amd64 xrdp amd64 0.9.5-2 [419 kB]
498 kB を 3秒 で取得しました (165 kB/s)
以前に未選択のパッケージ xorgxrdp を選択しています。
(データベースを読み込んでいます ... 現在 240686 個のファイルとディレクトリがインストールされています。)
.../xorgxrdp_0.9.5-2_amd64.deb を展開する準備をしています ...
xorgxrdp (0.9.5-2) を展開しています...
以前に未選択のパッケージ xrdp を選択しています。
.../xrdp_0.9.5-2_amd64.deb を展開する準備をしています ...
xrdp (0.9.5-2) を展開しています...
xrdp (0.9.5-2) を設定しています ...

Generating 2048 bit rsa key...

ssl_gen_key_xrdp1 ok

saving to /etc/xrdp/rsakeys.ini

Created symlink /etc/systemd/system/multi-user.target.wants/xrdp-sesman.service → /lib/systemd/system/xrdp-sesman.service.
Created symlink /etc/systemd/system/multi-user.target.wants/xrdp.service → /lib/systemd/system/xrdp.service.
xorgxrdp (0.9.5-2) を設定しています ...
libc-bin (2.27-3ubuntu1) のトリガを処理しています ...
systemd (237-3ubuntu10.29) のトリガを処理しています ...
man-db (2.8.3-2ubuntu0.1) のトリガを処理しています ...
ureadahead (0.100.0-21) のトリガを処理しています ...

セッションタイプがXorgの場合はカーソルのバックグラウンドに黒い四角い領域が表示されてしまうので、new_cursorsを無効にする

munakata@mvc:~$ sudo sed -e 's/^new_cursors=true/new_cursors=false/g' -i /etc/xrdp/xrdp.ini
munakata@mvc:~$ sudo systemctl restart xrdp

Ubuntu向けにカスタマイズされた設定をロードする為に~/.xsessionrcにて以下の環境変数を設定

munakata@mvc:~$ cat .xsessionrc
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg

セッションタイプをXorgで接続した場合の認証を常に失敗させるルールを追加

munakata@mvc:~$ sudo cat /etc/polkit-1/localauthority/50-local.d/xrdp-color-manager.pkla
[Netowrkmanager]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device
ResultAny=no
ResultInactive=no
ResultActive=yes

munakata@mvc:~$ sudo systemctl restart polkit

Windows10 のリモートデスクトップ接続で接続する

Windows10 に Ultra VNC をインスト-ル

参考 URL

samba 設定最適化

Samba サーバーが見えない問題の解析(202008 追記)

[2020/08/08 14:55:09.602933,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)↲
1848   *****↲
1849 --↲
1850   Samba name server MMIT is now a local master browser for workgroup TEAMSPIRIT on subnet 192.168.11.78↲
1851 --↲
1852   *****↲
1853 [2020/08/08 14:56:43.625382,  0] ../source3/nmbd/nmbd_incomingdgrams.c:304(process_local_master_announce)↲
1854   process_local_master_announce: Server IDEAC510A at IP 192.168.11.28 is announcing itself as a local master browser for workgroup 
TEAMSPIRIT and we think we are master. Forcing election.↲
munakata@mvc:~$ ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000
    link/ether 04:92:26:5c:c3:15 brd ff:ff:ff:ff:ff:ff
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 04:92:26:5c:c3:15 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.26/24 brd 192.168.1.255 scope global noprefixroute br0
       valid_lft forever preferred_lft forever
    inet6 fe80::8024:bc4f:d6e5:c348/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:4a:b1:a9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:4a:b1:a9 brd ff:ff:ff:ff:ff:ff

Samba サーバーは見えるようになったが Login に失敗する問題の解析(202008 追記)

2020/08/15 時点での samba 設定

munakata@mvc:~$ cat /etc/samba/smb.conf
[global]
        dos charset = CP932
        unix charset = UTF-8
        workgroup = TEAMSPIRIT
        server string = %h server (Samba, Ubuntu)
        map to guest = Bad User
        obey pam restrictions = Yes
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        unix password sync = Yes
        log file = /var/log/samba/log.%m
        log level = 3
        max log size = 1000
        unix extensions = No
        dns proxy = No
        usershare allow guests = Yes
        usershare owner only = No
        panic action = /usr/share/samba/panic-action %d
        #idmap config * : backend = tdb
        lanman auth = No
        client NTLMv2 auth = Yes
        host msdfs = no
        #client max protocol = SMB3
        domain master = Yes
        local master = Yes
        preferred master = Yes
        os level = 20
[HDR_master]
        path = /mnt/dtv_master
        browsable =yes
        read only = No
        writable = yes
        guest ok = yes
        hosts allow = 192.168.1., 127.0.0.1
        hosts deny = ALL
        create mask=760
        force create mode=760
        directory mask=2775
        force directory mode=2775
        force group=munakata

[HDR_Slave]
        path = /mnt/dtv_slave
        browsable =yes
        read only = No
        writable = yes
        guest ok = yes
        hosts allow = 192.168.1., 127.0.0.1
        hosts deny = ALL
        create mask=760
        force create mode=760
        directory mask=2775
        force directory mode=2775
        force group=munakata

[HDR_Third]
        path = /mnt/dtv_recover
        browsable =yes
        read only = No
        writable = yes
        guest ok = yes
        hosts allow = 192.168.1., 127.0.0.1
        hosts deny = ALL
        create mask=760
        force create mode=760
        directory mask=2775
        force directory mode=2775
        force group=munakata

[HDR_Recipe]
        comment = magu's HDR space
        path = /mnt/dtv_recipe
        browsable =yes
        read only = No
        writable = yes
        guest ok = yes
        hosts allow = 192.168.1., 127.0.0.1
        hosts deny = ALL
        create mask=760
        force create mode=760
        directory mask=2775
        force directory mode=2775
        force group=munakata

[HDR_264]
        comment = magu's encoded video
        path = /mnt/dtv_h264
        read only = No
        guest ok = Yes
        force user = munakata
        force group = munakata
        hosts allow = 192.168.1., 127.0.0.1,
        hosts deny = ALL
        create mask=760
        force create mode=760
        directory mask=2775
        force directory mode=2775

[HDR_264B]
        comment = magu's encoded video2
        path = /mnt/dtv_h264B
        read only = No
        guest ok = Yes
        force user = munakata
        force group = munakata
        hosts allow = 192.168.1., 127.0.0.1,
        hosts deny = ALL
        create mask=760
        force create mode=760
        directory mask=2775
        force directory mode=2775

[winshare]
        comment = Ubuntu <-> Windows file exchange
        path = /mnt/raid_vol/home/munakata/winshare
        read only = No
        guest ok = Yes
        force user = munakata
        force group = munakata
        hosts allow = 192.168.1., 127.0.0.1,
        hosts deny = ALL
        create mask=760
        force create mode=760
        directory mask=2775
        force directory mode=2775

#[sharepoint]
#        comment = home_share_point
#        path = /raid_vol/smb_common
#        read only = No
#        guest ok = Yes
#        force user = munakata
#        force group = munakata
#        hosts allow = 192.168.1., 127.0.0.1
#        hosts deny = ALL

[yuko_music]
        comment = itune_backup
        path = /mnt/raid_vol/home/yuko/backup/
        read only = No
        browsable =yes
        guest ok = Yes
        force user = munakata
        force group = munakata
        create mask = 0755
        hosts allow = 192.168.1., 127.0.0.1
        hosts deny = ALL
        create mask=760
        force create mode=760
        directory mask=2775
        force directory mode=2775
        force group=munakata

#[magu_pc_backup]
#        comment = magu's windows PC backup
#        path = /raid_vol/var/muna-backup
#        valid users = munakata
#        read only = No
#        guest ok = Yes
#        force user = munakata
#        force group = munakata
#        hosts allow = 192.168.1.

#[hdaudio]
#        path = /raid_vol/home/munakata/hifiaudio
#        read only = No
#        guest ok = Yes
#        force user = munakata
#        force group = munakata

[peewee]
        comment = pee wee tree2
        path = /mnt/raid_vol/home/peewee
        valid users = munakata
        admin users = munakata
        write list = munakata
        force user = munakata
        force group = munakata
        read only = No
        browseable = No
        create mask = 0755
        hosts allow = 192.168.1.13, 192.168.1.10, 192.168.1.77
        hosts deny = ALL

#[peewee_vimage]
#        comment = DVD_RAW_image
#        path = /backup2/peewee/disk_image
#        valid users = munakata
#        force user = munakata
#        force group = munakata
#        read only = No
#        browseable = No
#        create mask = 0755
#        hosts allow = 192.168.1.13

Samba/CIFS の関係の解説

pukiwiki_sync

同期スクリプト

ローカル表示用 CSS (/var/www/html/pukiwiki/skin/pukiwiki.css.php)

Apache ログ解析(awstatus)

参考 URL


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS