Sunday, November 14, 2021

Day out with Sakshi Dahiya (2021-Nov-10)



Index of Journals

Leaving Mobileum and Uniting with mom (2018)



Index of Journals
My relationship with my mother (whom I call mom now) is broken, shattered, unreal, and super-complicated.

The credit for it goes to my mom, my late dad and paternal side of the family.

Everyone in the family calls mom by her name and everyone in the family used to call dad by his name. When I say everyone, I mean everyone, including the kids.

Manju bua particularly holds strong negative feelings for mom. She holds a lot of grudges that she at times would talk about.

All of what it had been, how it had been, the way it had been was going to change in the summers of 2018.

I along with a lot others was fired from my Software Engineer job at Mobileum, Gurugram with a 45 days notice period.
The world turns upside down at such times and that's exactly what happened with me.

I was living in a rental accommodation in Gurugram / Gurgaon near office at that time.

I had not been in touch with Rekha bua and my sister Anu but in these low times there was some futile communication between us. They suggested that I stay here in my rental room for the time till I have paid the amount.
That meant current month and the notice period of one month. The tenor refused to pay back the security and told me that it was rent for the notice period.

What Rekha bua and Anu were saying was that I should stay in Gurugram for 45 days or till possible and focus on finding a new job.

I decided to take a completely different route that was going to change my life forever. I came to Tri Nagar.

When Rekha bua learnt about it, she said "tu wahaa narak mei kyu chalaa gayaa, woh jagah toh narak hai".
Meaning: Why have you gone to thay hellish place? That place is hell.
She said, "Do you know Hem chacha lives there?"

But I had read a lot of self-help books on variety of topics and I was very confident that I should have no problem in Tri Nagar and in dealing with my mother.

And hence I packed my things, sold off bicycle and desert cooler to come to Tri Nagar, to my mother's place.

Saturday, November 13, 2021

Packaged Food (2021-Nov-13)



Friday, November 12, 2021

A Trivial Use Case of Python Logging Package



import logging
import pandas as pd
from time import time 

# create logger

logger = logging.getLogger('mylogger')
logger.setLevel(logging.DEBUG)

# create formatter
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')

# create file handler which logs even debug messages
log_file_name = pd.Timestamp('today').strftime('%Y-%m-%d') + "_" + str(round(time())) + ".log"

fh = logging.FileHandler(log_file_name)
fh.setLevel(logging.DEBUG)
fh.setFormatter(formatter) # Add formatter to the handlers
logger.addHandler(fh) # add the handlers to the logger

logger.info("Info logged.")
logger.debug("Debugging log.") 

Output:

File: 2021-11-11_1636609628.log
2021-11-11 11:17:08,174 - mylogger - INFO - Info logged.

File: 2021-11-12_1636688151.log
2021-11-12 09:05:50,813 - mylogger - INFO - Info logged.
2021-11-12 09:05:50,813 - mylogger - DEBUG - Debugging log.

Tuesday, November 9, 2021

Two ways to get Frequency Based Order of Categorical Data (Python)



Python Code:

import pandas as pd
from collections import Counter
df = pd.read_csv('sales_data_sample.csv')
df[['COUNTRY', 'PRODUCTLINE']] 

df[['COUNTRY']].value_counts()
list(df[['COUNTRY']].value_counts().index)
df[['PRODUCTLINE']].value_counts()
cnt_country = Counter(df['COUNTRY'])
cnt_country.most_common()
cnt_productline = Counter(df['PRODUCTLINE'])

Sunday, November 7, 2021

2011-Apr-07



Index of Journals
April 7, 2011

Srishti is so irritating, I can’t remember when it happened last time when I had gone to her and didn’t return with irritated psyche. I was in drawing room when I thought maybe I could just make her check university website for a second but this slut started bitching around, giving reasons, and explaining her problems with the world.

I had to do DCS yesterday but I had messed up with time table again. I am not doing DCS and I will do it only in days of exams. 
I had used my phone for 6 hours total, and 2 hours outgoing. That’s pretty much a figure.

Had I got one more back in III semester result I’d have crash landed in depression again. On the internet Ravi seemed to be joking with me over my poor results, is that true, can people change their character with good and bad times?

I don’t understand how come I tend to fail in subject I like the most. I would make myself love Physics I would fail in Physics, I would make myself love Math I would fail in math, I would love Algorithms Design and Analysis I would fail in ADA, and yesterday I learned that I failed in DS and math, the subjects I, from the heart, wanted to do good in.

