Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 8aca3e44cadf6503a1b2635d7a3ded92411cd8cb 1 parent 4da86a9
@rohitgoyal18 authored
View
66 netmin/rahul/menu
@@ -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
13 netmin/rahul/netmin
@@ -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
View
0  netmin/rahul/system/bootshut
No changes.
View
22 netmin/rahul/system/chpass
@@ -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
View
3  netmin/rahul/system/comman
@@ -0,0 +1,3 @@
+#!/bin/bash
+clear
+
View
0  netmin/rahul/system/cronsj
No changes.
View
0  netmin/rahul/system/diskn
No changes.
View
0  netmin/rahul/system/diskq
No changes.
View
20 netmin/rahul/system/groups
@@ -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
View
0  netmin/rahul/system/manual
No changes.
View
11 netmin/rahul/system/moduser
@@ -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
+
+
View
2  netmin/rahul/system/output
@@ -0,0 +1,2 @@
+Changing password for user qwe.
+passwd: all authentication tokens updated successfully.
View
3  netmin/rahul/system/procs
@@ -0,0 +1,3 @@
+#!/bin/bash
+clear
+ps -aux|more
View
89 netmin/rahul/system/soft
@@ -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
2  netmin/rahul/system/stty
@@ -0,0 +1,2 @@
+Changing password for user qwe.
+passwd: all authentication tokens updated successfully.
View
123 netmin/rahul/system/system
@@ -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
+
View
0  netmin/rahul/system/systemlog
No changes.
View
1  netmin/rahul/system/temp
@@ -0,0 +1 @@
+mkdir a
View
78 netmin/rahul/system/use
@@ -0,0 +1,78 @@
+root
+bin
+daemon
+adm
+lp
+sync
+shutdown
+halt
+mail
+news
+uucp
+operator
+games
+gopher
+ftp
+nobody
+rpm
+vcsa
+nscd
+sshd
+rpc
+rpcuser
+mailnull
+smmsp
+pcap
+apache
+squid
+webalizer
+xfs
+named
+ntp
+gdm
+apple
+a
+aaa
+qqq
+qwe
+qw
+user
+root
+bin
+daemon
+adm
+lp
+sync
+shutdown
+halt
+mail
+news
+uucp
+operator
+games
+gopher
+ftp
+nobody
+rpm
+vcsa
+nscd
+sshd
+rpc
+rpcuser
+mailnull
+smmsp
+pcap
+apache
+squid
+webalizer
+xfs
+named
+ntp
+gdm
+apple
+a
+aaa
+qqq
+qwe
+qw
+user
View
20 netmin/rahul/system/user
@@ -0,0 +1,20 @@
+#!/bin/bash
+ clear
+ tput cup 10 30
+ read -p "Enter username : " username
+ tput cup 11 30
+ read -s -p "Enter password : " password
+ if 'grep -w $username /etc/passwd >>/dev/null'
+ then
+ clear
+ tput cup 10 30
+ echo "$username exists!"
+ exit [1]
+
+ else
+ clear
+ pass=$(perl -e 'print crypt($ARGV[0], "password")' $password)
+ useradd -m -p $pass $username>>output
+ tput cup 11 30
+ [ $? -eq 0 ] && echo "User has been added to system!" || echo "Failed to add a user!"
+ fi
View
64 netmin/rahul/system/userandgroup
@@ -0,0 +1,64 @@
+#!/bin/bash
+clear
+while [ 1 ]
+do
+clear
+echo
+echo
+echo
+tput cup 9 30
+echo '--------------------------------------------------'
+tput cup 10 30
+echo '| 1. Create Users |'
+tput cup 11 30
+echo '| 2. Create Groups |'
+tput cup 12 30
+echo '| 3. Modify User |'
+tput cup 13 30
+echo '| 4. Change Password |'
+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) sh /netmin/rahul/system/user
+ tput cup 30 30
+ echo "Press enter to return to main menu. "
+ read;;
+
+2) sh /netmin/rahul/system/groups
+ tput cup 30 30tput cup 30 30
+ echo "Press enter to return to main menu. "
+ read;;
+
+3) sh /netmin/rahul/system/moduser
+ tput cup 30 30tput cup 30 30
+ echo "Press enter to return to main menu. "
+ read;;
+
+
+4) sh /netmin/rahul/system/chpass
+ tput cup 30 30tput 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  netmin/rahul/temp
No changes.
Please sign in to comment.
Something went wrong with that request. Please try again.