Académique Documents
Professionnel Documents
Culture Documents
ADMINISTRATION EXAMINATION
Reg.No & Name :_______________________________________________
Machine No: _______
Duration: 2hours
10) Create users named anand, arun, deepak. Password for the users the username itself.
11) Create a group named redhat. The user anand and deepak should be the members of
the group redhat. Assign the directory /groupmember to linux group. The directory
Note: After completing twenty questions reboot your system then type the following
command:
history > /root/Desktop/reg.no
df h >> /root/Desktop/reg.no
cat /proc/swaps >> /root/Desktop/reg.no
runlevel >> /root/Desktop/reg.no
ll /Exam/Sample >> /root/Desktop/reg.no
ll /mnt >> /root/Desktop/reg.no
ll /opt >> /root/Desktop/reg.no
tail -20 /etc/group >> /root/Desktop/reg.no
ls /home >> /root/Desktop/reg.no
cat /etc/sysconfig/network >> /root/Desktop/reg.no
cat /etc/sysconfig/network-scripts/ifcfg-eth0 >> /root/Desktop/reg.no
crontab -lu arun >> /root/Desktop/reg.no
ll -a /home/red1 >> /root/Desktop/reg.no
ll -a /home/red2 >> /root/Desktop/reg.no
ll -a /home/red3 >> /root/Desktop/reg.no
ll /groupmember >> /root/Desktop/reg.no
rpm qa openoffice* >> /root/Desktop/reg.no
df h /root/localdisk >> /root/Desktop/reg.no
df h /linuxdisk >> /root/Desktop/reg.no
cat /etc/fstab >> /root/Desktop/reg.no
ANSWER
1.
2.
vim /etc/inittab
3.
mkdir /Exam
4.
cp -r /boot/grub /Exam/sample
5.
cd /Exam/sample
touch first second third fourth fifth sixth
6.
7.
8.
9.
ln -s /Exam/sample/bca /mnt/slbca
ln /Exam/sample/mca /opt/hlmca
10.
useradd anand
useradd arun
useradd deepak
passwd anand
passwd arun
passwd deepak
11.
groupadd redhat
usermod -G redhat anand
usermod -G redhat deepak
mkdir /groupmember
chgrp redhat /groupmember
chmod 770 /groupmember
12.
vim script.sh
#!/bin/bash
for USERS in mca1 mca2 mca3 mca4 mca5
do
useradd $USERS
echo mca | passwd --stdin $USERS
done
13.
vim /etc/sysconfig/network
HOSTNAME=examX.mca.org
vim /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
IPADDR=192.168.6.X
NETMASK=255.255.255.0
GATEWAY=192.168.6.254
14.
15.
vim <filename>
red1:hat:601:601::/home/red1:/bin/bash
red2:hat:602:602::/home/red2:/bin/bash
red3:hat:603:603::/home/red3:/bin/bash
newusers <filename>
cp rf /etc/skel/.* /home/red1
cp rf /etc/skel/.* /home/red2
cp rf /etc/skel/.* /home/red3
su red1
16.
17.
18.
mkdir /root/localdisk
mkdir /linuxdisk
fdisk /dev/sda
options -- n
-- l
-- press enter key
-- +1024M
-- t
-- partition number
-- c
options -- n
-- l
-- press enter key
-- +1024M
-- t
-- partition number
-- 83
-- w
partprob
sync
mkfs.vfat /dev/sda<partition number>
mkfs.ext3 /dev/sda<partition number>
partprob
sync
vim /etc/fstab
/dev/sda< partition number>
/root/localdisk
/dev/sda< partition number>
/linuxdisk
mount -a
vfat defaults
ext3 defaults
0 0
0 0