×


Search For:


SMTP error 10051 How to resolve

This article will guide you on the causes and different methods to solve SMTP #error #10051 which occurs due to improper #SMTP authentication, ISP #firewall issues, #Antivirus on #PC, and so on. You can generally find your SMTP server address in the account or settings section of your mail client.) When you send an email, the SMTP server processes your email, decides which server to send the message to, and relays the message to that server.

To fix email not connecting to server:

1. Check your internet connection.

2. Check your SMTP server details.

3. Verify all usernames and passwords.

4. Check your SMTP server connection.

5. Change your SMTP port.

6. Control your antivirus or firewall settings.


How Chmod 777 works

This article will guide you on how to give #Chmod 777 to folders and files in #Linux. We also discussed the risks and more information about file permissions. 

If you are managing a Linux system, it is crucial to know how the Linux #permissions work.

You should never set 777 (rwxrwxrwx) permissions #files and #directories permissions. 777 means that anyone can do anything with those files.

To Give Root Privileges to a User in Linux:

1. Adding to Root Group using usermod. Let see how we can grant normal user root access by adding to root group.

2. Adding to #Root Group using Useradd Command.

3. Editing /etc/passwd file.

4. Setting as Sudo User.


Add User To Group in Linux

This article will guide you on how to add a #user to a #group in #Linux. The group permissions apply only to the group that has been assigned to the file or directory, they will not effect the actions of other users. The others permissions apply to all other users on the system, this is the permission group that you want to watch the most.

Groups can be thought of as levels of #privilege. A person who is part of a group can view or modify files belonging to that group, depending on the permissions of that file. User belonging to a group has privileges of that group, for example - sudo groups lets you run software as super user.

To view all groups present on the system simply open the /etc/group file. Each line in this file represents information for one group. Another option is to use the getent command which displays entries from #databases configured in /etc/nsswitch.


To Create a New Sudo User:

1. Log in to your server as the root user. #ssh root@server_ip_address.

2. Use the adduser command to add a new user to your system. Be sure to replace username with the user that you want to create.

3. Use the usermod command to add the user to the wheel group.

4. Test sudo access on new user account.


To List Users in Linux:

i. Get a List of All Users using the /etc/passwd File.

ii. Get a List of all Users using the getent Command.

iii. Check whether a user exists in the Linux system.

iv. System and Normal Users.


Vim Show Line Numbers in Linux

This article will guide you on how to show line numbers in #Vim. You can ask #nano to temporarily turn on line numbers by pressing Alt-C (meaning “Hold down the Alt key and the C key simultaneously”). This will show line and column numbers near the bottom of nano's window.

To Turn on absolute line numbering by default in vim:

1. Open vim configuration file ~/.vimrc.

2. Append set number.

3. Press the Esc key.

4. To save the config file, type :w and hit Enter key.

5. You can temporarily disable the absolute line numbers within vim session, type:/> :set nonumber.


Use the “:set number” command if you want to enable absolute line numbers; or “:set relativenumber” for relative Vi numbers.

If you want to turn off the line numbering, remember the command “set nonumber.”

When you have both absolute and, hybrid numbers enabled, you’ll have access to the hybrid mode!


How to tell if its a leap year with PHP

This article will guide you on how to work with PHP date() function to work out if the current year, or a specific year, is a leap year or not. 

JavaScript is the client side scripting language and PHP is the server side scripting language. In #PHP, HTML is used as a string in the code. In order to render it to the browser, we produce JavaScript code as a string in the PHP code.

PHP #program to check if a year is leap year or not:

php #function year_check($my_year) { if ($my_year % 400 == 0) print("It is a leap year"); if ($my_year % 4 == 0) print("It is a leap year"); else if ($my_year % 100 == 0) print("It is not a leap year"); else print("It is not a leap year"); } $my_year = 2024; year_check($my_year); ?>


Executing queries from the MySQL Command Line

This article will guide you on how to run queries from the 3MySQL command line. The MySQL #Command Line Tool is a useful way to run #queries from the command line. It’s easy to run select queries and display the results in either a horizontal or vertical format, and the queries run are kept in a history file which you can navigate through. 

If you don't want to run a particular query after all you can use the c command to clear it.

The most common way to get a list of the MySQL #databases is by using the mysql client to connect to the MySQL server and run the SHOW DATABASES command. If you haven't set a password for your MySQL user you can omit the -p switch.

To Connect to a MySQL Database:

1. Click Services tab.

2. Expand the Drivers node from the Database Explorer.

3. Enter User Name and Password.

4. Click OK to accept the credentials.

5. Click OK to accept the default schema.

6. Right-click the MySQL Database #URL in the Services window.