alamise

Website URL:

change root pass en mod rescue

  • June 6, 2012
  • Published in Webmin

En mode “rescue”, connectez vous et tapez les commandes suivantes pour passer en root :

sudo su
(puis tapez le mot de passe donné par la console)

Ensuite, pour monter toutes vos partitions,

for i in `seq 1 9`; do mkdir /mnt/mnt$i; mount /dev/sda$i /mnt/mnt$i;done

Il y a des erreurs, c'est normal, ignorez les.

Dirigez vous dans vos partions montées et trouvez laquelle correspond à votre “vrai” /

cd /mnt/mnt1/
ls
cd /mnt/mnt2/
ls
cd /mnt/mnt3/
ls
cd /mnt/mnt4/
ls
cd /mnt/mnt5/
ls
cd /mnt/mnt6/
ls
cd /mnt/mnt7/
ls
cd /mnt/mnt8/
ls
cd /mnt/mnt9/
ls

etc…

Une fois votre “vrai” / trouvé, faites un

chroot /mnt/mntX
(avec X correspondant au numéro de partition où se trouve votre /)

Vous êtes maintenant “chrooté”. En gros, vous êtes sur votre serveur, avec vos fichiers, comme si il avait démarré normalement. Donc maintenant, il est possible de changer le mot de passe.

passwd

Et entrez votre nouveau mot de passe ;)

Une fois la manipulation terminée, tapez “exit” puis “reboot” et cliquez sur “Repasser en mode normal” depuis votre console degestion, pour redémarrer votre serveur. Votre mot de passe est celui défini précédemment.

 

bash: passwd: command not found

vi /etc/resolv.conf

name server 8.8.8.8

yum install passwd

passwd

 

 

    VMware vsphere center 【配置问题】主机的SSH已启用 感叹号

    • June 6, 2012
    • Published in vmware
    VMware HA 配置的时候,主机开始SSH的话会出现,主机前面出现感叹号,并且在主机的“摘要”出现“【配置问题】主机的SSH已启用 ”



    解决办法:
    1. VI连接到VC或者ESX服务器
    2. 在Home -> Inventory -> Hosts and Clusters里展开选中你的ESX服务器
    3. 右边选择Configuration,然后点击Software栏目里的Advanced Settings
    4. 在Advanced Settings里选择左边列表中的UserVars
    5. 选中左边列表中的UserVars后,在右边拖到最下面,将UserVars.SuppressShellWarning的值改为1即可,不需要重启。

      Virtualmin change host name

      • June 6, 2012
      • Published in Webmin

      you can do over ssh and type at the prompt: hostname something.domain.tld

      or webmin - networking - Network Configuration - Hostname and DNS Client and use the field: Hostname

        In-place upgrade from Windows Server WEB to Standard

        运行

         

         

        To determine the installed edition, run:
        DISM /online /Get-CurrentEdition

         

        To check the possible target editions, run:
        DISM /online /Get-TargetEditions

         

        Finally, to initiate an upgrade, run:
        DISM /online /Set-Edition: /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

         

        For example, to upgrade to Enterprise from a downlevel version, run:
        DISM /online /Set-Edition:ServerEnterprise /ProductKey:489J6-VHDMP-X63PK-3K798-CPX3Y

         

         DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXXXXXXXXXXXX




          How to disable IPV6 on centos 6.x

          The following procedure worked for me.

          1. Add the following lines in the files listed below:

          % vi /etc/modprobe.d/modprobe.conf

          options ipv6 disable=1
          alias net-pf-10 off
          alias ipv6 off
          install ipv6 /bin/true

          % vi /etc/sysconfig/network

          NETWORKING_IPV6=no
          IPV6INIT=no


          % vi /etc/sysconfig/network-scripts/ifcfg-ethx (x=0, 1, 2 …)

          IPV6INIT=no



          2. Disable ip6tables service

          chkconfig ip6tables off



          3. Reboot your system

          init 6 or reboot

          ---

          There is a step 4 at the website which mentions to rmmod ivp6, but I didn't need to do that.


          Referenced:
          http://mikent.wordpress.com/2012/02/04/how-to-disable-ipv6-on-redhat-6-x/

            Subscribe to this RSS feed
            Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 18

            Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

            Notice: Undefined offset: 2 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

            Notice: Undefined offset: 3 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

            Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/user.php on line 145

            Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 18

            Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

            Notice: Undefined offset: 2 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

            Notice: Undefined offset: 3 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34