God bless me
Ashish

2011-Apr-06 (Results of Third Semester)



Index of Journals
April 6, 2011

The passing marks are 50. 

35, 50*, 50*, 50, 57 and 38; these are my marks. God, you don’t call that a result! 

I was expecting back in Math but not in Data Structures. Okay, I was not sure if I was getting one back or two backs but DS; I wasn’t expecting. Internal marks of Analog Electronics helped, I passed with grace marks. Even marks in Object Oriented Programming are very less, and the highest among what I got. I was shocked when I saw the result, I was half sleep, and suddenly I was awake in the chair I was sitting.

I had gone out to dress for cyber-café to get the previous years' question papers of II term. Then I noticed chachaji wasn’t there and I downloaded the result first, which I had discovered just then. I was deep shock. (Prashant sent amma to make me shut the laptop because it is for office work of chachaji, I couldn’t have paid attention to that amid what had happened).

I got call from Sonam, I am glad; she will be helpful in coming times to me. I will need her. I went to cyber-café and downloaded question papers. I wanted to abuse Shruti B and Raj Dhan for talking crap in the CS1E group but I just couldn’t speak. 

20 credits, none got credits lesser than that, except Roshan (16) and Mukul (4, all from practical). The thing is Mukul got more marks than me in Data Structures, but ultimately both of us failed. 

I was snoozing through the day with OS book. I needed to see the question papers to see what kinds of questions are asked in the exam.
I am not writing Rekha buaji a letter, I don’t know, maybe I would, I am better dead.
God bless me
Ashish

2011-Apr-05



Index of Journals
April 5, 2011

I had to finish Communication Systems last night but then I overslept. Then I had doubts about syllabus, the book contains too much and lecture plan has nothing written there. I called Vibha and Nishant for this purpose in the morning. Both came up of good avail. Nishant has been real nice to me whenever I found myself most lonely among the fifty filthy classmates. 

For the breakfast chachi made Uttapam. I wondered if I would be sleeping through the day after eating that. I was sleeping in the afternoon but by 2000 I was over with Communication Systems. 

Last year chachi and chacha had been adamant about using mosquito nets but this year (when it is time for Prashant to sit for ‘Holy exam’) there are three mosquito vaporizers in the room. Lately I studied this idiot a bit and now I know his habits and patterns. So I am little comfortable at home. 

There was a spider of the size of a wheat bead on the bed circling near pillow since last night. I then instinctively closed it in the book, killing it. I had killed a black-bug-like spider with charger last year. Jains don’t do that, I was very guilty, and today again. 

Result is still waiting to come. I am worried, I have to write to US and I wish I give them good news. I don’t know why I am linking the two incidents? The day when Rekha buaji had talked to me on phone, her tone had been very arrogant, very proud, like she scored a point over me, or like she owed me something I can’t live without. She told amma that Rashmi got first position out 500 others. She didn’t mean to put her overall result in the form of ratio, because that is anyhow not possible for US. First of all, there are no people in that country in comparison to India; second of all, the most universities there have very large number of seats, much larger than the intake. In IITs the competition has gone as bad as 1.4 for every 100, then which exam and in which part of Earth did Rashmi sit for a test where they chose 1 from every 500? That’s bullshit; buaji lied to her uneducated mother.

God bless me	
Ashish 

2011-Apr-04



Index of Journals
April 4, 2011

I went to college early. On my way to college near Shastri park red light I saw Jain Muni arriving from there. He was leaded by musicians and band group singing through his way. At first, I thought may be its crowd from some wedding. But then I saw Him. I got an adrenaline rush, great thoughts of doing something big like our religious gurus. 

I reached classroom at 0740. Around eight, Operating Systerm teacher (Megha) came to see the class and asked about today’s plans of the class. I told her that students would be coming, and there would be crowd by the time it is her lecture at nine. When she had entered the classroom I was nearly sleeping perusing through SE textbook, cross-legged in teacher’s chair under fan. As I saw her I got blinked to wake up and conversation started.

Priti Verma ma’am hadn’t come today. OS teacher started with asking questions and I had to stand in the questionnaire, though I had little idea of answers of few questions but not the answers. She asked if I knew of anything asked, I said I needed to revise the topic. Then she asked which topic I have prepared so far, I said I needed to start her subject. She just spared me because she saw me with SE textbook right in the morning, huh.

