22 February 2017

Restrict SFTP (SSH) users to home folder

https://bensmann.no/restrict-sftp-users-to-home-folder/

Here is a guide for setting up SFTP users who’s access is restricted to their home directory.
Add the following to the end of the /etc/ssh/sshd_config file:
Subsystem sftp internal-sftp

# This section must be placed at the very end of sshd_config
Match Group sftponly
    ChrootDirectory %h
    ForceCommand internal-sftp
    AllowTcpForwarding no
This means that all users in the ‘sftponly’ group will be chroot’d to their home directory, where they only will be able to run internal SFTP processes.
Now you can create the group sftponly by running the following command:
$ groupadd sftponly
Set a user’s group:
$ usermod steve -g sftponly
To deny SSH shell access, run the following command:
$ usermod steve -s /bin/false
And set the user’s home directory:
$ usermod steve -d /folder
Finally, you probably need to restart SSH
$ service ssh restart
The SSH part should now be in order, but you should make sure that file permissions also are correct. If the chroot environment is in a user’s home directory both /home and /home/username MUST be owned by root and should have permissions along the lines of 755 or 750.
In other words, every folder leading up to and including the home folder must be owned by root, otherwise you will get the following error after logging in:
Write failed: Broken pipe
Couldn't read packet: Connection reset by peer

06 February 2017

How to log in with root in Ubuntu?

How to log in with root in Ubuntu?

Simulate a root environment. If you are an advanced user who needs access to an actual root shell to run specific scripts, simulate a root shell with sudo –i. This command will give you superuser access with root’s environment variables.[3]
  • Enter the command sudo passwd root. This will create a password for root, essentially “enabling” the account. Don't forget this password.
  • Type sudo -i. Enter the root password when prompted.
  • The prompt will change from $ to #, indicating you have root access.

16 January 2017

USB Device - Advanced Repair

USB Device - Advanced Repair

Problems:

Your computer can not find your Flash drive or SD card? or any other problem of your USB devices?

Solution:

U盘为什么要量产?


Step 1: Download ChipGenius, software for assisting users in extracting information about their USB devices, finding out details they need to repair broken flash drives.

Step 2: Run ChipGenius, and find the model number (e.g. PS 2251-07) of the control chip of a USB device (e.g. flash drive).

Step 3: Go to U盘量产网 and find the specific mass production tool for that specific control chip model (e.g. 'PS 2251-07'). Download the tool (e.g. the one on the page - 群联MPALL 7F V5.03.0A量产工具DL07中文版 )

Step 4: Find the tutorial for using the tool (e.g. 金士顿U盘PS2251-07东芝闪存白片量产CDROM成功教程 )

Step 5: Run the tool. Follow the tutorial. The bad flash drive or SD card will be repaired.

(Done)

Can not remove someone's access to a folder

Problem:

Can not remove webmaster's access to folder 'Sarah'. The error message is

'You can not remove Webmaster because this object is inheriting permissions from its parent. To remove Webmaster, you must prevent this object from inheriting permissions. Turn off the option for inheriting permissions, and then try removing Webmaster again.'

Solution:

Right-click folder 'Sarah', choose Properties. Click tab 'Security'. Click 'Advanced'. Click 'Change permissions'. Clear the tick against 'Include inheritable permissions from this object's parent'. Click 'Remove'.

Now you can remove webmaster's access to folder 'Sarah'.

11 January 2017

QuickBooks login dialogue box not appear

Problem:
In QuickBooks, after you open a company file, the login dialogue box would not appear.

Solution:
Re-mapping the network drive to the path of your company file.

09 January 2017

Where can I download the media / ISO for Microsoft Office 2010 Home and Business?

Where can I download the media / ISO for Microsoft Office 2010 Home and Business?

https://answers.microsoft.com/en-us/msoffice/forum/msoffice_install-mso_other/where-can-i-download-the-media-iso-for-microsoft/2ef035a8-8b45-e011-9577-d485645a8348

Follow the instructions (you'll need your product key)
Don't select DVD media (only select this if you want to pay and have a backup DVD shipped to you from Microsoft)
Continue to the download screen.
Done!