Permalink
Browse files

Netmin 1, contributed by Rahul Soni, BIET, jhansi.

  • Loading branch information...
1 parent 4da86a9 commit 8aca3e44cadf6503a1b2635d7a3ded92411cd8cb @rohitgoyal18 committed Dec 13, 2011
View
@@ -0,0 +1,66 @@
+#!/bin/bash
+clear
+while [ 1 ]
+do
+clear
+echo
+echo
+echo
+tput cup 9 30
+echo '--------------------------------------------------'
+tput cup 10 30
+echo '| 1. SYSTEM OPTION |'
+tput cup 11 30
+echo '| 2. SERVER OPTIONS |'
+tput cup 12 30
+echo '| 3. NETWORK OPTIONS |'
+tput cup 13 30
+echo '| 4. HARDWARE OPTIONS |'
+tput cup 14 30
+echo '| 5. OTHER IPTIONS |'
+tput cup 15 30
+echo '| Q. Quit |'
+tput cup 16 30
+echo '| Enter your choice: |'
+tput cup 17 30
+echo '--------------------------------------------------'
+tput cup 16 54
+read choice
+case $choice in
+
+1) sh /netmin/rahul/system/system
+ echo "Press enter to return to main menu. "
+ read;;
+
+2) ./server
+ echo "Press enter to return to main menu. "
+ read;;
+
+3) ./network
+ echo"Press enter to return to main menu "
+ read;;
+
+4) ./hardware
+ echo "Press enter to return to the main menu. "
+ read;;
+
+5) ./other
+ echo " Press enter to return to the main menu. "
+ read ;;
+
+Q)
+
+ clear
+ exit;;
+
+q)
+ clear
+ exit;;
+
+*)
+ echo "IMPROPER CHOICE"
+ echo "Press Enter to continue"
+ read id
+esac
+done
+
View
@@ -0,0 +1,13 @@
+#!/bin/bash
+user = 'whoami'
+clear
+if [ $user!=root ]
+then
+ tput cup 9 30
+ echo "You should have root privelege to run NETMIN"
+ tput cup 10 30
+ echo "Enter root PASSWORD"
+ tput cup 11 30
+ su - root -c "sh /netmin/rahul/menu"
+ exit
+fi
No changes.
View
@@ -0,0 +1,22 @@
+
+#!/bin/bash
+clear
+tput cup 10 30
+printf "Name the user whose password is to be changed: "
+read user
+if `grep -w $user /etc/passwd >>/dev/null`
+then
+tput cup 11 30
+echo -n "Enter the password : "
+stty -echo
+read pass
+stty sane
+tput cup 12 30
+echo $pass | passwd --stdin $user>>output
+stty sane
+tput cup 16 30
+echo "User $user 's password successfully changed"
+else
+tput cup 29 30
+echo "User $user not exist"
+fi
@@ -0,0 +1,3 @@
+#!/bin/bash
+clear
+
No changes.
No changes.
No changes.
View
@@ -0,0 +1,20 @@
+#!/bin/bash
+clear
+tput cup 10 30
+echo -n "Enter the name of the group:"
+read group
+if `grep $group /etc/group >>/dev/null`
+then
+tput cup 11 30
+echo "group already exixts "
+tput cup 12 30
+echo -n "press enter to return to main menu "
+read
+else
+groupadd $group 2>/dev/null
+tput cup 11 30
+echo "Group successfully created"
+tput cup 12 30
+echo -n "Press enter to continue. "
+read
+fi
No changes.
@@ -0,0 +1,11 @@
+#!/bin/bash
+echo "The Users and there details in the system are:"
+echo "______________________________________________"
+
+
+
+echo "User UserName Userid Groupid Shell HomeDirectory maxTimeExpire SecondaryGroups"
+echo "---- -------- ------ ------- ----- ------------- ------------- ---------------"
+awk -F: '{print $1,$3,$4,$5}' /etc/passwd
+
+
@@ -0,0 +1,2 @@
+Changing password for user qwe.
+passwd: all authentication tokens updated successfully.
@@ -0,0 +1,3 @@
+#!/bin/bash
+clear
+ps -aux|more
View
@@ -0,0 +1,89 @@
+#!/bin/bash
+clear
+while [ 1 ]
+do
+clear
+echo
+echo
+echo
+tput cup 9 30
+echo '--------------------------------------------------'
+tput cup 10 30
+echo '| 1. Query for all Packages installed |'
+tput cup 11 30
+echo '| 2. Query for specific packages |'
+tput cup 12 30
+echo '| 3. Install packages |'
+tput cup 13 30
+echo '| 4. Userdefined manuall command interface |'
+tput cup 14 30
+echo '| Q. Quit |'
+tput cup 15 30
+echo '| Enter your choice : |'
+tput cup 16 30
+echo '--------------------------------------------------'
+tput cup 15 52
+read choice
+case $choice in
+
+1) clear
+ rpm -qa|more
+ tput cup 30 30
+ echo "Press enter to return to main menu. "
+ read;;
+
+2) clear
+ tput cup 10 30
+ echo "Enter Package name :"
+ tput cup 10 52
+ read pack
+ clear
+ tput cup 10 0
+ rpm -iq $pack
+ tput cup 30 30
+ echo "Press enter to return to main menu. "
+ read;;
+
+3) clear
+ tput cup 10 30
+ echo "Enter the full Path or http or ftp address for the package to install:"
+ tput cup 11 30
+ echo "For local files enter "/home/apple/example.rpm" as path name"
+ tput cup 12 30
+ echo "For ftp files enter "ftp://rpmfind/example.rpm" as path name"
+ tput cup 13 30
+ echo "For http files enter "http://rpmfind/example.rpm" as path name"
+ tput cup 15 30
+ read -p "Enter Path : " path
+ tput cup 16 30
+ rpm -ivh $path
+ tput cup 30 30
+ echo "Press enter to return to main menu. "
+ read;;
+
+
+4) clear
+ tput cup 10 30
+ echo "Enter the rpm command argument to execute"
+ tput cup 11 30
+ read -p "rpm " argument
+ tput cup 12 30
+ rpm $argument
+ tput cup 30 30
+ echo "Press enter to return to main menu. "
+ read;;
+Q)
+
+ clear
+ exit;;
+
+q)
+ clear
+ exit;;
+
+*)
+ echo "IMPROPER CHOICE"
+ echo "Press Enter to continue"
+ read id
+esac
+done
View
@@ -0,0 +1,2 @@
+Changing password for user qwe.
+passwd: all authentication tokens updated successfully.
View
@@ -0,0 +1,123 @@
+#!/bin/bash
+clear
+while [ 1 ]
+do
+clear
+echo
+echo
+echo
+tput cup 9 30
+echo '--------------------------------------------------'
+tput cup 10 30
+echo '| 1. Create and Delete Modify Users and Groups |'
+tput cup 11 30
+echo '| 2. File System Backup |'
+tput cup 12 30
+echo '| 3. Software Packages |'
+tput cup 13 30
+echo '| 4. Running Processes |'
+tput cup 14 30
+echo '| 5. Scheduled Cron Jobs |'
+tput cup 15 30
+echo '| 6. Scheduled Commands |'
+tput cup 16 30
+echo '| 7. Bootup and Shutdown Actions |'
+tput cup 17 30
+echo '| 8. Disk Quota |'
+tput cup 18 30
+echo '| 9. Disk and Network filesystem |'
+tput cup 19 30
+echo '| 10.Manual Pages |'
+tput cup 20 30
+echo '| 11.System Logs |'
+tput cup 21 30
+echo '| Q. Quit |'
+tput cup 22 30
+echo '| P. Previous Menu |'
+tput cup 23 30
+echo '| Enter your choice : |'
+tput cup 24 30
+echo '--------------------------------------------------'
+tput cup 23 55
+read choice
+case $choice in
+
+1) sh /netmin/rahul/system/userandgroup
+ tput cup 30 30
+ echo "Press enter to return to the menu. "
+ read;;
+
+2) sh /netmin/rahul/system/fsback
+ tput cup 30 30
+ echo "Press enter to return to the menu. "
+ read;;
+
+3) sh /netmin/rahul/system/soft
+ tput cup 30 30
+ echo "Press enter to return to the menu "
+ read;;
+
+4) sh /netmin/rahul/system/procs
+ tput cup 30 30
+ echo "Press enter to return to the menu. "
+ read;;
+
+5) sh /netmin/rahul/system/cronsj
+ tput cup 30 30
+ echo " Press enter to return to the menu. "
+ read ;;
+
+6) sh /netmin/rahul/system/comman
+ tput cup 30 30
+ echo " Press enter to return to the menu. "
+ read ;;
+
+7) sh /netmin/rahul/system/bootshut
+ tput cup 30 30
+ echo " Press enter to return to the menu. "
+ read ;;
+
+8) sh /netmin/rahul/system/diskq
+ tput cup 30 30
+ echo " Press enter to return to the menu. "
+ read ;;
+
+9) sh /netmin/rahul/system/diskn
+ tput cup 30 30
+ echo " Press enter to return to the menu. "
+ read ;;
+
+10) sh /netmin/rahul/system/manual
+ tput cup 30 30
+ echo " Press enter to return to the menu. "
+ read ;;
+
+11) sh /netmin/rahul/system/systemlog
+ tput cup 30 30
+ echo " Press enter to return to the menu. "
+ read ;;
+P)
+
+ clear
+ exit;;
+p)
+
+ clear
+ exit;;
+Q)
+
+ clear
+ exit [2];;
+
+q)
+ clear
+ exit [2];;
+
+*) tput cup 30 30
+ echo "IMPROPER CHOICE"
+ tput cup 31 30
+ echo "Press Enter to continue"
+ read id
+esac
+done
+
No changes.
View
@@ -0,0 +1 @@
+mkdir a
Oops, something went wrong.

0 comments on commit 8aca3e4

Please sign in to comment.