Category: Linux

smbclient error in Mounting CIFS and NFS

There is a known working samba share.  There are servers that connect to it.  All of them happen to be Windows boxes.  However, wanted to connect a Linux (CentOS 7) to it.  When testing for a connection, it failed with an error message. The command and the error. The resolution turned out to be a simple one.  Update the client...Read More »

CentOS Linux and passwords

User creation and password changes can be handled as one-liners for as long as you use the correct commands.  Today I learned of another password utility other than passwd.  It is chpasswd, a powerful tool to change passwords without the prompt and the password can be encrypted. To create a user may be a two step process. First create the...Read More »

Rename all files to lowercase names

There seems to be several solutions offered for renaming all files in a directory from mixed or upper case to all lowercase names. Of the solutions, one of the worked without issue. ls | while read upName; do loName=`echo "${upName}" | tr '[:upper:]' '[:lower:]'`; mv "$upName" "$loName"; done Although this was found in an Ubuntu forum, it works flawlessly in...Read More »

Remove non-ASCII characters from file

There was a text file that contained non-ASCII characters that acted like spaces within the file, so I used the tried and true dos2unix command to attempt to clean the file; however, the characters remained.  With hundreds of lines to correct, manually deleting the offending areas of the file was not an option.  A real solution is needed. Once again,...Read More »

The truncate command

If you ever get in a bind and a log file has gone out of control and your disk space is full, you may be tempted to delete the log file.  There may be a couple of problems with that.  One, the application is still using the file so that delete may not actually take place until the application is...Read More »

Best Practice for chown

Over the years, I have seen a couple of variations with the use of the chown command. The ":" (colon) vs "." (dot).  While studying for the RHEL6 exam sometime ago, the books that I had used each had one or the other in their documentation.  I have read that the posix standard is using chown with the ":" (colon)....Read More »

How to Update a Lenovo BIOS with USB

Lenovo provides an ISO for CD/DVD burning and an EXE for running the executable from within Windows.  There is NO support for an ISO booting from a USB.  Many modern laptops are ordered without a CD ROM and maybe an extra hard drive in it's place.  Most people use USB sticks for the majority of their effort when the need...Read More »

How to repair a damage fstab located on an LVM

i made a change to the /etc/fstab that looked perfectly fine until I rebooted the system (CentOS 6) running as a virtual machine.  The system did not start, there was a Kernel panic, and using the single boot mode did not provide any access to the system.  I changed the "/" partition to a UUID number after changing the volume...Read More »