Jan 26

if you want to modify qmailadmin to check if new password is strong you can do like this:

edit qmailadmin.c and:

add:   #include <ctype.h>

I wrote a function to check if new password contains at least 1 alphachar and 1 digit.

add it before int main(argc,argv)

int check_strong(char *pass_string)
    int digit=0;
    int alpha=0;
    int length=strlen(pass_string);
    int i;
       if( digit == 1 && alpha == 1 ) return 1;
                  if(isdigit(pass_string[i])) digit=1;
                  if(isalpha(pass_string[i])) alpha=1;
    return 0;
Continue reading »

written by MG \\ tags: , , , ,

Jun 18

1. Place your Windows XP CD in your cd-rom and start your computer (it’s assumed here that your XP CD is bootable – as it should be – and that you have your bios set to boot from CD)

2. Keep your eye on the screen messages for booting to your cd Typically, it will be “Press any key to boot from cd”

3. Once you get in, the first screen will indicate that Setup is inspecting your system and loading files.

4. When you get to the Welcome to Setup screen, press ENTER to Setup Windows now

5. The Licensing Agreement comes next – Press F8 to accept it.

6. The next screen is the Setup screen which gives you the option to do a Repair.

It should read something like “If one of the following Windows XP installations is damaged, Setup can try to repair it”

Use the up and down arrow keys to select your XP installation (if you only have one, it should already be selected) and press R to begin the Repair process.

7. Let the Repair run. Setup will now check your disks and then start copying files which can take several minutes.

8. Shortly after the Copying Files stage, you will be required to reboot. (this will happen automatically – you will see a progress bar stating “Your computer will reboot in 15 seconds”

9. During the reboot, do not make the mistake of “pressing any key” to boot from the CD again! Setup will resume automatically with the standard billboard screens and you will notice Installing Windows is highlighted.

10. Keep your eye on the lower left hand side of the screen and when you see the Installing Devices progress bar, press SHIFT + F10. This is the security hole! A command console will now open up giving you the potential for wide access to your system.

11. At the prompt, type NUSRMGR.CPL and press Enter. Voila! You have just gained graphical access to your User Accounts in the Control Panel.

12. Now simply pick the account you need to change and remove or change your password as you prefer. If you want to log on without having to enter your new password, you can type control userpasswords2 at the prompt and choose to log on without being asked for password. After you’ve made your changes close the windows, exit the command box and continue on with the Repair (have your Product key handy).

13. Once the Repair is done, you will be able to log on with your new password (or without a password if you chose not to use one or if you chose not to be asked for a password). Your programs and personalized settings should remain intact.

written by MG \\ tags: , ,

May 19

Plesk disables the ‘root’ account when Plesk is installed. To get root privileges please login with the ‘admin’ username. The password is the same as the admin’s password in Plesk.

You can find it in /etc/psa/.psa.shadow.

written by MG \\ tags: ,

May 07

HOME_BASE=”/home/”  #set your home base directory
SHELL=”/bin/bash”  #set shell for users

#checking if you are root
if [ $(id -u) -eq 0 ]; then

read -p “Username:” USER
read -s -p “Password:” PASSWORD

egrep -w “^$USER” /etc/passwd >/dev/null
if [ $? -eq 0 ]; then
    echo -e “\n$USER exists!\n”
    exit 1
    PASS=$(perl -e ‘print crypt($ARGV[0], “password”)’ $PASSWORD)
    useradd -p ${PASS} -s $SHELL -m -d ${HOME_BASE}${USER} ${USER}
    [ $? -eq 0 ] && echo -e “\nUser has been added to system!\n” || echo -e “\nFailed to add a user!\n”

    echo -e “\nOnly root may add a user to the system\n”
    exit 2

save it like script.sh and run it with: ./script.sh

written by MG \\ tags: , , , ,

May 02

1. Connect to the switch via the console port and manually reboot the switch.
2. As soon as the power is applied, press and hold the Esc key.
3. At the command prompt, type “EmergencyPasswordReset” (case sensitive
w/o the quotation marks).
4. At the confirm (y/n) prompt, type “X” (upper case X – w/o the quotation marks)
5. If done properly, you will receive a message stating that the password
has been disabled.
6. Type G and hit enter to reboot the switch.
The default user is:root and the default password is:switch if it is necessary.

written by MG \\ tags: , , ,

Apr 11
  • 1. Stop the mysqld daemon process.
  • 2. Start the mysqld daemon process with the –skip-grant-tables option.
  • 3. Start the mysql client with the -u root option.
  • 4. Execute the UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE User=’root’;
  • 5. Execute the FLUSH PRIVILEGES; command.

These steps reset the password for the “root” account to “password”. To change the password for a different account, or to set a different password, just edit the variables in single-quotes in step 4.

If you know your existing MySQL root password, steps 1-3 are not necessary.


written by MG \\ tags: , ,

Dec 12

as root run:

#/home/vpopmail/bin/vpasswd postmaster@domain.xyz

written by MG \\ tags: , ,