LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-28-2021, 09:24 AM   #1
manoj.linux
Member
 
Registered: Aug 2007
Posts: 284

Rep: Reputation: 17
shell script to generate password and send on mail


Hello,

I am new to shell scripting, we have requirement where we have to create shell script which will generate password automatically and send it om mail once password is expired for user. OS is Linux.

Please suggest whether is possible?
 
Old 04-28-2021, 09:31 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 5,611
Blog Entries: 3

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
It's not only possible but easy. Please give more details about your homework assignment including what you have tried so far (use [code] [/code] tags around your code) and also mention which distro this is for, including version and which mail utilities you have on the system.

If you are new to shell scripting then also mention which shell scripting tutorials you are working through. Include links.

However, since mail is very insecure, sending anything without using OpenPGP is ill advised. So, which do you have now for encryption GnuPG or Sequoia?
 
Old 04-28-2021, 09:31 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,810

Rep: Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974
Quote:
Originally Posted by manoj.linux View Post
Hello,
I am new to shell scripting, we have requirement where we have to create shell script which will generate password automatically and send it om mail once password is expired for user. OS is Linux.

Please suggest whether is possible?
Very possible, as you well know. Mainly because you've been doing this for *FIFTEEN YEARS* now. You are NOT 'new to shell scripting' either:
https://www.linuxquestions.org/quest...ox-4175665896/

Each time you post something like this, you claim you're 'new' to scripting, and cannot show any of your own efforts. We are NOT GOING TO WRITE YOUR SCRIPTS FOR YOU. Since you have a 'requirement' to do this for your job, I'd suggest you either ask your co-workers for help, or show us what YOU have done/tried, and tell us where you're stuck.

Repeatedly asking for handouts and claiming ignorance won't get you far.
 
1 members found this post helpful.
Old 04-28-2021, 10:36 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,490

Rep: Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532
did you try to look for password generators on the net?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
In shell script how can i change the user using sudo -s and it asking password. So in script how to password sopanlavhale Linux - Newbie 5 06-14-2018 12:03 PM
Script to generate EXCEL sheet by shell script dani1234 Linux - Newbie 15 09-14-2014 07:36 PM
can mail command be used to send mail onto global mail servers like yahoo etc dale_chip Linux - Newbie 4 08-12-2008 08:33 AM
Postfix : mail cannot send to send outside ( can send/receive locally) bobbinsupport Linux - Networking 3 12-15-2007 10:40 PM
with the linux proxi, backend pop3 mail client can not receive mail and send mail rubin823 Linux - Networking 0 12-21-2006 10:06 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration