Skip to main content

Posts

Showing posts from September, 2015

Samba set or change user password

Set, update or change a user password in Samba. If domain admin or user password that is set on samba needs to be updated. Open terminal then update using the command below:      smbpasswd -a     smbpasswd -a administrator After pressing enter, type the password twice to validate and confirm the password. If the user name or admin password has been updated on the Windows Active Directory, then the Samba password has to be updated as well. If the samba password is not updated then the client from the windows environment authenticating to samba will not be able to connect to samba shares. To dig more about smbpasswd check out link below: https://www.samba.org/samba/docs/man/manpages/smbpasswd.8.html -a This option specifies that the username following should be added to the local smbpasswd file, with the new password typed (type for the old password). This option is ignored if the username following already exists in the smbpasswd file ...

Disable startup items in Windows 10

Disabling startup items in Windows 10 has changed from the conventional way of doing it. Prior to Windows 10 you can navigate to program items and select the startup option. The registry option might still be the same but don’t mess up with the registry if you are not familiar with it. In Windows 10 disabling startup items is part of the Task Manager option. To launch task manager in Windows 10, right click on an empty space on the taskbar and select task manager. Or press the ctrl+alt+del (press together) and click on task manager. Another way to launch task manager is to use the windows run box. Press “windows key + r” together to launch run box and type “taskmgr” then press enter key or click the “OK” button. (See  screen shot below for the run box) On Task Manager Window select the “Startup” tab and select the item you want to disable. Right click on the program and click on disable or select the disable button at the bottom of the windo...

Command line query service status

How to query windows service status using command line? Sc.exe a command line tool for Windows operating system that every Windows admin should know. The Sys Admin is able to query, list, start or stop Windows services using this tool. Sc.exe command line tool will help to query service status on local computer, remote computers or servers. Example below shows the command line to query or list the services state that are running. Query running services: sc query | findstr /c:" RUNNING"  /c:"SERVICE_NAME" Sample output: SERVICE_NAME: AdobeARMservice         STATE              : 4  RUNNING SERVICE_NAME: AntiVirSchedulerService         STATE              : 4  RUNNING SERVICE_NAME: AntiVirService         STATE...

Netsh show firewall state

How to check Windows firewall advance security current state using command line? Command line below will check whether the firewall state is on or off. To check the firewall state via command line type:        netsh advfirewall monitor show firewall Command above will display the current firewall state. If the state shows “ON” the firewall is working. Sample output: Domain Profile Settings: ---------------------------------------------------------------------- State                                                   ON Firewall Policy                                   BlockInbound,AllowOutbound LocalFirewallRules                            Enable L...

Combine excel cell values

How to combine excel values from different cells? Combining values in excel saves time of course, unless you like to buy some time to drag the work and keep yourself busy. But how to combine values using excel formula? If you have data of first name and last name in different cells and you want to combine those values in another cell without re-typing the data. This formula below will come handy. Let’s assume this value: A1 – contains first name B1 – contains last name D1 – will contain the combine cell values in first name and last name format D2 – will contain the combine cell values in last name, comma and first name format. For cell D1 the formula is: =A1&" "&B1 (Notice the space in between the “&” (ampersand sign) if it is a double space the combine value will have a double space) For cell D2 the formula is: =B1&", "&A1 (Notice that the cell address has been reverse and the comma after cell B1....

Enable ICMP or Ping request on Windows

If you ping a remote computer but fails, it could be that the firewall does not allow ICMP protocol. Enabling ICMP or ping requests is quite useful for troubleshooting purposes but it could be also a security issue. To enable ping or ICMP in Windows Firewall with Advance security, can be done via command line or using the graphical interface. Command line is quite useful if the setting has to be done repeatedly or it has to be done on multiple machines. Command line will also be helpful if a setting has to be enabled or disabled at times. Graphical interface is of course the easiest method if it has to be done one time but if the setting has to be done a couple of times then command line or scripting is definitely a good choice unless the person loves to click and click. Enable Ping response using command line: netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow Disable Ping respo...

JunOS DHCP set MAC or static binding

How to set a static binding in JunOS? How to set a reservation of MAC address in DHCP? How to configure DHCP manual bindings? Different ways of asking on how to do but only one  specific goal, to assign an IP Address to a specific MAC or hardware. In JunOS SRX firewalls type this command: set system services dhcp static-binding 01:02:03:09:0A:0B fixed-address 192.168.1.1 IP Address of 192.168.1.1 will be assigned to a device with this MAC or hardware identifier of 01:02:03:09:0A:0B . See reference below for more details: http://www.juniper.net/documentation/en_US/junos12.1/topics/example/security-device-dhcp-server-configuring.html To do a reservation of MAC Address on Windows see below: Using Windows GUI see this link: https://technet.microsoft.com/en-us/library/dd759190.aspx The GUI instruction may change from version of the operating system but the logic on how to do it stays the same, you need to know the MAC address which will serve as an identifier s...

Display Active Directory Users via command line

Displaying user accounts is quite straight forward using a graphical interface in active directory. What if you need to dot it via command line? How to display AD users via command line? I haven't try this on a server core Active Directory server but this command should work I presume. To display all active directory users in a particular domain type this command line: wmic useraccount list brief BRIEF option will have display these items:   - AccountType, Caption, Domain, SID, FullName, Name The command should be run with the user account with domain admin rights. To export the output to text file or csv file,type: wmic useraccount list brief > d:\my_domain_users.csv If you just need to search for a single user then just pipe the output with the find command, example: wmic useraccount list brief | find "D_Scavenger" If you want to search for users or usernames that has letters "Jo" on their acccounts ...

Juniper JunOS show configuration

Show the configuration in Juniper JunOS using CLI terminal. To show the configuration via CLI terminal type:   - Show configuration Literally type "show configuration" output will be the configuration which syntax will be like a java programming. Example: system {     host-name Firewall_srx240;     root-authentication {         encrypted-password "$1$1BX9/GjQ.yN."; ## SECRET-DATA      }     name-server {         4.4.2.2;     } To show the commands used to create the configuration like in ScreenOS, type: show configuration | display set It will show the commands used to create the configuration. Example: set version 12.1X46-D15.3 set system host-name Firewall_srx240 Those are just basic commands but a good start to learn JunOS. Hope it helps..Cheers.. ------------...