Skip to content

Commit f61d1f7

Browse files
committed
Admistration Client for RHEL4
0 parents  commit f61d1f7

File tree

23 files changed

+2341
-0
lines changed

23 files changed

+2341
-0
lines changed

hardware/hardware

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#!/bin/bash
2+
header()
3+
{
4+
tput cup 3 20
5+
echo -e "\33[33m *************************** \33[0m"
6+
tput cup 4 20
7+
echo -e "\33[33m Welcome to ADMINIX Project \33[0m"
8+
tput cup 5 20
9+
echo -e "\33[32m *************************** \33[0m"
10+
}
11+
clear
12+
while [ 1 ]
13+
do
14+
clear
15+
tput cup 6 20
16+
echo -e "\33[37m Hardware Management Block \33[0m"
17+
tput cup 7 20
18+
echo '--------------------------------------------------'
19+
tput cup 8 20
20+
echo '| 1. Complete Hardware Information of your system|'
21+
tput cup 9 20
22+
echo '| 2. Detect New-Hardware on My System |'
23+
tput cup 10 20
24+
echo '| 3. Check My Total Memory Capacity |'
25+
tput cup 11 20
26+
echo '| 4. print System Information |'
27+
tput cup 12 20
28+
echo '| Q. Quit |'
29+
tput cup 13 20
30+
echo -e "\33[45m| Enter your choice: |\33[0m"
31+
tput cup 14 20
32+
echo '--------------------------------------------------'
33+
tput cup 13 41
34+
read choice
35+
case $choice in
36+
1)./hardware/hardwareboottime;;
37+
38+
2) clear
39+
tput cup 5 20
40+
echo -e "\33[42mRunning Kudzu To Detect My Newly Attached Hardware \33[0m"
41+
tput cup 6 10
42+
echo -e "\33[47mKudzu will Prompt you to configure if any new Hardware is found else simply exit\33[0m"
43+
kudzu
44+
tput cup 30 30
45+
echo -e "\33[43m Press Enter to Return to main Menu \33[0m"
46+
tput cup 27 67
47+
read;;
48+
49+
3) clear
50+
tput cup 5 20
51+
echo -e "\33[45mCapacity Of Your Main Memory & Secondary Memory:In MBs \33[0m"
52+
free -m
53+
tput cup 10 20
54+
echo -e "\33[43m To Check In KB or GB Use command:free -k or -g\33[0m"
55+
tput cup 30 30
56+
echo -e "\33[43m Press Enter to Return to main Menu \33[0m"
57+
tput cup 27 67
58+
read;;
59+
4) clear
60+
/harshit/hardware/sysinfo
61+
read;;
62+
63+
5) clear
64+
echo -e "\33[43m Press Enter to Return to main Menu \33[0m"
65+
read ;;
66+
67+
Q)
68+
69+
clear
70+
exit;;
71+
72+
q)
73+
clear
74+
exit;;
75+
76+
*)
77+
echo -e "\33[35m IMPROPER CHOICE \33[0m"
78+
echo -e "\33[41m Press Enter to Continue...! \33[0m"
79+
tput cup 30 42
80+
read id
81+
esac
82+
done

hardware/hardwareatboottime

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
header()
3+
{
4+
tput cup 3 20
5+
echo -e "\33[33m *************************** \33[0m"
6+
tput cup 4 20
7+
echo -e "\33[33m Welcome to ADMINIX Project \33[0m"
8+
tput cup 5 20
9+
echo -e "\33[32m *************************** \33[0m"
10+
}
11+
clear
12+
tput cup 5 20
13+
echo -e "\33[42m Info on Hardware Attached During the system Bootup \33[0m"
14+
cat /etc/sysconfig/hwconf |more
15+
tput cup 30 30
16+
echo -e "\33[43m Press Enter to Return to main Menu \33[0m"
17+
tput cup 30 40
18+
read

