IT Questions and Answers :)

Friday, December 13, 2019

Which of the following is NOT one of the benefits of High-Level Languages (HLL)?

Which of the following is NOT one of the benefits of High-Level Languages (HLL)?

  • It is simple to debug.
  • It is easy to understand.
  • High level language is less memory efficient.
  • It is programmer friendly language.

EXPLANATION

The main advantage of high-level languages over low-level languages is that they are easier to read, write, and maintain. Ultimately, programs written in a high-level language must be translated into machine language by a compiler or interpreter.
The first high-level programming languages were designed in the 1950s. Now there are dozens of different languages, including Ada, Algol, BASIC, COBOL, C, C++, FORTRAN, LISP, Pascal, and Prolog.


Any human-friendly language is a programmer-friendly language because programmers are human!
A language is friendly because it’s easy to learn and easy to use. This minimizes the cognitive load on the programmer. This allows the programmer to be very productive.
So here are the Top 5 most programmer-friendly languages:
  1. Smalltalk! See Richard Kenneth Eng's answer to Why hasn't anyone made a programming language that has super simple syntax unlike our current programming languages (like Python or Java) which have more complicated syntax?
  2. Go
  3. Elixir
  4. Scheme (or Racket)
  5. Python
Ruby is often-touted as programmer-friendly, but it’s definitely not so human-friendly.
Share:

Which of the following conditions is used to transmit two packets over a medium at the same time?

Which of the following conditions is used to transmit two packets over a medium at the same time?

  • Collision
  • Asynchronous
  • Contention
  • Synchronous 

EXPLANATION

A collision is the event in which two or more bodies exert forces on each other in about a relatively short time. Although the most common use of the word collision refers to incidents in which two or more objects collide with great force, the scientific use of the term implies nothing about the magnitude of the force.
In a half duplex Ethernet network, a collision is the result of two devices on the same Ethernet network attempting to transmit data at exactly the same time. The network detects the "collision" of the two transmitted packets and discards them both. Collisions are a natural occurrence on Ethernets.
Share:

On Linux, in additon to root, which users can read /etc/passwd, the password file? Pick the best answer.

On Linux, in addition to root, which users can read /etc/passwd? Pick the best answer.

  • Each user, but only their own entry in the file.
  • All users in group "shadow".
  • All users in group "wheel".
  • All users.

EXPLANATION

/etc/passwd file stores essential information, which required during login. In other words, it stores user account information. The /etc/passwd is a plain text file. It contains a list of the system’s accounts, giving for each account some useful information like user ID, group ID, home directory, shell, and more. The /etc/passwd file should have general read permission as many command utilities use it to map user IDs to user names. However, write access to the /etc/passwd must only limit for the superuser/root account.



The /etc/passwd File. /etc/passwd is a text file that contains the attributes of (i.e., basic information about) each user or account on a computer running Linux or another Unix-like operating system. Each line in /etc/passwd represents a single user.

 Quoting:  https://linux.die.net/man/5/passwd

"Name
passwd - password file
Description
The /etc/passwd file is a text file that describes user login accounts for the system.  It should have read permission allowed for all users (many utilities, like ls(1) use it to map user IDs to usernames), but write access only for the superuser."
The /etc/shadow file, which stores hashed passwords, can only be read by owner root, (and maybe members of group shadow, in some distributions):
$ ls  -lL /etc/shadow
-rw-r----- 1 root shadow 1266 Dec 19  2017 /etc/shadow
The "passwd" utility allows non-privileged users to run the utility with an effective ID of the file's owner, in this case root.  This means that non-privileged users can read and update the /etc/shadow file, via the "passwd" binary, when they change passwords.
ls -l $(which passwd)
-rwsr-xr-x 1 root shadow 51200 Sep 27  2013 /usr/bin/passwd
   ^
## ^ 
## "s" is the setuid bit. 



The setuid bit allows non-privileged users to run /usr/bin/passwd as the file's owner, root.
Note that in modern versions of Linux and Unix, the password file, /etc/passwd, does not contain passwords.  Rather, the second field of each line will have an "x", indicating that a hashed password is stored in /etc/shadow

SOURCE

https://linux.die.net/man/5/passwd

 


Share:

A /27 in CIDR notation is equivalent to which of the following in decimal notation?