After this there was Digital Circuits and Systems lab and I wrote and performed the practical right away to get an early leave. But Neeru ma’am kept playing with words, flirting, smiling. She had in mind to not let me go. So I called Sonam to the lab. I had been after Nitish since the beginning of the period to make him work on the project. Since morning till OS lecture I had been after Sonam to discuss about project. She had already started to ignore me. Nitish was thinking of making Sonam and Parul do all the work. Sonam was thinking of making me, Nitish and Parul do all the work. I had not been able to contact Parul very closely this far, she has been avoiding me ever since, stupid dick. Here Sonam, Nitish and I sat to work together for awhile. We began with me taking charges of copying the problem statement from somewhere on the internet. Dhanraj came with Sonam to make fun over here. Why did she bring this stupid with her? I wrote the problem statement taking two hours of my time, and these people instead of appreciating effort made by me, were leading everyone into dark. Finally we came up with rough ERD’s and Use Case diagrams. Sonam settled for ERD’s and 2-level DFD, Nitish settled for Use case diagram, and we decided to that Parul would make 0 level and 1 level DFD’s. After lab we checked the date sheet for second terminals, went to collect Vibha’s, Nitish’s, Irfan’s, and my ADA lab file. Prashant sir had given good marks above my expectations even in experiments submitted late. Then we (Vibha, Sonam, and I) went to canteen I offered to buy. Sonam took cold drink, Vibha was not in the mood to eat or drink. I got myself the same drink Limca as Sonam’s and bought Samosa for Vibha, which she didn’t eat. At the time when we were talking I saw canteen workers keeping an eye open on me. That was sad, but I didn’t mind because it is not my first time. 

I forgot to buy previous year’s terminal papers again, I called Ravi for help and he said check Facebook for Vibha’s link, which would be helpful. 
Results not out yet, I am worried.
God bless me
Ashish

2011-Apr-03



Index of Journals
April 3, 2011

Last night India won the match and there were celebrations everywhere.

In the morning, I went to amma’s bathroom to brush and I had a fight with Anu right after. I came here by over looking chachaji who came in the morning when I was still asleep. I just wanted to brush but anu pulled the situation into a fight. She was about to bath and I wanted to bath too, I was letting her bath first, but I was brushing before she would come to bath after fixing the cloth in her hand. She came into the bathroom and became violent with running hands, scratching my arm, pulling my clothes, and then used her slippers to hit me. I am glad she could not turn me up even after crossing her limits. Moral of the story is that you have to be violent right from the beginning to win over a discussion, just that other person should not hit you back harder.

I was sleeping through the day, or studying CS, just now I wrote the problem statement for SE project on ‘Electronic Voting System’ suggested by me.

I had been to amma’s room to ask for the procedure of voting and she was on phone then. She then pulled me on the phone to talk to Rekha buaji, goddamn it! She asked how is it going here and then when I said everything here is fine, she said she was asking about college. Then she handed the phone to Sameer and the stupid woman followed her mother irritating me. Why was he talking about cricket when they do not even have it there? He told me that he watched it on camera, and when I told him that they play cricket in China he cracked somebody else’s joke from behind, “we would go to China also”. What was that! We had already shared great moments of silence in this little conversation and then I had to pass phone to amma to prevent myself from saying anything rough. 

Chachi came and lectured me over turning on ‘All-Out’ early in the evening, after listening to her bullshit, I just said talk to amma, and I was just doing what was logical by switching All-Out ‘on’ before sleep. 

Why are these women even alive? Okay, to be polite, why do I have to know these women?

In the morning, I was just hiding my x-rated content in net book right after brushing my teeth and chachaji called me to see my computer. Huh, I was a lucky for having the right idea of this asshole’s moves.

God bless me
Ashish 

2011-Apr-02



Index of Journals
April 2, 2011
It is world cup final today. I am just watching it and waiting for our team to win. I can’t think what to write. I will have to start over again. Four runs from eleven balls.

