Wednesday, May 27, 2015

How to disable CTRL-ALT-DEL from rebooting a Linux system

The action taken for CTRL-ALT-DEL is defined in /etc/inittab and if we will look in that file we will see a line similar to the one from bellow (taken from a Debian system):
# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
Here is another example: on RedHat based systems this line will look like:
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
If we want to disable this action we only have to change this line. We can delete it, comment it, or even replace it with something like:
ca:12345:ctrlaltdel:/bin/echo "CTRL-ALT-DEL is disabled"
After making any changes to the inittab file, you will have to tell init to reload it, in order to activate the changes. To do that, simply run as root:
init q

Thursday, February 26, 2015

Logon failure: the user has not been granted the requested logon type for this computer.

1.       Is file sharing turned on?
2.       Have you turned off Password protection?
Try checking the Advanced Sharing Settings from Network and Sharing Center. To do this, follow these steps.
1.       Click Start, Control Panel and then Network and Sharing Center.
2.       Now click Change Advanced Sharing Settings.
3.       Now make sure File and Printer Sharing is Turned On and Password Protected Sharing is Turned Off.
If that does not resolve the problem, try to check the Group Policy Settings.
1.       Click Start and type gpedit.msc in the start search box and press Enter.
2.       Navigate to the following location
Computer Configuration/
Windows Settings/ Security Settings/ Local Policies
3.       Under this click on User Rights Assignment.
4.       Double click Access this computer from the network and check that EVERYONE is added to the list.
5.       If not add it by clicking Add User or group and then type EVERYONE, click OK and then Apply and OK.
Refer: http://windows.microsoft.com/en-US/windows7/Networking-home-computers-running-different-versions-of-Windows

Wednesday, February 25, 2015

Missing or No Security Tab Found in Windows XP Professional

Security tab for the properties of files or folders in Windows XP Professional is the important functionality that enable administrators and users to define security permissions and rights for particular user or group to the computer resources. By default, Windows XP Professional follows recommended setting to enable the use of simple file sharing that hide the Security tab, leaving you with only General, Sharing, Web Sharing & Customize tabs as in the Simple File Sharing UI.

So to see and unhide the Security tab, just use the following steps:
  1. Launch Windows Explorer or My Computer.
  2. Click on the Tools at the menu bar, then click on Folder Options.
  3. Click on View tab.
  4. In the Advanced Settings section at the bottom of the list, uncheck and unselect (clear the tick) on the “Use simple file sharing (Recommended)” check box.
  5. Click OK.
Security tab is available only to Administrator or users with administrative rights. So make sure you login as one. And security can only be set in an NTFS partition. If you’re still having problem to reveal or display the Security tab on files or folder properties, check out the following registry hack and set the value to 0 or simply delete the key:
Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\windows\CurrentVersion\Policies\Explorer
Name: Nosecuritytab
Type: REG_DWORD
Value: 1
If you’re using a Windows XP Professional system that is installed in a Workgroup, the Security tab is also hidden by default because in Windows XP Home Edition and Windows XP Professional, guests are forced to log on to a workgroup. Follow the instruction and information on Microsoft Knowledge Base where you need to set the value for ForceGuest registry key.

Sunday, February 15, 2015

Remote access to Debian Printing (CUPS) web interface from LOCAL

The Common UNIX Printing System (or CUPS) is a printing system and general replacement for lpd and other older systems. The CUPS Debian packages forms a nice, powerful and relatively easy to use printing system on Debian. (http://www.cups.org/)

Install Software:

aptitude update
aptitude install cups cups-client

Start the software:

/etc/init.d/cups start

The easiest way is to use the cups web interface. You can see it by going to

http://localhost:631/admin

But to get to this page remotely for a server, you need to first make some edits to the cupsd.conf file. So do the following:

1. Edit the cups configuration file by first running the following command on your server:

sudo nano /etc/cups/cupsd.conf

2. Change this section :

# Only listen for connections from the local machine.
#Listen localhost:631
Port 631
Listen /var/run/cups/cups.sock

3. Then change this sections :

< Location / >
# Restrict access to the server...
Order allow,deny
Allow from@LOCAL
< /Location >
< Location /admin >
# Restrict access to the admin pages...
Order allow,deny
Allow from@LOCAL
< /Location >
< Location /admin/conf >
AuthType Default
Require user @SYSTEM
# Restrict access to the configuration files...
Order allow,deny
Allow from@LOCAL
< /Location >

4. Finally, restart cups with the following:

sudo /etc/init.d/cups restart

5. You should now be able to log into cups on your server with:

http://your_server_ip_address:631


Note that when you change something, it may tell you that you need to add a certificate to firefox. Do so by clicking the add/get certificate button at the bottom of the firefox error message page. It will also tell you that to change stuff, you need to use the "https" version of the page instead of "http" so just go to:

https://your_server_ip_address:631

You might also have to open/port forward tcp port 631.