OS: Centos 7.7
youtube-dl --version: 2020.03.24
Solution: pip install pycrypto
Other things installed before this that might also need installed.
- pip install crypto
- yum install pycrypto
- yum install python-crypto
This is a places that post walk throughs, my thoughts, notes, and writes-ups. Although they worked for me, ***USE AT YOUR OWN RISK***!
openssl verify -CAfile /var/www/html/pub/RHN-ORG-TRUSTED-SSL-CERT /etc/pki/spacewalk/jabberd/server.pem
yum spacewalk-utils spacewalk-hostname-rename x.x.x.x
hostnamectl set-hostname newservername
hostname newname vim /etc/sysconfig/network
hostname
rhn-ssl-tool --gen-ca --force rhn-ssl-tool --gen-server
rpm -ivh --force ~/ssl-build/spacewalk/rhn-org-httpd-ssl-key-pair-spacewalk-1.0-2.noarch.rpm
cp ~/ssl-build/rhn-org-trusted-ssl-cert-1.0-2.noarch.rpm /var/www/html/pub/ chown apache /var/www/html/pub/rhn-*
spacewalk-hostname-rename x.x.x.x
rpm -Uvh http://servername.domain.com/pub/rhn-org-trusted-ssl-cert-1.0-2.noarch.rpm --force
rhnreg_ks --serverUrl=https://servername.domain.com/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --activationkey=1-activationkeyname
echo "export LD_LIBRARY_PATH=" >> /root/.bashrc cat /root/.bashrc
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/MATLAB/MATLAB_Runtime/v81/runtime/glnxa64:/opt/MATLAB/MATLAB_Runtime/v81/bin/glnxa64:/opt/MATLAB/MATLAB_Runtime/v81/sys/os/glnxa64:/opt/MATLAB/MATLAB_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64/native_threads:/opt/MATLAB/MATLAB_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64/server:/opt/MATLAB/MATLAB_Runtime/v81/sys/java/jre/glnxa64/jre/lib/amd64:/opt/MATLAB/MATLAB_Runtime/v84/runtime/glnxa64:/opt/MATLAB/MATLAB_Runtime/v84/bin/glnxa64:/opt/MATLAB/MATLAB_Runtime/v84/sys/os/glnxa64:/opt/MATLAB/MATLAB_Runtime/v85/runtime/glnxa64:/opt/MATLAB/MATLAB_Runtime/v85/bin/glnxa64:/opt/MATLAB/MATLAB_Runtime/v85/sys/os/glnxa64" >> /home/matlab_user/.bashrc cat /home/matlab_user/.bashrc
net ads leave domain.local -U jsmith.adm No realm set, are we joined ?
net ads join domain.local -U jsmith.adm
libnet_join_ok: failed to get schannel session key from server dc.domain.local for domain DOMAIN. Error was NT_STATUS_NO_TRUST_SAM_ACCOUNT Failed to join domain: failed to verify domain membership after joining: No trusted SAM account
[root@box log]# tail sssd/krb5_child.log (Thu Sep 22 13:34:17 2016) [[sssd[krb5_child[4528]]]] [unpack_buffer] (0x2000): No old ccache (Thu Sep 22 13:34:17 2016) [[sssd[krb5_child[4528]]]] [unpack_buffer] (0x0100): ccname: [FILE:/tmp/krb5cc_569601190_XXXXXX] old_ccname: [not set] keytab: [/etc/krb5.keytab] (Thu Sep 22 13:34:17 2016) [[sssd[krb5_child[4528]]]] [check_use_fast] (0x0100): Not using FAST. (Thu Sep 22 13:34:17 2016) [[sssd[krb5_child[4528]]]] [check_parent_stat] (0x0020): Private directory can only be created below a directory belonging to root or to [569601190].
(Thu Sep 22 13:34:17 2016) [[sssd[krb5_child[4528]]]] [create_ccache_dir] (0x0010): Check the ownership and permissions of krb5_ccachedir: [/tmp].
(Thu Sep 22 13:34:17 2016) [[sssd[krb5_child[4528]]]] [k5c_precreate_ccache] (0x0040): ccache creation failed. (Thu Sep 22 13:34:17 2016) [[sssd[krb5_child[4528]]]] [k5c_ccache_setup] (0x0040): Cannot precreate ccache (Thu Sep 22 13:34:17 2016) [[sssd[krb5_child[4528]]]] [privileged_krb5_setup] (0x0020): k5c_ccache_setup failed. (Thu Sep 22 13:34:17 2016) [[sssd[krb5_child[4528]]]] [main] (0x0020): privileged_krb5_setup failed. (Thu Sep 22 13:34:17 2016) [[sssd[krb5_child[4528]]]] [main] (0x0020): krb5_child failed!
KRB5_TRACE=/dev/stdout kinit admin
yum groupinstall "Gnome Desktop"You need to install the epel repo. ****(The Next two lines may change if the version is not 7.8)****
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm rpm -ivh epel-release-7-8.noarch.rpm yum clean all yum repolistNext install VNC and XRDP
yum install tigervnc-server xrdp cp /etc/pam.d/sshd /etc/pam.d/xrdp-sesman systemctl restart xrdp systemctl enable xrdp cp /lib/systemd/system/vncserver\@.service /etc/systemd/system/vncserver@.serviceOrginal:
[Service] Type=forking # Clean any existing files in /tmp/.X11-unix environment ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' ExecStart=/usr/sbin/runuser -lI used the root account for testing. Use any account you would like.-c "/usr/bin/vncserver %i" PIDFile=/home/ /.vnc/%H%i.pid ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Service] Type=forking # Clean any existing files in /tmp/.X11-unix environment ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' ExecStart=/usr/sbin/runuser -l root -c "/usr/bin/vncserver %i -geometry 1280x1024" PIDFile=/root/.vnc/%H%i.pid ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'I did the above with sed:
sed -i 's/Reload the services-c/root -c/g' /etc/systemd/system/vncserver@.service sed -i 's/vncserver %i/vncserver %i -geometry 1280x1024/g' /etc/systemd/system/vncserver@.service sed -i 's/\/home\/ /\/root/g' /etc/systemd/system/vncserver@.service
systemctl daemon-reloadSet the VNC Password
vncpasswdStart the service and enable it on boot
systemctl start vncserver@:1.service systemctl enable vncserver@:1.service
#!/bin/bash
instance_list=$(aws ec2 describe-instances --filters Name=tag-value,Values="Enter-tag-value-here-no-quotes"| cut -f 8 | grep ^i-)
exclude_list=$(aws ec2 describe-instances --filters Name=tag-value,Values="Enter-tag-value-here-no-quotes"| cut -f 8 | grep ^i-)
while IFS= read -r instance_id
do
echo "Shutting down: $instance_id";
if [[ ${exclude_list[*]} =~ $instance_id ]]; then
echo "The instance must stay powered on";
else
status=$(aws ec2 describe-instances --instance-ids $instance_id | cut -f 3 | grep 'stopped\|stopping\|running\|pending')
if [ $status != "stopped" ];
then
aws ec2 stop-instances --instance-ids $instance_id
sleep 10
status=$(aws ec2 describe-instances --instance-ids $instance_id | cut -f 3 | grep 'stopped\|stopping\|running\|pending')
echo "The $instance_id is $status";
fi
fi
done <<< "$instance_list"
#!/bin/bash
instance_list=$(aws ec2 describe-instances --filters Name=tag-value,Values="Enter-tag-value-here-no-quotes" | cut -f 8 | grep ^i-)
while IFS= read -r instance_id
do
status=$(aws ec2 describe-instances --instance-ids $instance_id | cut -f 3 | grep 'stopped\|stopping\|running\|pending')
echo "The instance $instance_id is $status"
while [ "$status" != 'running' ];
do
aws ec2 start-instances --instance-ids $instance_id
sleep 10
status=$(aws ec2 describe-instances --instance-ids $instance_id | cut -f 3| grep 'stopped\|stopping\|running\|pending')
echo "The instance $instance_id is $status"
if [ "$status" == 'running' ]; then
echo "The $instance_id is $status"
break
fi
done
done <<< "$instance_list"
#!/bin/bash
instance_list="instance1
instance2"
while IFS= read -r instance_id
do
status=$(aws ec2 describe-instances --instance-ids $instance_id | cut -f 3 | grep stopped)
echo "The instance $instance_id is $status"
while [ "$status" != 'stopped' ];
do
aws ec2 stop-instances --instance-ids $instance_id
sleep 10
status=$(aws ec2 describe-instances --instance-ids $instance_id | cut -f 3| grep stopped)
echo "The instance $instance_id is $status"
if [ "$status" == 'stopped' ]; then
echo "The $instance_id is $status"
break
fi
done
done <<< "$instance_list"
#!/bin/bash
instance_list="instance1
instance2"
while IFS= read -r instance_id
do
status=$(aws ec2 describe-instances --instance-ids $instance_id | cut -f 3 | grep running)
echo "The instance $instance_id is $status"
while [ "$status" != 'running' ];
do
aws ec2 start-instances --instance-ids $instance_id
sleep 10
status=$(aws ec2 describe-instances --instance-ids $instance_id | cut -f 3| grep running)
echo "The instance $instance_id is $status"
if [ "$status" == 'running' ]; then
echo "The $instance_id is $status"
break
fi
done
done <<< "$instance_list"
tar xvf c_icap-x.x.x.tar.gz
cd c_icap-x.x.x
./configure --prefix=/usr/local/c-icap
make
make install
vim /usr/local/c-icap/etc/c-icap.conf
/usr/local/c-icap/bin/c-icap -N -D -d 10
# bin/bash
# c-icap: Start/Stop c-icap
# chkconfig: - 70 30
# description: c-icap is an implementation of an ICAP server.
# processname: c-icap
# pidfile: /var/run/c-icap/c-icap.pid
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network
CONFIG_FILE=/usr/local/c-icap/etc/c-icap.conf
PID_DIR=/var/run/c-icap
RETVAL=0
start() {
echo -n $"Starting c-icap: "
daemon /usr/local/c-icap/bin/c-icap -f $CONFIG_FILE
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/c-icap
return $RETVAL
}
stop() {
echo -n $"Stopping c-icap: "
killproc c-icap
rm -f /var/run/c-icap/c-icap.ctl
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $PID_DIR/c-icap.pid /var/lock/subsys/c-icap
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status c-icap
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
exit 1
esac
exit $?
/etc/rc.d/init.d/c-icap start
chkconfig --add c-icap
chkconfig c-icap on
tar xvf c_icap_modules-x.x.x.tar.gz
cd c_icap-x.x.x
./configure --with-c-icap=/usr/local/c-icap --prefix=/usr/local/c-icap
make
make install
vim /usr/local/c-icap/etc/c-icap.conf
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = DOMAIN.COM
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
[realms]
DOMAIN.COM = {
kdc = DC.DOMAIN.COM
admin_server = DC.DOMAIN.COM
kdc = x.x.x.x
}
[domain_realm]
.domain.com = DOMAIN.COM
domain.com = DOMAIN.COM
Again backup the config[global] workgroup = DOMAIN password server = x.x.x.x realm = DOMAIN.COM security = ADS winbind enum users = Yes winbind enum groups = Yes winbind use default domain = No winbind separator = + idmap config * : backend = autorid idmap config * : range = 1000000-19999999 idmap config * : rngesize = 1000000 template homedir= /home/%D/%U template shell = /bin/bash
passwd: files winbind group: files winbind shadow: files winbindAgain backup the config
server 1.1.1.1
auth required pam_env.so auth sufficient pam_unix.so try_first_pass auth requisite pam_succeed_if.so uid >= 500 quiet auth sufficient pam_sss.so use_first_pass auth sufficient pam_winbind.so use_first_pass auth required pam_deny.so account required pam_access.so account required pam_unix.so broken_shadow account sufficient pam_localuser.so account sufficient pam_succeed_if.so uid < 500 quiet account [default=bad success=ok user_unknown=ignore] pam_sss.so account [default=bad success=ok user_unknown=ignore] pam_winbind.so account required pam_permit.so password requisite pam_cracklib.so difok=4 dcredit=-2 ucredit=-2 ocredit=-2 lcredit=-2 minlen=12 retry=3 password sufficient pam_unix.so sha512 shadow try_first_pass use_authtok password sufficient pam_sss.so use_authtok password sufficient pam_winbind.so use_authtok password required pam_deny.so session optional pam_keyinit.so revoke session required pam_limits.so session optional pam_oddjob_mkhomedir.so skel=/etc/skel umask=0644 session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid session required pam_unix.so session optional pam_sss.so
auth required pam_sepermit.so auth include password-auth auth sufficient pam_winbind.so account required pam_nologin.so account include password-auth password include password-auth # pam_selinux.so close should be the first session rule session required pam_selinux.so close session required pam_loginuid.so # pam_selinux.so open should only be followed by sessions to be executed in the user context session required pam_selinux.so open env_params session optional pam_keyinit.so force revoke session include password-authEdit your /etc/hosts file
1.1.1.1 dc.server.centos.com dc
[root@node001 user1]# cat /etc/sudoers %BUILTIN\administrators ALL=(ALL) ALL %"domain admins" ALL=(ALL) ALL
[name]
name=Centos $releasever Base Updates 6.6
baseurl=ftp://*ip-of-the-computer*/pub/centos/6/6/base/x86_64 enable=1 gpgcheck=0 (this can be changed to 1 once the certs are installed on the system)
InitialSetupEnable=false
sudo yum install @Virt* sudo yum install kvm* sudo yum install libvirt*
sudo service libvertd restart
sudo chkconfig --list | grep libvirtd
sudo chkconfig libvrtd on
sudo virt-manager
lsmod | grep kvm
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.bak
DEVICE="eth0" HWADDR=XX:XX:XX:XX:XX:XX ONBOOT=yes BRIDGE=br0 NM_CONTROLLED=no
vim /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE="br0" TYPE=Bridge DELAY=0 ONBOOT="yes" BOOTPROTO=static IPADDR=X.X.X.X NETWMASK=X.X.X.X GATEWAY=X.X.X.X DNS1=X.X.X.X DNS2=X.X.X.X DOMAIN=test.local PEERNDS="yes" NM_CONTROLLED="no"
service network restart
brctl show
iptables -I FORWARD -m physdev --physdev-is-bridged -j ACCEPT service iptables save service iptables restart
net.bridge.bridge-nf-call-ip6tables = 0 net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-arptables = 0
sysctl -p /etc/sysctl.conf service libvirtd reload
chkconfig NetworkManager off
[GdmGreaterTheme]
Encoding=UTF-8
Greeter=circles.xml
Name=Circles
Description=Theme with blue circles
Author=James Smith
Copyright=(c) 2002 James Smith
Screenshot=screenshot.png
<group>Once created, run:
<id>groupidname</id>
<description>Description of what this group does</description>
<default>true</default>
<uservisible>yes</uservisible>
<packagelist>
<packagereq type="mandatory">What you want yum to search for </packagereq>
</packagelist>
</group>