I went to college to collect attendance. First lecture was of DCS, second was of SE, and last the third was of CG. Because the class was going (probably) to bunk his periods so he came for a minute to see what people were in the class today before the start of SE period. Gaurav Sati had commented on this and sir stood him up. Though, he wasn’t insulted as sir would do to others on regular days. Sir was in good mood today. I was sitting on the bench in the last row leaving the last and the third bench filled in SE class. I was taking down notes, after about half the period teacher wished to see my notebook and then she seated me on the first bench of the first row. Apurva Sood was ogling at me after this, which made me feel kind of proud. Basically no student likes the attention I get from the teachers, whether good or bad, but it is me who steals the show. Priti ma’am before getting over with one hour left us the gift. She said, “the last chance for the A batch students to make a comeback is by submitting the project, assignment, and manual on 20th April. And that was for both the batches. I am thankful to her seriously. Wish I never get into wrong situation with her ever again.

In the CG class, sir stood Aditya up and in the process Varun joined from his side to keep sir away. Varun put over the whole blame for what happened onto me. He said it was only because of one student that whole class had to attend to the lecture. While he was speaking to the teacher he referred to me as ‘the one person because of whom this and that’. I chose not to interrupt, when sir stood me after listening to Varun and listening to Aditya. He just told me that I should walk in the line, and that yesterday I just pushed others in the ‘pit’ while preventing myself from falling. By ‘pit’ he meant his lecture. Sir increased the attendance of students by one, one. That was good, I didn’t seem to have any problem with teacher unlike how I was expecting yesterday after he threw me out. Rather I felt that good mood of teacher helped, and then when sir learnt that he threw the one student out who was responsible for holding the class lecture, he must be impressed. Students should have been thanking me unlike how they were making fun of me, especially Rizwan, Nishant, Apurv, Gaurav, Apurva, and many others.

I finished completing the DCS lab file till fifth experiment and went to get it checked. There I saw Jyotsana ma’am talk on phone while roaming in the open area outside teachers’ cabin. I was waiting there until Neeru ma’am checks my file. Then I again saw her watching me when I was going back after collecting the file. Well, I didn’t steal away the eyes, but I can tell that teacher must be uncomfortable now. I can tell from my own experience that sight of such men is not a very pleasant thing rather women feel insecure if they hold someone’s attention unnecessarily for a pretty long duration. I would advice men to avoid such mute (though deep) confrontations with women. And, she is a senior teacher and has a pretty face.

Looking at my flow Aditya tells me that ten years later from now I would be in the newspaper from doing something really big, or I would be in jail. I tell him that ‘yes’ he is correct and he would see me on international page specifically.

I can’t follow any schedule, or planning because I share room with a f**king idiot with whom I have no sort of communication and fixing the time to put off light is not just a feasible idea, and then for sleeping one needs not just the lights off but also proper air, and decorum. 

I deleted phone content when I did it master-reset to see internet on my phone does work. Well, internet didn’t work but I just lost all notes and everything. 

I fixed 5k mark of my balance on Thursday. It is a landmark. 

I talked to Sonam about project and looks like the work will start soon on Electronic voting machine’s internal software. When Priti ma’am said no to any of the ‘management-type’ project I asked Parul for a new topic and she said that I should discuss it with Sonam and then tell her. In the evening I called Nitish and he wasn’t picking up the phone. I decided to get this project a descent start by myself, because even Sonam was unavailable for communication when I had called her. But later she texted and I called to reply, that fine by me. Now, on Monday I have to give them the problem statement.

God bless me
Ashis 

2011-Apr-01 (Reservation status in college)



Index of Journals
April 1, 2011

Surveillance is still on; there was cop near bus stop even today. The cop waved at conductor and then the driver had been checking me out today. What is happening here?

Internet of my phone has stopped working. I don’t know whose fault is it but I call Vodafone care and try to get it repaired. They don’t seem to helping me out. I can’t connect to internet and now I will get information of result-release on phone from friends, god. I don’t want that.

I was the best the college had during the 2009 admissions. God, Nishant and Apurv disclosed this thing to me in the library after college today. The A batch consists of students from quota (Defense, SC/ST) the batch ends with Roll numbers of Nitish and then I. Vibha is from defense quota, Faizan is from SC/ST, Irfan is defense again, now it is Nitish on students have a doubt. Well he himself claims to be 3800 rank (I was 3903 rank) but Nishant said he is from defense. Whatever, it is crazy that I was the second and then a year-back case and since then it has been down. I will get the desired respect back.

