วันอาทิตย์ที่ 22 ตุลาคม พ.ศ. 2566
วันพฤหัสบดีที่ 5 ตุลาคม พ.ศ. 2566
Docker
Docker
portainer
docker volume ls
docker volume rm [volume_name]
docker images
docker image rm
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
Guacamole
CREATE USER 'guacadmin'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT,INSERT,UPDATE,DELETE ON guacdb.* TO 'guacdmin'@'localhost';
วันจันทร์ที่ 11 กันยายน พ.ศ. 2566
SAP-TCODE
#Client
SAP* - 000,001 and 066
DDIC - 000 and 001
EARLYWATCH - 066
SCC4 - Client creation / maintenance
SCC5 - Client deletion
SCCL - local client copy
SCC9 - Remote client copy ECC DEV1 000 , ECC DEV2 800
SU01 - single user
SU10 - Bulk user
EWZ5 - Mass user lock
SUMM - user measurement
SM20 - user t-code log
RZ10 - Parameter session idle time, SMTP
RZ11 - Parameter (login/fails_to_session_end) Limit Logon Attempts
-role maximum of 14000
-profiles in a role is 312
-object in a role is 170
#Authorization
SU21 - Maintain Authorization Object
SU24 - Add Authorization Object
SU53 - Check fails / SU56 find
PFCG - maintain roles
SE93 - Create new t-code
#Background Jobs
SM36 - Create, Schedule, Reschedule
SM37 - Monitor a Background Job
RSBTCDEL2 - Delete a Background Job
STMS - Transport
#System
ST02 - Buffer and swap monitoring
ST06 - Monitoring of OS Resources CPU,RAM,HARD DISK
ST04 - Monitoring of Database
ST03 - Analysis of workload
USMM - System measurement (Audit)
smlg - define logon groups
SCU0 - compare
#Table (SE16)
T000 - A list of defined clients
TSTCT - Display transaction code text
USR02 - User IDs and passwords
USR40 - Store pattern of words which cannot be used as a password
TADIR - Object directory entries
TDEVC - Development classes and packages
E070 - Change request object lists
DEVACCESS - list of the users with development access
AGR_AGRS - Determining the single role that is assigned to a given composite role
Basic T-Code
SM04/AL08 − User log-in List
SM51 − Display Application Server
SM37 − Background Job Overview
SM50/SM66 − Manage Work Processes
SM12 − Mange Lock Entries
PFCG − Maintain Roles
SM13 − Manage Update Records
SM21 − Analyze System Log
SM02 − Send System Messages
วันจันทร์ที่ 21 สิงหาคม พ.ศ. 2566
Azure SSO App registration
Prevent users create Office 365 group
Prevent users create group (Office365 and Microsoft Teams)
1.Make Sure that install only AzureADPreview
Get-InstalledModule -Name "AzureAD*"
Uninstall-Module AzureAD
Uninstall-Module AzureADPreview
2.Install Module
Install-Module AzureADPreview
3.Import Module
Import-Module AzureADPreview
4. Connect username and pwd
Connect-AzureAD
5.Let check paramiter
(Get-AzureADDirectorySetting).Values
GroupCreationAllowedGroupId = null
EnableGroupCreation = True
6.Create Security Group on Office365
Get-AzureADGroup -SearchString "Client_Adm"
7.run_Script
$Setting = Get-AzureADDirectorySetting -Id (Get-AzureADDirectorySetting | where -Property DisplayName -Value "Group.Unified" -EQ).id
$Setting["EnableGroupCreation"] = $False
$Setting["GroupCreationAllowedGroupId"] = (Get-AzureADGroup -SearchString "Client_Adm").objectid
Set-AzureADDirectorySetting -Id (Get-AzureADDirectorySetting | where -Property DisplayName -Value "Group.Unified" -EQ).id -DirectorySetting $Setting
8.Let check
(Get-AzureADDirectorySetting).Values
=Revert=
https://blog.djurasovic.com/step-by-steps-instruction-how-to-disable-creation-of-office-365-groups/
วันอังคารที่ 6 มิถุนายน พ.ศ. 2566
Linux_Node-RED
Node-red: Install node-red on Ubuntu 20.04
Node-red: Open firewall port ufw allow 1880
sudo apt update Node-red:current version or set version curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
cat /etc/apt/sources.list.d/nodesource.list
sudo apt -y install nodejs Node-red: if error
sudo dpkg -i --force-overwrite
node -v
npm -v
sudo npm install -g --unsafe-perm node-red
node-red -v
Node-red: Upgrade for new version
sudo npm install -g --unsafe-perm node-red
**----------------------------------------------
Node-red admin: add new user for startup service
useradd -s /bin/bash -d /home/pm2/ -m -G sudo pm2
passwd pm2
su - pm2
Node-red admin: Installation
npm install -g --unsafe-perm node-red-admin
Node-red admin: get hash admin password
node-red admin hash-pw
Node-red admin: find config path (/home/pm2/.node-red/settings.js)
node-red --settings
CTRL+C Node-red admin: Build "admin" password:
sudo node-red admin hash-pw
Node-red admin: Edit config file from path
vi /home/pm2/.node-red/settings.js
Node-red admin: line adminAuth: and remove //
Node-red admin: Insert Certificate:
ค้นหา
//https: {
// key: require("fs").readFileSync('privkey.pem'),
// cert: require("fs").readFileSync('cert.pem')
//},
แก้เป็น
ค้นหา //requireHttps: true, แก้เป็น
**-----------------------------------------------
pm2: Install process management for node-red
su - pm2
sudo npm install -g pm2
pm2: Get path
which node-red
pm2: Create script for boot
vi app.json
[
{
"script" : "/usr/local/bin/node-red",
"name" : "node-red:1880"
},
{
"script" : "/usr/local/bin/node-red",
"args" : "/home/pm2/.node-red/api1.json -p 1881",
"name" : "node-red api1:1881"
},
{
"script" : "/usr/local/bin/node-red",
"args" : "/home/pm2/.node-red/api2.json -p 1882",
"name" : "node-red api2:1881"
}
]
pm2: run background process
pm2 start api.json -- -v
pm2: run background process
pm2 start /usr/local/bin/node-red -- -v
pm2: config start on boot
pm2 save pm2 startup pm2: copy & past
sudo env PATH=$PATH:/usr/bin /usr/local/lib/node_modules/pm2/bin/pm2 startup systemd -u pm2 --hp /home/pm2/
pm2 Stop/start Service:
pm2 list pm2 list --sort name:desc pm2 show 0
pm2 stop "all" pm2 start 0 pm2 restart 0 1
pm2 delete 1
pm2: view information
pm2 info node-red
pm2: Log install
pm2 install pm2-logrotate pm2 set pm2-logrotate:rotateInterval '00 00 * * 6' [every sunday 12.00 pm]
pm2 conf
pm2: Log read
pm2 logs node-red pm2 logs 0 pm2 flush
pm2 monit
sudo ps -ef | grep node-red
sudo lsof -i :1880e-red