GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ShellSCripting/AdvanceDyanmicinout1.sh at master · CloudDevopsEngineer02/ShellSCripting

Expand file tree

/

AdvanceDyanmicinout1.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
44 lines (32 loc) · 1.09 KB
/

AdvanceDyanmicinout1.sh

Copy path

File metadata and controls

executable file
·
44 lines (32 loc) · 1.09 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
#Only ROOT users can execute the script: Hint "Create a if conditions for MEssage"
if [[ "${UID}" -ne 0 ]]
then
echo "The user name is not Sudoer or Non-ROOT user "
exit 1
fi
read -p "Enter the User Name " USER_NAME
read -p "Enter REAL NAME or APPLICATION FULL name with DESCRIPTION " COMMNET
read -s -p "Enter the PASSWORD for the above user " PASSWORD
# -c argument has been taken for comment and -m for home directory
useradd -c "${COMMNET}" -m ${USER_NAME}
# The below condition states that the user has been successfully created or not ?
if [[ "${?}" -ne 0 ]]
then
echo "The ${USER_NAME} hasn't created successfully...!!"
exit 1
fi
# | is to include and standed input username which already taken from keyboard.
#passwd ${PASSWORD} | -- stdin ${USER_NAME}
echo "${PASSWORD}" | passwd --stdin ${USER_NAME}
#First password has to be expire after first login
passwd -e ${PASSWORD}
echo
echo "USER NAME: ${USER_NAME} "
echo
echo "USER/Application REAL NAME/Description: ${COMMENT} "
echo
echo "Password you provided: ${PASSWORD} "
#echo "Host Name: ${hostname} "
echo ${hostname}
exit 0
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.