hardware/sysinfo

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
clear
3+
echo -e "Operating system is \033[31m`uname -s`\033[0m"
4+
sleep 1
5+
echo -e "Operating system's version is \033[31m`uname -v`\033[0m"
6+
sleep 1
7+
echo -e "Kernel's version is \033[31m`uname -r`\033[0m"
8+
sleep 1
9+
echo -e "System's hardware type is \033[31m`uname -m`\033[0m"
10+
sleep 1
11+
echo -e "System's processor type is \033[31m`uname -p`\033[0m"
12+
sleep 1
13+
echo -e "System's time is \033[31m`date`\033[0m"
14+
sleep 1
15+
echo -e "System's uptime is \033[31m`uptime`\033[0m"
16+
sleep 1
17+
echo -e "System's hostname is \033[31m$HOSTNAME\033[0m"
18+
sleep 1
19+
echo -e "Current user is \033[31m$USER\033[0m and user's id is \033[31m`id`\033[0m"
20+
sleep 1
21+
echo -e "User's home directory is \033[31m$HOME\033[0m and current work directory is \033[31m$PWD\033[0m"
22+
sleep 1
23+
echo -e "Details of users logged in this system are,
24+
\033[31m`finger`\033[0m"
25+
sleep 1
26+
echo -e "Current processes running on present terminal \033[31m`tty | gawk -F/ '{print $3}'`\033[0m are,
27+
\033[31m`ps`\033[0m"

menu

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#!/bin/bash
2+
clear
3+
while [ 1 ]
4+
do
5+
clear
6+
disp1()
7+
{
8+
9+
echo -e "\33[43m Press Enter to Return to main Menu \33[0m"
10+
return
11+
}
12+
disp()
13+
{
14+
tput cup 4 20
15+
echo -e "\33[33m ************************** \33[0m"
16+
tput cup 5 20
17+
echo -e "\33[37m Welcome to ADMINIX Project \33[0m"
18+
tput cup 6 20
19+
echo -e "\33[32m ************************** \33[0m"
20+
return
21+
}
22+
disp
23+
tput cup 7 20
24+
echo '--------------------------------------------------'
25+
tput cup 8 20
26+
echo '| 1. SYSTEM OPTIONS |'
27+
tput cup 9 20
28+
echo '| 2. SERVER OPTIONS |'
29+
tput cup 10 20
30+
echo '| 3. NETWORK OPTIONS |'
31+
tput cup 11 20
32+
echo '| 4. HARDWARE OPTIONS |'
33+
tput cup 12 20
34+
echo '| 5. OTHER OPTIONS |'
35+
tput cup 13 20
36+
echo '| Q. Quit |'
37+
tput cup 14 20
38+
echo -e "\33[45m| Enter your choice: |\33[0m"
39+
tput cup 15 20
40+
echo '--------------------------------------------------'
41+
tput cup 14 41
42+
read choice
43+
case $choice in
44+
45+
1) sh /harshit/system/system
46+
disp1
47+
read;;
48+
49+
2) sh /harshit/server/server
50+
disp1
51+
read;;
52+
53+
3) sh /harshit/network/network
54+
disp1
55+
read;;
56+
4) sh /harshit/hardware/hardware
57+
disp1
58+
read;;
59+
60+
5) clear
61+
sh /harshit/other/fsh
62+
tput cup 30 20
63+
disp1
64+
read ;;
65+
66+
Q)
67+
68+
clear
69+
exit;;
70+
71+
q)
72+
clear
73+
exit;;
74+
75+
*)
76+
echo -e "\33[35m IMPROPER CHOICE \33[0m"
77+
echo -e "\33[41m Press Enter to Continue...! \33[0m"
78+
read id;;
79+
esac
80+
done
81+

netmin

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
user = 'whoami'
3+
clear
4+
if [ $user!=root ]
5+
then
6+
tput cup 9 30
7+
echo "You should have root privelege to run ADMINIX"
8+
tput cup 10 30
9+
echo "Enter root PASSWORD"
10+
tput cup 11 30
11+
su - root -c "sh /harshit/menu"
12+
exit
13+
fi

network/disabled/sysctl.conf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Kernel sysctl configuration file for Red Hat Linux
2+
#
3+
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
4+
# sysctl.conf(5) for more details.
5+
6+
# Controls IP packet forwarding
7+
net.ipv4.ip_forward = 0
8+
9+
# Controls source route verification
10+
net.ipv4.conf.default.rp_filter = 1
11+
12+
# Do not accept source routing
13+
net.ipv4.conf.default.accept_source_route = 0
14+
15+
# Controls the System Request debugging functionality of the kernel
16+
kernel.sysrq = 0
17+
18+
# Controls whether core dumps will append the PID to the core filename.
19+
# Useful for debugging multi-threaded applications.
20+
kernel.core_uses_pid = 1

