Bash/Linux Flashcards
ls -la
for listing permission
Get-LocalGroup
Get default local groups listed w descriptions
Get-LocalUser
gives the names of users, if they are enabled or not, with description
Get-LocalGroupMember
can see which users are in the group
sudo su -
you become the root user, but not recommended if a mistake has been made
sudo cat /etc/group file
shows which groups or users have sudo accessibility to run commands/unrestricted access
cat /etc/group
shows each group, group password (x means the pw is encrypted), group ID, list of users in the group
cat etc/password
first field is username, password, UID (user ID),
How to reset password in GUI
computer management, local users and groups, select account, properties, then you can ask to reset PW or set it manually for them by selecting set PW
net user cindy ‘some_password’ OR * to then ask for PW for user
OR /logonpasswordchg:yes
to change a users password, set it hidden from sight, or for next login they will have to change it
passwd cindy
changing password for cindy in Linux, you need current PW, then entering a new one
sudo passwd -e cindy
set the password to expire and require a new one in Linux
new -localuser in windows
creates a new user in windows
net user cindy * /add
adds a new user called cindy and asks for the password/hidden in Windows
net user cindy /logonpasswordchg:yes
next login cindy will need to change her password in Windows
net user cindy /del
delete cindy command in Windows
Remove-LocalUser Cindy
removes a local user in Windows
sudo useradd cindy
adding a user in Linux
sudo userdel cindy
deletes a user in Linux
ls -l ~/my_file
listing it using the long flag to see the permissions on the file
- at the beginning is a normal file, D is for directory, the next 9 bits are the permissions grouped in sets of 3
first set is permission of owner,
second set is permission of group,
last is permission of all other users
- means its disabled, otherwise it has rwx (read, write, execute)