Technology

PhpMyAdmin error message when the script has not been run during install...

Submitted by donmc on Mon, 11/03/2014 - 17:35

I see this fairly often when I have done fast installs of ubuntu:
"Connection for controluser as defined in your configuration failed."

What happens is I ignore the install script that needs to run for PhpMyAdmin to establish its database etc.
Happily the fix is fairly easy - just run the script again now:
sudo dpkg-reconfigure phpmyadmin

scripted (bash) password changes for Samba users...

Submitted by donmc on Fri, 06/27/2014 - 19:49

I was excited to find this, so I am saving it here.

To change an smb passwd in a bash script:

echo -e "newpasswd\nnewpasswd" | (smbpasswd -s username)

And note the "\n" in there to push a newline between the two passwords...

For the unix (Linux) username:

echo -e "newpass\nnewpass" | (passwd --stdin username)

bash history date/time stamps

Submitted by admin on Tue, 01/08/2013 - 14:32

By default, the bash history does not keep tabs on the time of day that a given command was run. But it is really as simple as defining ONE environment variable: "HISTTIMEFORMAT"

This from "Linux by Example": HISTTIMEFORMAT takes format string of strftime. Check out the strftime manual to choose and construct the timestamp that suit your taste. My favorite is "%F %T ".

export HISTTIMEFORMAT="%F %T "

Security+ Certified !

Submitted by donmc on Sat, 04/14/2012 - 10:44
Topic

I finally sat the Security+ Cert exam from CompTIA last month. Passed it, but it is definitely not an easy exam - they require memorization of lots of niggly little things that really do nothing to ensure that you really know about Securty. it's more about knowing the names of certain exploits, viruses, etc.

Windows Server Login Script example

Submitted by donmc on Tue, 03/20/2012 - 13:09

Found here:
\\domain.local\sysvol\domain.local\Policies\foldername\USER\Scripts\Logon

Login Script example:

Dim WSHELL, SETNETTIME
CONST DOMAINNAME = "myDomain"

Set WSHELL = Wscript.CreateObject("Wscript.Shell")

SETNETTIME = "net time /DOMAIN:" & DOMAINNAME & "/set /y"
'wscript.echo("Syncing workstation time with server time!")

WSHELL.run(SETNETTIME)
wscript.echo("Time has been Set." & vbCrLf & "Other Scripts disabled.")