Sunday, August 10, 2014

Windows System Administrator Interview Question and Answer

1. Q: What does Active Directory mean?
A: The active Directory means a service that identifies and handles resources, making them visible for different groups or members that are authorized. It has the role of an object store. The Active directory sees as objects workstations, people, servers devices or documents and they all have their own characteristics and access control list or ACL.

2.Q: What is the meaning of Global Catalog?
A: A Global Catalog is something that each domain has, and it is used for authenticating the user on the network, on windows 2000 network logon’s were protected from failures by assigning a Global Catalog to every site.

3.Q: What is the use for DHCP?
A: DHCP is used for the DHCP servers, personal computers can get their configuration from a DHCP server on an IP configuration. The server knows nothing about the personal computers until they make a request for information. Usually the most common information sent is IP address and DHCP is used to make a large network administration easier.

 4.Q: What does a Super Scope do in DHCP?
A: The Super Scope gives the DHCP server the possibility to have leases to multiple clients on the same physical network. The leases come from multiple scopes. All scopes must be defined using DHCP manager before the Super Scope creation and they are named member scopes. The DHCP problems can be resolved by the Super Scope in different ways like the following:
a) on a physical network like a LAN network where multiple logical IP networks exist Super Scope is very useful here. These types of networks are also named multinets.
b) there is also need for a Super Scope when the address pool for the current scope becomes empty and there is a need for new computers on the physical network.
c) when clients have to move on another scope.
d) when DHCP clients from the other side of the relay agents (BOOTP) or the network has many logical subnets.
e) when standard networks are limited to leasing addresses for the clients.

5.Q: What main file is used for Active Directory backup and how it is made?
A: Active Directory backup is made using NTbackup utility. The backup is made once with the system state and they are restored also together because they depend on each other. The system state has different components like:
a)    The registry
b)    Boot files or startup files (files required by the operating system to start).
c)    The component services
d)    The system volume or the SYSVOL folder this is a folder that contains files that are shared on a domain.
e)    The Active Directory

6.Q: Does a windows administrator have to be critical?
A: Yes and I can explain how. A system administrator is responsible for an entire network which means he/she must take care of multiple things in the same time which is not an easy task. In order to achieve this, an administrator must have high organization skills and a high technical knowledge and he/she must prevent the problems from happening so that he/she won’t have to be forced to fix them.

7.Q: In what way is forward lookup zone different from the reverse lookup zone in NDS?
A: There is one difference between these two: the forward lookup means name to IP and reverse lookup means IP to name.

8.Q: As a system administrator can you make backup and recovery of data?
A: This is a responsibility that any system administrator must have assume as a basic skill. Of course there are many types of backup that can be made but all must be known for a successful career.

9.Q: What is the meaning of DHCP and  what is the port used by it to work?
A: DHCP or Dynamic Host Configuration Protocol has the ability to assign an IP automatically, this is done in fact by the server and has a number range. When the system starts an IP is assigned automatically. The DHCP server has port number 68, while the client has 67.

10.Q: Can you ensure an updated system all the time and perform market research?
A: Staying up-to-date is another strong point of a professional administrator, technology evolves and we must keep up with the flow, otherwise we can’t do our job in a professional way. Market research is the key to an up-to –date work.

11.Q: Is it possible for a computer to be able to browse the internet without having a default gateway?
A: Yes it is as long as we use a public IP address. The gateway is required as a router or firewall when using an intranet address.

12.Q: What are the advantages or disadvantages  of using DHCP?
A: The advantage is that the DHCP server configures all IP’s automatically and the disadvantage is that when you receive a new IP address the machine name remains the same because of its association with the IP. It’s not a real problem but when somebody tries to access the machine by its name it become one.

13.Q: Are you familiar with monitoring?
A: Yes, monitoring is a base activity of a system administrator, he/she manages all the access rights and the server space, security of the user accounts is one of the most important things here. Also an administrator must make sure that the user’s activity doesn’t affect in any way the integrity of the server.

14.Q: How can we create a SRV record in DNS?
A: To do this we must open the DNS then we must select the abc.local domain the right click and we must go to Other New Records and the SRV ( choose location).

