Mod 8 Day 4 Flashcards

1
Q

What is the purpose of the Set command?

A

the Set command displays existing shell variables, environmental variables, and shell functions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the purpose of the Export command?

A

Export is a bash built-in command that marks an environmental variable to be exported with any newly forked child processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an environmental variable?

A

an Environmental Variable are global variables, affecting the users’ total environment, and are often upper-case for quick identification.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the purpose of the Source command?

A

the Source command reads and executes the contents of a file that is passed as an argument in the current shell script.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of the Env command?

A

the Env command displays only existing environmental variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What shebang line represents the bash shell?

A

!/bin/bash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the shebang line to represent the Power Shell?

A

!/usr/bin/pwsh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a login shell?

A

A login shell requires system authentication, they are interactive shells, you get the system wide environment , and the users full environment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is an SSH suite?

A

an SSH suite is a suite of software that contains programs that create a secure, encrypted channel of communication for data exchange between networked devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is SCP?

A

SCP securely copies files over the network

  • r -recursively copy entire directories
  • P -specifies what port to use as apposed to default port 22

default port of (22)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is SFTP?

A

STFP is an ftp-like client used for file transfer over a network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is SSH?

A

SSH requires a successful login to the remote system, after which a shell opens to execute commands on that system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is an RSSH?

A

RSSH is a restricted secure shell, it can be configured to specifically restrict use to scp or sftp.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the purpose of the chsh command?

A

the chsh command allows the current user to change their current shell by entering the shell executable that they are wanting to change to

ex: chsh -s /bin/sh billy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a non-login shell?

A

A non-login shell is started by a program without requiring a new login.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What file contains a user specific enviornment and startup programs?

A

~/.bash_profile

17
Q

What file contains user specific aliases and functions?

A

~/.bashrc

18
Q

What file has the purpose of authentication and authorization?

A

/etc/passwd

19
Q

what file has the purpose of authentication?

A

/etc/shadow

20
Q

what file has the purpose of authorization?

A

/etc/group

21
Q

What is the contents and purpose of /etc/passwd file?

A

/etc/passwd contains editable user account information for each user. during login the information provided by the user is compared to information in this file, if they match they are authenticated and taken to their home directory.

mnemonic: Never Pass Up Good Chicks Doing Shots

22
Q

What is the contents and purpose of /etc/shadow?

A

/etc/shadow contains everything to do with a users password, it contains copies of a users hashed password.

mnemonic: U Have Lost Many Matches Winning Is Everything.

23
Q

what is the contents and purpose of /etc/group file?

A

/etc/group is where supplemental group membership is maintained. it contains a listing of every group on the system and user memberships in the group.

mnemonic: Grand Pa Got Shot

24
Q

What is the command to create a group?

A

groupadd

-g - allows you to set your GID

25
Q

What is the command to switch the currently logged in user to a different group?

A

newgrp is used to switch the user to a new group

26
Q

What is the command to create a new user?

A

useradd is used to create a new account

  • c -comment
  • g primary group
  • G supplementary group
  • d specifies path of users home directory
  • m creates a home directory if one does not exist.
  • s specifies non-default shell
  • n creates a user with systems default group value
27
Q

What is the command to update a users authentication token?

A

passwd

  • e expire password for an account
  • i days before expired password indicates inactive account
  • n sets min field for number of days
  • x sets max field for number of days
  • w sets warning field for number of days
  • l locks user account (-u unlocks)
28
Q

what command can change and view a users password expiration information?

A

chage

-l displays account aging information

29
Q

what command allows you to change parameters set to useradd?

A

usermod

  • s
  • g
  • G
  • a

syntax: usermod [options]

30
Q

What command allows you to delete a user?

A

userdel

  • r recursively removes a users home directory
  • f force removal even if logged in
31
Q

what command syncs up information between /etc/shadow and /etc/passwd?

A

pwconv

32
Q

what command prints the users real and effective UID and GUID?

A

id