Write a shell script security policy settings for linux


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Write a shell script security policy settings for linux
# 1  
Old 04-15-2011
Write a shell script security policy settings for linux

The pro help!
Write a shell script setup for linux security policies include:
1. login (username and password login).
2. add, delete your username and password.
3. firewall.
Note: Write a shell script file as follows:
If login successful then
Step 2.
If step 2 succeeds (ie add, delete success) then
Step 3
End.

---------- Post updated at 10:28 PM ---------- Previous update was at 06:54 PM ----------

Can anyone help me with a bash shell login script? Its for my unix class and we need to make a script that allows the users we create to login on a screen and put their user name and password on it. Then from that screen it goes to a menu screen IF they put the right login/password combination.

Heres what i have so far.
Code:
tput cup $1 $2
tput clear
bold=`tput smso`
offbold=`tput rmso`
echo $bold
tput cup 10 20; echo "User ID:"
tput cup 12 20; echo "Password:"
echo $offbold
tput cup 10 41; read userid
tput cup 12 41; read password
while [ "$userid" != "/etc/passwd" ]; do
	echo $bold
	tput cup 15 35; echo "Incorrect User/Password"
	echo $offbold
     if	[ "$userid" = "/etc/passwd" ];
	then
	clear
	./companymenu; 
     fi
done

# 2  
Old 04-15-2011
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please help me to write the shell script

Please help me to write the shell script AC|NAME|STATE|MAXVALUE|MINVALUE---------heading 111|UMA|ODISHA|123,00.00|54.00 111|UMA|ODISHA|124,00.00|25.00 111|UMA|ODISHA|114,00.00|58.00 111|UMA|ODISHA|104,00.00|00.00 111|UMA|ODISHA|194,00.00|19.00 111|UMA|ODISHA|184,00.00|64.00... (5 Replies)
Discussion started by: alokjyotibal
5 Replies

2. SuSE

Suse Security Settings

1) PermitEmptyPasswords is set to No # grep "^PermitEmptyPasswords" /etc/ssh/sshd_config PermitEmptyPasswords no If there is no output does it implies 'As parameter was not set mean system will also not accepted emptypassword.' 2) Users is not allowed to set... (2 Replies)
Discussion started by: alvinoo
2 Replies

3. Shell Programming and Scripting

How to write config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

4. UNIX for Dummies Questions & Answers

How to write Config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

5. Shell Programming and Scripting

Configuring smtp settings and then sending the mail through shell script

I have make an menu in which first option is to start and second is to stop the services echo "Please enter the appropriate choice for doing the operations" echo " 1) STOP Services 2) START Services case $choice in 1) ... (1 Reply)
Discussion started by: punpun66
1 Replies

6. AIX

default settings of security password in AIX

Hi Guy's Just I want to know the default settings of security password in AIX there is some changes happened in my machine when I try to change my password I'm getting this message Changing password for "root" root's New password: a minimum of 1 elapsed week between changes.... (1 Reply)
Discussion started by: Mr.AIX
1 Replies

7. Shell Programming and Scripting

how to write shell script

Hi , i need to write a script like this In 1.sh ./test.sh wait(5sec) send ctrl+C to server ./testxxxx.sh first i need invoke test.sh from 1.sh , after wating for some time i need to close the test.sh script & i need to start new script i tried to invoke script... (2 Replies)
Discussion started by: pvr_satya
2 Replies

8. Shell Programming and Scripting

Need to Write Shell Script based off of this shell command

I'm trying to read a bunch of log files and output the lines that contain particular strings. To accomplish this, I've been running the following from the command line: find . -name "*" | xargs grep " " | grep " " > output.txt Two grep statements are needed in case I'm looking for a... (3 Replies)
Discussion started by: Rally_Point
3 Replies

9. Solaris

SunSolaris-v5.9: Default Security Settings

I am working on SunSolaris- v5.9 and am trying to obtain default security settings (including password settings). Although in the AIX environment, to obtain default setting the following commands are used: /etc/security/user /etc/security/limits /etc/security/environ... (1 Reply)
Discussion started by: eysheikah
1 Replies

10. UNIX for Dummies Questions & Answers

mandrake 8.0 experts...how come it won't accept changes to security settings??

well after a possible hack last week that was a pain in the as* i have reinstalled and i am setting up my security settings before i connect to the internet this time... problem is that when i try to change the security setting using in the control setting the left panel (where the change is... (2 Replies)
Discussion started by: justchillin
2 Replies
Login or Register to Ask a Question