15.Q: In how much time are the security changes applied on the domain controllers?
A: Including policies for personal and public lockout, the changes apply immediately. The changes also include passwords and LSA or Local Security Authority.

16.Q: What do you do if a an end user states that a file is gone?
A: Files are deleted constantly by end users but the backup can restore them. Anyhow before using the backup we must check if the user didn’t move the file by mistake in another place.

17.Q: Where is the storage place of the environmental settings and documents from the roaming profile?
A: These documents and settings are deposited locally until the user’s log off, when they are moved into the shared folder from the server so the log on at a fresh system may take a while because of this.

18.Q: What are the classes that we can find in the Active Directory of Windows Server 2003?
A: We can find:
a)    the abstract class which can be made to look like a template and create other templates, no matter if they are abstract, auxiliary or structural.
b)    the structural class is the important type of class that is made from multiple abstract classes or an existing structural class. They are the only ones that can make Active Directory objects.
c)    the auxiliary class is used as a replace for many attributes of a structural class, it is a list of attributes.
d)    The 88 class is used for objects classes that were defined before 1993 and it is not a common class, it doesn’t use abstract, structural or auxiliary classes.

19.Q: When is a good time for creating a forest?
A: Certain companies that have different bases require different trees and separate namespaces. And unique names sometimes give birth to different identities of DNS. Also companies are sometimes acquired and get under other influences but the continuity must be preserved for the names.

20.Q: Can you explain to us about you experience in the past regarding windows administration?
A: I have ten years of experience in this field, I was passionate about computers since childhood and I installed many operating systems at home and inside organizations including these versions of windows: 95, 98, 98 SE, NT, Millenium, 2000, 2003 Server, XP, Seven, Vista. I also managed these systems and performed maintenance, I worked with different applications from the windows environment.

21.Q: How can you handle a situation in which for instance if you have an application that is not running on Windows 2003 because it’s older?
A: In this situation the application has to be started in the compatibility mode with a previously windows operating system. This is made by right clicking the application icon and choosing another Windows from the compatibility menu.

22.Q: What is the meaning of Repadmin.exe from Windows Server 2008?
A: Repadmin.exe means Replication Diagnostics Tool and helps for the diagnostic of domain controllers in the Windows system. This tool is used by administrators to see the replication topology from the perspective of every domain controller. The active Directory forest can also be supervised by Repadmin.exe and replication problems can be tracked.

23.Q: What difference can we find in the usage of CSVDE versus LDIFDE?
A: CSVDE and LDIFDE are both commands and are used for importing and exporting objects but they are different in the way that CSVDE uses the format CSV (Comma Separated Value) which is an Excel file for files and LDIFDE uses LDIF (LDAP Data Interchange Format) file type which can be viewed with a simple text editor. LDIFDE can be also used for editing or deleting objects unlike CSVDE.

24.Q: What big differences exist between these two operating systems: Windows 2000 and Windows XP?
A: Windows 2000 has more capabilities than Windows XP especially regarding features like DHCP, Terminal Services or DNS. It has all the advantages for server usage. Windows 2000 is a little more professional than XP, but they are both coming with different versions for every user taste. While XP has Home version, Professional or Enterprise, Windows 2000 has Professional and Server editions. The Home version of XP comes with minimal features because the target clients are beginners.

25.Q: What are the things that make Unix different from Windows?
A: The code loading runtime of Unix is different from the one that Windows has. We must become aware of how the system exactly works before we make a dynamically loading module. Unix has the shared objects with the .so extension that encapsulate lines of code that the programs will use and the functions names. These function names become the references of those functions  in the memory of the program when the file is combined with the program. In Windows the .dll file (dynamic-link library file) doesn’t have references and the code of the files does not link to the memory of the program but they get through a lookup table which points to data or functions. Unix has just one type of library file, with the .a extension and the code of many object file is contained within with the .o extension. When the link is created for a shared object file the definition of the identifier may not be found, so the object code from the library will be included.

How to Extend LVM partition online?

One Logical Volume named lv1 is created under vg0. The Initial Size of that Logical Volume is
100MB. Now you required the size 500MB. Successfully make the size of that Logical Volume 500M
without losing any data. As well as size should be increased online.


