This pos describes how to delete a non-root user with UID zero. If you try to delete a user with UID 0 by userdel command, you will get the following error. # id user2 uid=0(root) gid=0(root) groups=0(root) # userdel user2 userdel: user user2 is currently used by process 1 If you need to delete non-root […]
Archives for August 2021
How to truncate /var/log/lastlog File
/var/log/lastlog is a binary file that holds information about the last time that users logged in to the system. The lastlog file is a sparse file, which means that the apparent size reported by “ls -l” is larger than the actual disk usage of the file(du), because not all blocks in the file are allocated […]
How To Delete Disk Partition using Parted Command
Before removing the partition, make sure to unmount any partitions on the device and turn off any swap space on the device. Do not remove a partition on a device that is in use. Also take backup of the mount point using that partition, if the data is important to you. 1. Execute parted command […]
“userdel: user xxx is currently used by process yyy” – Unable to delete an User
The Problem Unable to remove a user and userdel throws the below error: # userdel -r username userdel: user username is currently used by process xxx The Solution New child processes are being created every time the ‘userdel’ command is run and hence unable to remove the user. You can use the below commands to […]
Microsoft SQL Server – How to verify connection information using SQLCMD
quesstion: How to Verify Connection Information to Microsoft SQL Server using SQLCMD? When you are trying to connect a MS SQL server, if the incorrect information is specified, the following error can occur during database creation or migration: Database Server Error: Named Pipes Provider: Could not open a connection to SQL Server [1231]. A simple […]
How to Change the Port Used by an MS SQL Server
Question: How to determine or configure the port used by a Microsoft SQL Server database instance? How to make the port number of a Microsoft SQL Server database instance static versus dynamic? Verify the TCP/IP Port Used by a MS SQL Server Instance 1. From the Microsoft SQL Server database server, launch the SQL Server […]
How to set the value of “maximum user processes” on IBM AIX
The Problem User is getting below error: This is a prerequisite condition to test whether the hard limit for “maximum user processes” is set to at least 16384. (more details) Expected Value : 16384 The Solution In order to change this system parameter: – Kindly use ‘smit’ (AIX utility) to show or modify the current […]
quotaon command examples in Linux
The quotaon command is used to turn quotas on for a filesystem. Normally when the system is booted, it will turn on quotas automatically. However, you may turn off quotas by executing the quotaoff command followed by the name of the filesystem (the following commands must be executed by the root user): [root@localhost ~]$ quotaoff […]
Basics of C Structures
Arrays provide the facility for grouping related data items of the same type into a single object. However, sometimes we need to group related data items of different types. An example is the inventory record of a stock item that groups together its item number, price, quantity in stock, reorder level etc. In order to […]
Pointers in C Programming: What is Pointer, Types & Examples
The significance of pointers in C is the flexibility it offers in the programming. Pointers enable us to achieve parameter passing by reference, deal concisely and effectively either arrays, represent complex data structures, and work with dynamically allocated memory. Although a lot of programming can be done without the use of pointers, their usage enhances […]