domenica 25 ottobre 2015

Bring back old style logon panel in Windows 7

The following procedure modifies Windows' registry. Proceed with caution.

Launch Windows' registry editor, Regedit.exe. Go to the following location.


In the right side pane, change the key's value of


to 1.

If you don't see any dontdisplaylastusername, create a new DWORD key. Name it dontdisplaylastusername and set its value to 1.

Possible values of dontdisplaylastusername are

0 - The name of the last user who logged on successfully appears in the Log On to Windows dialog box. This setting is designed to make logging on faster and easier.

1 - The User name field in the Log On to Windows dialog box is blank. This setting is designed to enhance the security of the system by not displaying a valid user name.

sabato 10 ottobre 2015

Standard user can't FTP on OS X default FTP service

If you, like me, are used to work with a standard user and need, for a number of reason, to enable OS X's FTP service ( Enable FTP service in OS X Lion ), typical case is multifunction printer sending scanned documents to your Mac, you'll be surprised to know that you cannot login successfully unless you are an administrator.

host01:~ admin$ ftp localhost
Trying ::1...
Connected to localhost.
220 ::1 FTP server (tnftpd 20100324+GSSAPI) ready.
Name (localhost:admin):
331 User admin accepted, provide password.
230 User admin logged in.
Remote system type is UNIX.
Using binary mode to transfer files.

This is what happen trying to login with a standard user

host01:~ example$ ftp localhost
Trying ::1...
Connected to localhost.
220 ::1 FTP server (tnftpd 20100324+GSSAPI) ready.
Name (localhost:example): 
331 User example accepted, provide password.
530 User example denied by SACL.
ftp: Login failed

User example denied by SACL

SACL stands for Service Access Control List, that is, Access Control List applied to services.

Honestly I don't know if this is a normal behavior on pre OS X Yosemite's version. I'm actually running 10.10.5.

Anyway, the problem is easy solvable following the instructions below.

Open Terminal and issue the command

dseditgroup -o edit -u admin -a example

The password asked is admin's password. The command above add (-a) the user example to the group by the administrator user admin. It also works if the user you are issuing it, is a standard user. 

To remove (-d) example from the group issue

dseditgroup -o edit -u admin -d example


The procedure described above is also valid for OS X El Capitan

sabato 2 maggio 2015

Edit a remote file via ssh

ssh is mainly used to securely remote login to another computer.
It can also be used to issue commands on a remote machine without actually logging in. Thus, you may as well edit a remote file using vi. The syntax would be

ssh user@host 'vi filename'

Unfortunately you'll get the following message

Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal

You can quickly resolve the problem adding -t option to ssh

ssh -t user@host 'vi filename'

Here's what man ssh tells about -t option

  • -t  Force pseudo-tty allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty allocation, even if ssh has no local tty.