logo

Server Administration: Automated Account Management, File System Design, ZFS on Linux, File System Management with Scripts

   

Added on  2023-06-08

10 Pages1507 Words85 Views
 | 
 | 
 | 
Running Head: SERVER ADMINISTRATION 1
Server Administration
Institution
Date
Name
Part 1: Automated Account Management (4 marks)
First Script ``
Server Administration: Automated Account Management, File System Design, ZFS on Linux, File System Management with Scripts_1

SERVER ADMINISTRATION
Clear; This is first used to clear the terminal
#read the username from users.txt
un=`cat users.txt|cut -d " " -f 1`
#read the Home Directory from users.txt
hd=`cat users.txt|cut -d " " -f 2`
#read the gecos string from users.txt
g=`cat users.txt|cut -d " " -f 3-4`
#generate the random password
p=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo ''`
#display the password
echo "The password of user $un is $p"
#add the user by useradd command
adduser -d $hd -c "$g" $un
#assign the password and redirect the output into/dev/null
(echo $p|passwd $un --stdin) >/dev/null
PART 2. Design of a File system
echo "Enter the username"
read un
grep $un /etc/passwd
Server Administration: Automated Account Management, File System Design, ZFS on Linux, File System Management with Scripts_2

SERVER ADMINISTRATION
if test $? -eq 0
then
hd=`grep $un /etc/passwd|cut -d ":" -f 6`
tar -czf /tmp/back1.tar $hd
userdel -r $un
PART 3:
Unlike FreeBSD, ZFS is not part of the Linux base installation due to licensing issues,
which is a unexpected because it would be nice to install Ubuntu on a ZFS pool.
In any case, we can still run ZFS on Linux by installing it with the following commands.
ZFS is a joined record framework and intelligent volume administrator planned and
executed by a group at Sun Microsystems driven by Jeff Bonwick and Matthew Ahrens. Its
advancement began in 2001 and it was authoritatively declared in 2004. In 2005 it was
incorporated into the fundamental trunk of Solaris and discharged as a feature of OpenSolaris.
Right now, as of January 2015, it is local to Solaris, OpenSolaris, OpenIndiana, illumos,
Joyent SmartOS, OmniOS, FreeBSD, Debian GNU/kFreeBSD frameworks, NetBSD, OSv
and bolstered on Mac OS with MacZFS.
On Backups, this framework is totally in light of dataset snapshots and replication back
to our capacity servers utilizing zfsnap and zxfer. zfsnap takes a snapshot each day for a week
and consistently for a month. It discards old ones consequently so you don't amass
overabundance snapshots. For instance, the greater part of our present Jail servers' dataset get
snapshotted, at that point every depiction gets repeated back to the capacity servers. It's quick.
Server Administration: Automated Account Management, File System Design, ZFS on Linux, File System Management with Scripts_3

End of preview

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

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

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

Linux Server Administration: Automatic Management of Account, File System Designing, Implementation, Making the File System accessible and robust, Management of File System using the Scripts
|11
|695
|90