Answer: In RHEL 4 LVM (Logical Volume Manager) is Version 2. The new feature added is online
extend. In previous version you should unmount the device.
1. Verify the size of Logical Volume: lvdisplay /dev/vg0/lv1
2. Verify the Size on mounted directory: df -h or df -h mounted directory name
3. Use : lvextend -L+400M /dev/vg0/lv1
4. ext2online -d /dev/vg0/lv1 to bring extended size online.
5. Again Verify using lvdisplay and df -h command.
Explanation: The Feature of LVM is dynamically resize the partition. If you resize data, it will not be
lost. LVM Concepts Multiple Physical Disks belongs to the physical group. Using multiple disks
belonging to physical group we can create on the Volume group. Under that Volume Group we can
create multiple Logical Volume and only these Logical Volumes we can use. As well as we can
increase and decrease the size of Logical Volume by using lvextend, lvresize etc.

Tips Every Admin Should Know

Active Directory

1. To quickly list all the groups in your domain, with members, run this command:
dsquery group -limit 0 | dsget group -members –expand

2. To find all users whose accounts are set to have a non-expiring password, run this command:
dsquery * domainroot -filter “(&(objectcategory=person)(objectclass=user)(lockoutTime=*))” -limit 0

3. To list all the FSMO role holders in your forest, run this command:
netdom query fsmo

4. To refresh group policy settings, run this command:
gpupdate

5. To check Active Directory replication on a domain controller, run this command:
repadmin /replsummary

6. To force replication from a domain controller without having to go through to Active
Directory Sites and Services, run this command:
repadmin /syncall

7. To see what server authenticated you (or if you logged on with cached credentials) you can run either of these commands:
set l
echo %logonserver%

8. To see what account you are logged on as, run this command:
whoami

9. To see what security groups you belong to, run this command:
whoami /groups

10. To see the domain account policy (password requirements, lockout thresholds, etc) run this command:
net accounts


Windows Networking

11. To quickly reset your NIC back to DHCP with no manual settings, run this command:
netsh int ip reset all

12. To quickly generate a text summary of your system, run this command:
systeminfo | more

13. To see all network connections your client has open, run this command:
net use

14. To see your routing table, run either of these commands:
route print
netstat -r

15. Need to run a trace, but don’t have Netmon or Wireshark, and aren’t allowed to install either one? Run this command:
netsh trace start capture=yes tracefile=c:\capture.etl
netsh trace stop

16. To quickly open a port on the firewall, run this command, changing the name, protocol, and port to suit. This example opens syslog:
netsh firewall set portopening udp 161 syslog enable all

17. To add an entry to your routing table that will be permanent, run the route add command with the –p option. Omitting that, the entry will be lost at next reboot:
route add 0.0.0.0 mask 0.0.0.0 172.16.250.5 –p

18. Here’s a simple way to see all open network connections, refreshing every second:
netstat –ano 1

19. You can add a | findstr value to watch for only a specific connection, like a client ip.addr or port:
netstat –ano | findstr 216.134.217.20

20. You can use the shutdown to shutdown or reboot a machine, including your own, in a simple scheduled task like this:
shutdown –r –t 0 –m \\localhost

21. To make planned DNS changes go faster, reduce the TTL on the DNS records you plan on changing to 30 seconds the day before changes are to be made. You can set the TTL back to normal after you confirm the changes have been successful.

22. Set a short lease on DHCP scopes that service laptops, and set Microsoft Option 002 to release a DHCP leas on shutdown. This helps to ensure your scope is not exhausted and that machines can easily get on another network when the move to a new site.


Windows 7

23. Want to enable the local administrator account on Windows 7? Run this command from an administrative command prompt. It will prompt you to set a password:
net user administrator * /active:yes

24. You can do the same thing during install by pressing SHIFT-F10 at the screen where you set your initial user password.
Windows 7 supports several useful new keyboard shortcuts:

25. Windows Key+G
Display gadgets in front of other windows.

26. Windows Key++ (plus key)
Zoom in, where appropriate.