network/enabled/sysctl.conf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Kernel sysctl configuration file for Red Hat Linux
2+
#
3+
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
4+
# sysctl.conf(5) for more details.
5+
6+
# Controls IP packet forwarding
7+
net.ipv4.ip_forward = 1
8+
9+
# Controls source route verification
10+
net.ipv4.conf.default.rp_filter = 1
11+
12+
# Do not accept source routing
13+
net.ipv4.conf.default.accept_source_route = 0
14+
15+
# Controls the System Request debugging functionality of the kernel
16+
kernel.sysrq = 0
17+
18+
# Controls whether core dumps will append the PID to the core filename.
19+
# Useful for debugging multi-threaded applications.
20+
kernel.core_uses_pid = 1

network/network

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#!/bin/bash
2+
clear
3+
while [ 1 ]
4+
do
5+
clear
6+
disp1()
7+
{
8+
9+
echo -e "\33[43m Press Enter to Return to main Menu \33[0m"
10+
return
11+
}
12+
tput cup 3 20
13+
echo -e "\33[33m ************************** \33[0m"
14+
tput cup 4 20
15+
echo -e "\33[33m Welcome to ADMINIX project \33[0m"
16+
tput cup 5 20
17+
echo -e "\33[37m Network-Management-Block \33[0m"
18+
tput cup 6 20
19+
echo -e "\33[32m ************************** \33[0m"
20+
tput cup 7 20
21+
echo '--------------------------------------------------'
22+
tput cup 8 20
23+
echo '| 1. Configure NETWORKING |'
24+
tput cup 9 20
25+
echo '| 2. Get My Ip-Address |'
26+
tput cup 10 20
27+
echo '| 3. Check Ip-Forwarding Enabled or not |'
28+
tput cup 11 20
29+
echo '| 4. Enable Ip_Forwarding |'
30+
tput cup 12 20
31+
echo '| 5. Disable Ip_Forwarding |'
32+
tput cup 13 20
33+
echo '| Q. Quit |'
34+
tput cup 14 20
35+
echo -e "\33[45m| Enter your choice: |\33[0m"
36+
tput cup 15 20
37+
echo '--------------------------------------------------'
38+
tput cup 14 41
39+
read choice
40+
case $choice in
41+
42+
1) clear
43+
neat-tui
44+
service network restart >>/dev/null
45+
disp1
46+
read;;
47+
48+
2) clear
49+
ifconfig |more
50+
disp1
51+
read;;
52+
53+
3) clear
54+
tput cup 2 0
55+
echo -e "\33[42m net.ipv4.ip_forward = 0 thn Ip-Forwarding Disabled\33[0m"
56+
echo "\33[42m net.ipv4.ipforward = 1 then Enabled\33[0m"
57+
cat /etc/sysctl.conf |more
58+
disp1
59+
read;;
60+
4) clear
61+
tput cup 10 20
62+
echo -e "\33[42m Ip_forward is enabled...!\33[0m"
63+
mv /etc/sysctl.conf /etc/sysctl.conf1
64+
cp /harshit/network/enabled/sysctl.conf /etc/sysctl.conf
65+
tput cup 30 20
66+
disp1
67+
read;;
68+
69+
5) clear
70+
71+
tput cup 10 20
72+
echo -e "\33[42m Disable Ip_Forwarding.. \33[0m"
73+
mv /etc/sysctl.conf /etc/sysctl.conf1
74+
cp /harshit/network/disabled/sysctl.conf /etc/sysctl.conf
75+
tput cup 30 20
76+
disp1
77+
read ;;
78+
79+
Q)
80+
81+
clear
82+
exit;;
83+
q)
84+
clear
85+
exit;;
86+
87+
*)
88+
echo -e "\33[35m IMPROPER CHOICE \33[0m"
89+
echo -e "\33[41m Press Enter to Continue...! \33[0m"
90+
read id
91+
esac
92+
done

0 commit comments

Comments
 (0)