A /27 in CIDR notation is equivalent to which of the following in decimal notation?

  • 255.255.255.128
  • 255.255.255.254
  • 255.255.255.248
  • 255.255.255.224 
A /27 in CIDR notation is equivalent to which of the following in decimal notation?

EXPLANATION

There are two parts to an IP address, the network number and the host number. The subnet mask shows what part is which. /27 means that the first 27 bits of the IP address are part of the Network number (192.168.0) the last part is part of the host address (192.168.0.1 - 192.168.0.30).


AddressesHostsNetmaskAmount of a Class C
/3042255.255.255.2521/64
/2986255.255.255.2481/32
/281614255.255.255.2401/16
/273230255.255.255.2241/8
/266462255.255.255.1921/4
/25128126255.255.255.1281/2
/24256254255.255.255.01
/23512510255.255.254.02
/2210241022255.255.252.04
/2120482046255.255.248.08
/2040964094255.255.240.016
/1981928190255.255.224.032
/181638416382255.255.192.064
/173276832766255.255.128.0128
/166553665534255.255.0.0256

 











Share:

What are the National Cyber Security Centre guidelines on password Expiry?

What are the National Cyber Security Centre guidelines on password Expiry?

  • Don't enforce password expiry
  • 30 Days
  • 90 Days
  • 60 Days 

EXPLANATION

Change your passwords regularly” is a common piece of password advice, but it isn't necessarily good advice. You shouldn't bother changing most passwords regularly — it encourages you to use weaker passwords and wastes your time. Yes, there are some situations where you'll want to regularly change your passwords.

 Therefore, for decades, many security guidelines have recommended frequent password changes, usually between 30 and 180 days.

Share:

What is the SID for the Domain Admins security group in Active Directory?

What is the SID for the Domain Admins security group in Active Directory?

  • S-1-5-21domain-512
  • S-1-5-21domain-514
  • S-1-5-21domain-513
  • S-1-5-21domain-515

EXPLANATION

The SID (Security IDentifier) is a unique ID number that a computer or domain controller uses to identify you. It is a string of alphanumeric characters assigned to each user on a Windows computer, or to each user, group, and computer on a domain-controlled network such as Indiana University's Active Directory

An SID looks like this:
  S-1-5-32-1045337234-12924708993-5683276719-19000
Microsoft usually breaks this down into this pattern:
  (SID)-(revision level)-(identifier-authority)-(subauthority1)-(subauthority2)-(etc)
  • SID: The initial S merely identifies the following string as being an SID.
  • Revision level: To date, this has never changed and has always been 1.
  • Identifier-authority: This is a 48-bit string that identifies the authority (the computer or network) that created the SID.
  • Subauthority: This is a variable number that identifies the relation of the user or group described by the SID to the authority that created it. The number tells you:
    • Which computer (or network) created the number
    • Whether this user is a normal user, a guest, an administrator, or part of some other group
    • In what order the user's account was created by this authority (i.e., "This was the first user" or "This is the 231st machine account created".)

    This number is also referred to as the "Relative identifier". There can be several subauthorities involved, especially if the account exists on a domain and belongs to different groups.
This security group has not changed since Windows Server 2008.
Attribute Value
Well-Known SID/RID S-1-5-<domain>-512
Type Domain Global
Default container CN=Users, DC=<domain>, DC=
Default members Administrator
Default member of Administrators
Denied RODC Password ReplicationGroup
Protected by ADMINSDHOLDER? Yes
Safe to move out of default container? Yes
Safe to delegate management of this group to non-Service admins? No
Default User Rights See Administrators
See Denied RODC Password Replication Group
Share:

Which of the following describes openSUSE?

Which of the following describes openSUSE?

  • It is designed to be run one way with little need or capability for customization
  • It is free as in free beer, and free as in free speech
  • A subscription is required to download software updates
  • It is built around propietary software 

EXPLANATION

When there is no difference between the community project and commercial product, the one who pays the bills calls the shots. openSUSE, while sponsored by SUSE, is a relatively independent community. “The community gets to decide what we want in openSUSE.


SUSE Linux. SUSE Linux (/ˈsuːsə/ or /ˈsuːzə/; German: [ˈzuːzə]) is a computer operating system. It is built on top of the free and open source Linux kernel and is distributed with system and application software from other open source projects.
 
Share:

Popular Posts