Skip to main content


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:

-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 and it is treated like a regular change password comm…

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 window.
If the “disable” option is grayed out o…

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:
        STATE              : 4  RUNNING SERVICE_NAME: AntiVirSchedulerService
        STATE              : 4  RUNNING SERVICE_NAME: AntiVirService
        STATE              : 4  RUNNING SERVICE_NAME: AppHostSvc
        STATE              : 4  RUNNING SERVICE_NAME: Appinfo
        STATE              : 4  RUNNING SERVICE_NAME: AudioEndpointBuilder
        STATE              : 4  RUNNING SERVICE_NAME: Audiosrv

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 LocalConSecRules                             Enable InboundUserNotification                   Enable RemoteManagement                          Disable UnicastResponseToMulticast            Enable
Logging: LogAllowedConnections                   Disable LogDroppedConnections                   Disable FileName                                        …

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.

That’s it those simple formula will save you …

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 response using command line: net…

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 IP Address of 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: To do a reservation of MAC Address on Windows see below: Using Windows GUI see this link: 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 so DHCP will know what IP Address will be …