Skip to main content

Posts

Showing posts with the label CLI

Windows CLI grant Full access to a folder

icacls is a command line utility tool that allows system admin to grant or deny access permissions to a folder or path. Example below grants the user "TheAdminUser1" to the Desktop path specified below. icacls C:\Users\admin\Desktop /grant TheAdminUser1:F To check whether the permissions has been applied or not. cd to the path, like C:\Users\admin\Desktop, then type: icacls . . >> means the current path Once everything is ok a similar output like the image below will be shown, and there should be an "F" access list which means Full Access Permissions. If the output shows "successfully processed 1 files" and failed processes shows "0" files then permission has been applied without any issues. For more complex scenarios, and if the system has PowerShell cmdlets installed like Get-Acl and Set-Acl might offer more flexibility. Cast all your anxieties on him, for he cares about you. - 1 Peter 5:7 Don't let your heart b...

Linux get IP and Gateway and DNS subnet from CLI

In windows getting gateway, IP, subnet and DNS is quite straight forward using ipconfig command via command line.  ipconfig /all or ipconfig -all will show the settings of the IP Address, DNS IP, Subnet mask and Gateway. In Linux world, well it can also be done but need to remember a few command line to get all these settings. Here's how it's done from the command line or terminal. hostname -I;netstat -rn;cat /etc/resolv.conf So, it's hostname -I <--capital letter i and netstat -rn plus the resolv.conf file where the DNS IP Address is set. The ";" semi-colon is to execute the command line one after the other. hostname -I <-- will show the IP Address netstat -rn <-- will show the gateway and the subnet mask (need to install net tools if command is not found) /etc/resolv.conf <-- where the DNS IP Address is set It's quite daunting if you're a newbee, but hey it is just a command line it doesn't bite it just shows good information to know abo...