I didn’t have to sleep last night. I could have finished the Digital Circuits and Systems work. In the Computer Graphics period the class was going on mass bunk but I held the class to happen. Before class had even begun I just called Ravi at the door referring to him as ‘oye’ in very loud call. Sir threw me out for this little thing. When I was leaving he saw my smiling face and then held me to insult. He told me to face the class; I wanted to kick his ass. I stood for a second to do that and then watched him to hear what he has got. But, he would then again tell to face the class. I stepped back to stand on podium now he would tell to step down. ‘Face the class’, he again said. I looked in his face, stepped back to the exit saying ‘this is bullshit’ in his face. I was unhappy for doing this. I had to copy DCS assignment after this and I coped even name and roll number of Srishti Jain. Come on, I can’t do that. I held the class and then I was being thrown out, Apurva said she was happy to see that. 

Apurva Sood seems to be going after Aditya Mohan. It appears to be that case.

Prashant sir didn’t check lab files in the class. He just delivered lecture on mass-bunk, irregularity of students towards work. I was not involved.

In DCS lecture I was preparing lab file on the last seat but then teacher called my roll call to stop me. I didn’t dare to disobey her. She could have thrown me out of the class. I need attendance.

College detained students with attendance lesser than 20% last terminal and this terminal it is expected to increase.

God bless me
Ashish 

Thursday, November 4, 2021

Chapter 7 - My Class Teachers at Ahlcon



Index of Journals
My fifth standard class teacher was Ms. I do not remember her name. However, she used to teach Hindi. 

My sixth standard class teacher was Ms. Devina. She was the best teacher I remember from my school life. She was an English teacher. 

My seventh standard class teacher was Annapurna. She was the one who made my life real hell in early days of my school life. She used to teach chemistry.

My eighth standard class teacher was Ms. Sapna Sareen. She was good but I never used to like her until she was my teacher. She was Math teacher.

My ninth standard class teacher was Ms. Snehlata. I used to love her too. She was also our class teacher in tenth standard. She was Hindi teacher. 

In eleventh and twelfth Jagdish sir was our class teacher. He was a real mess for me. I had held a sort of disliking for him, which was in me even after some years. He had taught us C++.

Mr. Zutshi: 'good for nothing' was his description after what he did for name sake
- photography, teaches yoga, entertains in assembly, "Chiki-Chiki-boom-boom" was his line that he used to repeat over and over in different ways and energy levels
- went to jail for short periods like half to full week when school would be in legal cases for the stretch of the ground
- elder of the two daughters was just a typical spoilt girl, one year senior to my sister Srishti
- both were studying in school without paying fees

Gurarchi was my classmate from fifth to eighth and then again in high school. She went into the A section for Hindi as a subject in Ninth, I went into B for taking Hindi. There were five sections in Ninth, off which A, B, C were for Hindi, and D, E were for Sanskrit. A section had Praful, Aishwarya (Kumar) from my previous year classmates.

Sunday, October 31, 2021

Pentaho and PostgreSQL Installation on Ubuntu (2021 Oct)



URL to download Pentaho Community Edition: https://sourceforge.net/projects/pentaho/
    
Unzip the downloaded .zip file using the command: $ unzip xyx.zip When you would try to run 'spoon.sh' for the first time, you might see this WARNING: (base) ashish@ashish-VirtualBox:~/Downloads/pdi-ce-9.2.0.0-290/data-integration$ source spoon.sh   ####################################################################### WARNING: no libwebkitgtk-1.0 detected, some features will be unavailable Consider installing the package with apt-get or yum. e.g. 'sudo apt-get install libwebkitgtk-1.0-0' ####################################################################### Gtk-Message: 13:35:00.303: Failed to load module "canberra-gtk-module" 13:35:05,128 INFO [KarafBoot] Checking to see if org.pentaho.clean.karaf.cache is enabled 13:35:05,510 INFO [KarafInstance] ******************************************************************************* *** Karaf Instance Number: 1 at /home/ashish/Downloads/pdi-ce-9.2.0.0-290/d *** *** ata-integration/./system/karaf/caches/spoon/data-1 *** *** Karaf Port:8802 *** *** OSGI Service Port:9051 ----- ----- -----

ERROR IN INSTALLATION OF: libwebkitgtk

