Pages

Showing posts with label Display your own Text on ubuntu terminal and how to recover the pwd of the user. Show all posts
Showing posts with label Display your own Text on ubuntu terminal and how to recover the pwd of the user. Show all posts

Wednesday, 13 December 2023

Display your own Text on ubuntu terminal and how to recover the pwd of the user

$ figlet -f slant "Big Data" -c | lolcat && figlet -f digital -c "Drive into DataScience" | lolcat 

How to display the above text on terminal:


Useful commands:

How to check the number of directories created by the user on terminal:

csedept@cse:~$ ls /home
csedept  hdoop

csedept@cse:~$ ls -l /home/hdoop/
total 16
-rw-r--r--  1 hdoop hdoop 8980 Dec 18 16:26 examples.desktop
drwxr-xr-x 14 hdoop hdoop 4096 Dec 18 16:55 hadoop

How to enter into the root terminal:
csedept@cse:~$ sudo -s
root@cse:/home/csedept# 

How to use id command on the  terminal:
csedept@cse:~$ id
uid=1000(csedept) gid=1000(csedept) groups=1000(csedept),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),126(sambashare)
csedept@cse:~$ id -u
1000
csedept@cse:~$ id -n -u
csedept

csedept@cse:~$ sudo adduser duck
[sudo] password for csedept: 
Adding user `duck' ...
Adding new group `duck' (1001) ...
Adding new user `duck' (1001) with group `duck' ...
Creating home directory `/home/duck' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for duck
Enter the new value, or press ENTER for the default
Full Name []:duck 
Room Number []: 
Work Phone []: 
Home Phone []: 
Other []: 
Is the information correct? [Y/n] y
csedept@cse:~$ ls /home/
csedept  duck  hdoop

How to switch the user using su command:
csedept@cse:~$ su - duck
Password: 
duck@cse:~$ logout
csedept@cse:~$ 

How to recover the password of the user :
1. shift +esc
2. select the option : Advanced option for ubuntu
3. choose the recovery mode 
now we can see the root there we need to type 
4. mount -n -o remount, rw /
5. ls /home
6. passwd <username>  what ever the name seen after root that is our username
reboot 

Friends-of-friends-Map Reduce program with count

Program to illustrate FOF Map Reduce: import java.io.IOException; import java.util.*; import org.apache.hadoop.conf.Configuration; import or...