logo

Section A: File system and Scripting.

   

Added on  2022-11-18

8 Pages270 Words62 Views
 | 
 | 
 | 
Section A: File system and Scripting
Mount shows all devices on system
Reasons for not Mounting at Boot time;
• Parameters are incorrect in /etc/fstab
• A corrupted filesystem on /dev/hdc6
• A corrupted hard disk
Commands used to find more information about the nature of the problem;
gksu gedit /etc/fstab
sudo umount /dev/sdb2 # Note it may not be mounted and the command will say
so
sudo mount -a # Attempts to mount all fstab entries. It will complain if one or
more won't work
Section A: File system and Scripting._1

Section B: Account Management
Simple shell script, which reads a text file called newusers.txt;
#!/bin/ksh
file="/home/John John Smith/newusers.txt"
while IFS= read line
do
# display $line or do something with $line
echo "$line"
done <"$file"
Creates these users on the system without any interactive input
Script;
read usr_nameread usr_group
useradd -g $usr_group -m $usr_name
passwd $usr_name
read usr_nameread usr_group
useradd -g $usr_group -m $usr_name
passwd $usr_name
Section C: Practical File Systems
Section A: File system and Scripting._2

User called;
Test.txt file;
Section A: File system and Scripting._3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Server Administration: Linux and Server
|10
|1096
|123

Server Administration: Automated Account Management, File System Design, ZFS on Linux, File System Management with Scripts
|10
|1507
|85

SEO Suggestions for Desklib - Online Library for Study Material
|6
|1201
|456