System Info: (base) ashish@ashish-VirtualBox:~$ uname -a Linux ashish-VirtualBox 5.11.0-38-generic #42~20.04.1-Ubuntu SMP Tue Sep 28 20:41:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux (base) ashish@ashish-VirtualBox:~/Downloads/pdi-ce-9.2.0.0-290/data-integration$ sudo apt-get install libwebkitgtk-1.0-0 Reading package lists... Done Building dependency tree Reading state information... Done Package libwebkitgtk-1.0-0 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'libwebkitgtk-1.0-0' has no installation candidate Ref: https://stackoverflow.com/questions/62301866/how-to-install-the-libwebkitgtk-package-on-ubuntu-20-04-lts Following the steps here fixed the issue for me: 1. Open terminal and write this: $ sudo nano /etc/apt/sources.list 2. Add this entry to the file and save: deb http://cz.archive.ubuntu.com/ubuntu bionic main universe 3. $ sudo apt-get update 4.1. $ sudo apt-get install libwebkitgtk-1.0-0 ----> if you are using Vega and jdk of 64 bits 4.2 $ sudo apt-get install libwebkitgtk-1.0-0:i386 ----> if you are using Vega and jdk of 32 bits ----- ----- -----

POSTGRESQL

PostgreSQL Installation Script: install_postgresql.sh sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update sudo apt-get -y install postgresql

Continuing Installation and Solving Issues

(base) ashish@ashish-VirtualBox:/$ cd ~ (base) ashish@ashish-VirtualBox:~$ bash (base) ashish@ashish-VirtualBox:~$ psql psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "ashish" does not exist (base) ashish@ashish-VirtualBox:~$ psql -U ashish psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "ashish" does not exist (base) ashish@ashish-VirtualBox:~$ echo $USER ashish (base) ashish@ashish-VirtualBox:~$ psql -U postgres psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "postgres" (base) ashish@ashish-VirtualBox:~$ (base) ashish@ashish-VirtualBox:~$ sudo service postgresql restart (base) ashish@ashish-VirtualBox:~$ psql -U postgres Password for user postgres: psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "postgres" (base) ashish@ashish-VirtualBox:~$ sudo -i -u postgres postgres@ashish-VirtualBox:~$ psql Password for user postgres: psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "postgres" postgres@ashish-VirtualBox:~$ ----- ----- ----- STACKOVERFLOW: The problem is your pg_hba.conf file*. This line: local all postgres peer Should be: local all postgres md5 * The location of this file isn't very consistent. The command locate pg_hba.conf should help; here's some examples: /etc/postgresql/*/main/pg_hba.conf and /var/lib/pgsql/data/pg_hba.conf. After altering this file, don't forget to restart your PostgreSQL server. If you're on Linux, that would be sudo service postgresql restart. These are brief descriptions of both options according to the official PostgreSQL docs on authentication methods. ----- ----- -----

ERROR

postgres@ashish-VirtualBox:~$ exit logout (base) ashish@ashish-VirtualBox:~$ sudo nano /etc/postgresql/14/main/pg_hba.conf (base) ashish@ashish-VirtualBox:~$ sudo -i -u postgres postgres@ashish-VirtualBox:~$ psql -U postgres Password for user postgres: psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "postgres" postgres@ashish-VirtualBox:~$ ----- ----- ----- Solution You need just set METHOD to trust. (base) ashish@ashish-VirtualBox:~$ sudo nano /etc/postgresql/14/main/pg_hba.conf #TYPE DATABASE USER ADDRESS METHOD local all all trust And reload postgres server. $ service postgresql-9.5 reload ----- ----- -----

Snapshot of my own file

# Database administrative login by Unix domain socket local all all trust # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only #local all all peer local all all trust # IPv4 local connections: host all all 127.0.0.1/32 scram-sha-256 # IPv6 local connections: host all all ::1/128 scram-sha-256 ----- ----- -----

TESTING POSTGRESQL COMMANDS:

(base) ashish@ashish-VirtualBox:~$ sudo -i -u postgres postgres@ashish-VirtualBox:~$ psql psql (14.0 (Ubuntu 14.0-1.pgdg20.04+1)) Type "help" for help. postgres-# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------------------+----------- postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {} postgres-# \password postgres Enter new password: Enter it again: postgres-# (base) ashish@ashish-VirtualBox:~$ psql -U postgres Password for user postgres: psql (14.0 (Ubuntu 14.0-1.pgdg20.04+1)) SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off) Type "help" for help. postgres=# postgres=# postgres=# SELECT current_date; current_date -------------- 2021-10-29 (1 row) postgres=# postgres-# quit Use \q to quit. postgres-# \q postgres@ashish-VirtualBox:~$ postgres@ashish-VirtualBox:~$ exit logout (base) ashish@ashish-VirtualBox:~$ ----- ----- -----