Question

Task 4: Encrypting User Password # usermod -L newuser1 # chage -d 0 newuser1 # grep...

Task 4: Encrypting User Password

# usermod -L newuser1

# chage -d 0 newuser1

# grep newuser1 /etc/shadow

What is the purpose of usermod and chage command?

_____________________________________________________________________________________ _____________________________

# rpm -q python If python

if python is not installed, then enter

# yum install python

# python

>>> import crypt;print crypt.crypt ("password123","solutions")

>>>

Press CTRL d to exit

Use the mouse to copy the encrypted string.

# usermod -p <paste encrypted string here> newuser1

The angle brackets (< and >) are NOT part of the string!

# grep newuser1 /etc/shadow

# usermod -U newuser1

# usermod -s /bin/bash newuser1

Log on as newuser1

Can you log on? What password are going to use? _____________________________________________________________________________________????????

0 0
Add a comment Improve this question Transcribed image text
Answer #1

usermod command is used on existing user accounts
only root user is allowed to execute this command
usermod command is used to make changes in the existing users. like to modify home directory , change group , change login name lock user unlock users etc

chage (change user password expiry information)

chage -l madhav

Last password change                   : Nov 02, 2019
Password expires                   : never
Password inactive                   : never
Account expires                       : Dec 01, 2019
Minimum number of days between password change       : 0
Maximum number of days between password change       : 99999
Number of days of warning before password expires   : 7

The expiry status of a 'madhav' user is Dec 1 2019, let's change it to Nov 1 2019 using 'usermod -e' option and confirm the expiry date with 'chage' command.

# usermod -e 2019-11-01 madhav
# chage -l madhav

Last password change                   : Nov 02, 2019
Password expires                   : never
Password inactive                   : never
Account expires                       : Nov 01, 2019
Minimum number of days between password change       : 0
Maximum number of days between password change       : 99999
Number of days of warning before password expires   : 7


encrypted password soHDZyOkM1YIE
plaintext password password123

used for login password123

i have used user1 account instead of newuser1 account as it was not created in me but user1 was exist so i done on that account.

if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)

Add a comment
Know the answer?
Add Answer to:
Task 4: Encrypting User Password # usermod -L newuser1 # chage -d 0 newuser1 # grep...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Urgent help needed: Please provide screen shots, will thumbs up good work! LANGUAGE: PYTHON Task 5:...

    Urgent help needed: Please provide screen shots, will thumbs up good work! LANGUAGE: PYTHON Task 5: Managing Groups Execute the following commands in the root command-line environment: # for i in jones sam henry john smith; do useradd $i; done Check whether users jones sam henry john smith are created # tail /etc/passwd # groupadd friends # for i in jones sam henry john smith; do gpasswd -a $i friends;done Check whether users jones sam henry john smith are added...

  • On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and...

    On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!. At the command prompt, type cat /etc/shadow and press Enter. Record the encrypted password for bozo’s user account. At the command prompt, type passwd –l bozo and press Enter to lock bozo’s user account. At the command prompt, type cat /etc/shadow and press Enter. What has been changed...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT