How to find and change a user’s UID on Linux?
How to find and change a user’s UID on Linux?
Find the UID of a user:
id -u $USER_NAME
Change a user’s UID:
# usermod -u $NEW_UID $USER_NAME
How to find and change a user’s UID on Linux?
Find the UID of a user:
id -u $USER_NAME
Change a user’s UID:
# usermod -u $NEW_UID $USER_NAME
Creating file-backed virtual block device (VBD) for Xen virtual machines and installing Fedora 12 in Xen DomU via internet will be introduced. Note that this tutorial is based on a pretty old OS (Fedora 12). But the method here is still valid while some minor details may need to be changed for latest Xen and…
In the screen, copying the history of the window output is quite hard. How to save the screen easily to a file? First type Ctrl + A then : to get to command mode. In the command mode, execute hardcopy -h /path/to/file screen will save the window output to /path/to/file. Read more: How to run…
BBCode is another markup language to format posts widely by forums, which is easier and clearer than HTML. WordPress provides a visual editor and some easy-to-use tools, but no built-in BBCode support. Let’s see how to add BBCode support in WordPress. We can add BBCode support to WordPress with the BBCode plugin by bOingball that…
Where to search and download some free and nice images to be used on my websites? The best one for searching the free images is still Google. Google Image Search has a “Advanced Image Search” where you can choose the usage rights. Choose the “free to use, share, or modify, even commercially” option will lead…
My program reports that the port is already used. How to find which program or process is listening on a certain port in Linux? You can use netstat to do this. netstat can print network connections. For example, to find which program is listing on port 9999 netstat -pln | grep 9999 You will need…
How to get the full request URL of the page being processed in PHP? If you are sure the request is a http or https one, and the PHP script is executed according to (e.g. by a load balancer or apache reverse proxy) the REQUEST_URI/HTTP_HOST which are set by the client, the PHP script can…