Netcat 101: Using Netcat to Transfer Files HakTip
Linux Terminal 101: How to Use Netcat To Chat HakTip
Linux Terminal 101: Netcat HakTip
Linux Terminal 101: Viewer Tips Part 2! HakTip
Linux Terminal 101: Viewer Tips! PID, History, and More! HakTip
Linux Terminal 101: Controlling Processes HakTip
Linux Terminal 101: How to View Processes HakTip
Linux Terminal 101: How to Change Your Identity HakTip
Update All of Your Programs at Once with AppUpdater! HakTip
Network Monitoring in Linux with lsof HakTip
How to Use Problems Step Recorder for Windows HakTip
How to Move Steam Games from Your C Drive HakTip
Chrome Grease Monkey Script for Late Night Coding HakTip
Bash Substitution Without Sed HakTip
How to Safely and Securely Delete and Restore Your Files HakTip
Bash Basics: Keep History Free from Passwords HakTip
Several user accounts can exist on one Linux machine, and you can easily create and remove them using these commands.
There are three ways to change your identity. Log back in as another user, the su command, or sudo. su lets you start a new shell session as that user or issue a single command as that one. sudo can define specific commands that a user can use. The choice depends mainly on the OS you're using- as each one works a little differently. To start shell as another user, the syntax is su [-[l]] [user].-l will create a login shell for that user. -l can be seen as just -. So to change to superuser status you would type su -, then your password. Now you'll see 'root' in place of the username. Always remember to use 'exit' to resume using the OS as a normal user. You can also type su -c 'command' to run just one single command as a superuser. Ex: su -c 'ls -l /root/*'.
An admin can allow users to execute certain commands with sudo. For example, sudo ducky_script, then typing your password, will let you as a regular user run the ducky_script as a regular user. sudo -l will show you what privileges you have.
You can also use chown to change the owner or group owner of a file. It looks like this: chown [owner] [:[group]] file.. . If the argument looked like this: shannon:users it would change the ownership from its current one to shannon, and the group to users. :admins would change the group owner to admins, but the file owner is the same. So if I wanted to change the ownership from me to Darren, I would put sudo chown darren: ~darren/example.txt.
Now that you know some of the reasons why we have passwords for users, lets change those passwords. Use the syntax passwd [user]. To change it, type passwd. Type your current password, and the new one. passwd will make you use a strong password, so it'll deny crappy ones. Check out the passwd man page for more options for this command.
Make sure to email me email@example.com with your thoughts. And be sure to check out our sister show, Hak5 for more great stuff just like this. Don't forget to check out our new show Threat Wire, for internet privacy and security news at youtube.com/techfeed. I'll be there, reminding you to trust your technolust.
Whether you're a beginner or a pro, HakTip is essential viewing for current and aspiring hackers, computer enthusiasts, and IT professionals. With a how-to approach to all things Information Technology, HakTip breaks down the core concepts, tools, and techniques of Linux, Wireless Networks, Systems Administration, and more
Want the most recent episode of this show on your website? Use this self-updating embed code!