27. Windows Key+- (minus key)
Zoom out, where appropriate.

28. Windows Key+Up Arrow
Maximize the current window.

29. Windows Key+Down Arrow
Minimize the current window.

30. Windows Key+Left Arrow
Snap to the left hand side of the screen

31. Windows Key+Right Arrow
Snap to the right hand side of the screen.

32. To quickly launch an application as an administrator (without the right-click, run as administrator), type the name in the Search programs and files field, and then press Ctrl-Shift-Enter.
Here are some tips that can save you from buying commercial software:

33. Need to make a quick screencast to show someone how to do something? The Problem Steps Recorder can create an MHTML file that shows what you have done by creating a screen capture each time you take an action. Click the Start button and type ‘psr’ to open the Problem Steps Recorder.

34. Need to burn a disc? The isoburn.exe can burn ISO and IMG files. You can right click a file and select burn, or launch it from the command line.

35. Windows 7 includes a screen scraping tool called the Snipping Tool. I have tons of users request a license for SnagIt, only to find this free tool (it’s under Accessories) does what they need.

36. You can download this bootable security scanner from Microsoft that will run off a USB key, which is very useful if you suspect a machine has a virus.

37. A great way to save all your command line tools and make them available across all your computers is to install Dropbox, create a folder to save all your scripts and tools, and add that folder to your path. That way, they can be called from the command line or any other scripts, and if you update a script, it will carry across to any other machine you have.


Windows 2008

38. You can free up disk space on your servers by disabling hibernate. Windows 2008 will create a hiberfil.sys equal to the amount of RAM. This is very useful with VMs that have lots of RAM but smaller C: drives. To disable hibernation, and reclaim that space, run this command:
powercfg -h off

39. You can get to the complete collection of Sysinternals tools online. You can even invoke them from the run command. Use the url: http://live.sysinternals.com or the UNC path: \\live.sysinternals.com\tools.

40. Speaking of the Sysinternals tools, almost any command line in this article can be run remotely on another machine (as long as you have administrative rights) using the psexec command included in the Sysinternals tools.

41. You can kill RDP sessions at the command line when you find that all the RDP sessions to a server are tied up.
regsvr32 query.dll [enter] You only have to do this the first time.
query session /server:servername [enter]
reset session # /server:servername [enter]

42. You can create a list of files and display the last time they were accessed, which is very useful when a network drive is low on space and users swear they have to have that copy of Office 2003 on the network. My advice? If they haven’t touched it in two years, burn it to DVD or write it to tape and then delete it from disk:
dir /t:a /s /od >> list.txt [enter]

43. The Microsoft Exchange Err command is one of the best all around troubleshooting tools you will find, as it can decode any hex error code you find as long as the products are installed on the machine. Download it from here.

44. You can see all the open files on a system by running this command:
openfiles /query

45. You can pull all the readable data out of a corrupt file using this command:
recover filename.ext

46. Need to pause a batch file for a period of time but don’t have the sleep command from the old resource kit handy? Here’s how to build a ten second delay into a script:
ping -n 10 127.0.0.1 > NUL 2>&1

47. If your Windows website has stopped responding, or is throwing a 500 error, and you are not sure what to do, you can reset IIS without having to reboot the whole server. Run this command:
iisreset

48. You can use && to string multiple commands together; they will run sequentially.

49. If you find yourself restarting services frequently, you can use that && trick to create a batch file called restart.cmd and use it to restart services:
net stop %1 && net start %1

50. You can download a Windows port of the wget tool from here, and use it to mirror websites using this command:
wget -mk http://www.example.com/


Linux


51. You can list files sorted by size using this command:
ls –lSr

52. You can view the amount of free disk space in usable format using this command:
df –h

53. To see how much space /some/dir is consuming:
du -sh /some/dir

54. List all running processes containing the string stuff:
ps aux | grep stuff

55. If you have ever run a command but forgot to sudo, you can use this to rerun the command:
sudo !!

56. If you put a space before a command or response, it will be omitted from the shell history.

57. If you really liked a long command that you just ran, and want to save it as a script, use this trick:
echo “!!” > script.sh