Oct 31

Export to file:

pdbedit -e smbpasswd:/mydir/myfile

Import from exported file:

pdbedit -i smbpasswd:/mydir/myfile

written by MG \\ tags: , , , ,

Dec 19

run:

ATTRIB -H -S /S /D  DRIVE:\*.*

DRIVE could be = C or D or E or… Z 🙂

written by MG \\ tags: ,

Nov 16

Using Group Policy Editor is probably the best method, because it can be used either locally, on one computer, or in an Active Directory environment by utilizing the GPO power.

1. Press Start button + R (the Run command), type gpedit.msc and press Enter to launch the Group Policy Editor.

Note: In an Active Directory environment, open gpmc.msc and either edit an existing GPO, or create a new one and link it to the domain level, or to an OU of your choice.

2. In the left pane, expand User Configuration > Administrative Templates > Windows Components > Internet Explorer.

3. On the right pane, double-click on “Prevent performance of First Run Customize settings”. A new settings window will open up.

4. Set the value to “Enabled”.

5. In the options section you must choose one of the two options from the dropdown menu:
•Go directly to “Welcome To IE” page
•Go directly to home page

You need to choose one of the two, otherwise the configuration will not work.

(source: http://www.petri.co.il/disable-ie8-ie9-welcome-screen.htm)

written by MG \\ tags: , ,

Sep 27

(Samba errror : unable to connect to CUPS server localhost – Connection refused)

To disable printing support, you should edit your samba configuration settings.

Edit or add the flowing line to your /etc/samba/smb.conf

load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes

written by MG \\ tags: , ,

Sep 17

Remote Desktop (RDC, Remote Desktop Connection or Microsoft Terminal Services Client) is an useful multi-channel protocol that allows user to connect to and administer remote computer with full screen support. However, as the Remote Desktop Connection screen is effectively running within the host Windows system desktop, users who use keyboard shortcuts frequently may get confused with keyboard shortcuts to use when working on remote PC’s desktop, or getting incorrect, erroneous or unexpected behavior with keyboard shortcuts and accelerators.

For example, Ctrl-Alt-Del keystroke combination is often used to invoke Windows Security dialog where users can run Task Manager, change password, log off, shutdown computer, lock desktop, switch user and etc. When pressing Ctrl-Alt-Del keys on keyboard, the escape interrupt sequence is always captured and processed by local Windows system, despite Remote Desktop Protocol (RDP) connection window is maximized into full screen mode.

Another example is Alt-Tab to switch among multiple opened windows and running tasks or processes. In complete reversal, Alt-Tab works completely on remote box when Remote Desktop Connection is opened in full screen mode, but will only switch between local windows when RDC window is restored down, where RDC window is one of the window in rotation.

To get the intended result, a slightly different keyboard shortcuts are used when applied to a remote desktop session window. Here’s a list commonly used keyboard shortcuts key combination to use in Remote Desktop Connection navigation, together with the action the shortcuts perform and equivalent keyboard shortcuts on local desktop (in brackets).
CTRL+ALT+END: Open the Microsoft Windows NT Security dialog box (CTRL+ALT+DEL)
ALT+PAGE UP: Switch between programs from left to right (CTRL+PAGE UP)
ALT+PAGE DOWN: Switch between programs from right to left (CTRL+PAGE DOWN)
ALT+INSERT: Cycle through the programs in most recently used order (ALT+TAB)
ALT+HOME: Display the Start menu (CTRL+ESC)
CTRL+ALT+BREAK: Switch the client computer between a window and a full screen
ALT+DELETE: Display the Windows menu
CTRL+ALT+Minus sign (-): Place a snapshot of the entire client window area on the Terminal server clipboard and provide the same functionality as pressing ALT+PRINT SCREEN on a local computer (ALT+PRT SC)
CTRL+ALT+Plus sign (+): Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer (PRT SC)

source: http://www.mydigitallife.info/keyboard-shortcuts-in-remote-desktop-connection-rdc-for-navigation/

written by MG \\ tags: , ,

Aug 21

function get_day_before(date){

var bits = date.split(‘-‘);
var d = new Date(bits[0], (bits[1]-1), bits[2]);
var date = new Date(d.setDate(d.getDate() – 1));
var year = date.getFullYear();
var month = date.getMonth()+1;
var day= date.getDate();
if(month<10) month=’0’+month;
if(day<10) day=’0’+day;

alert(year+”-“+month+”-“+day);
}

use: get_day_before(“2012-08-09”);
will return: 2012-08-08

written by MG \\ tags: , ,

May 29

The error message “Word could not create the work file. Check the temp environment variable” is  caused by incorrect registry values in the key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Explorer\User Shell Folders

Run regedit and go to the above path.

On the right hand pane, check the value data for Cache.

It has to be:

%USERPROFILE%\AppData\Local\Microsoft\Windows\Temporary Internet Files

If it is different, double click on Cache and type:

%USERPROFILE%\AppData\Local\Microsoft\Windows\Temporary Internet Files

under value data and click ok.

Close the registry (and restart the computer) and check if it works.

written by MG \\ tags: , ,