Mark
This user hasn't shared any biographical information
Posts by Mark
How to lock and unlock an user account in FreeBSD
Sep 5th
Any user account can be locked or unlocked only by Administrator (i.e root user). This is done using pw command as explained below.
To lock a user account (mark) from logging in:
[root@techpulp ~]# pw lock mark
To unlock a user account (mark):
[root@techpulp ~]# pw unlock mark
How to check status of password for an account in Linux
Sep 4th
The need to check the status of password for an account comes if you have a habit of locking user account based on certain criteria. In another scenario, if have received requests from employees that have their user accounts expired. This scenario occurs if you have an Organization policy of locking user account for certain number of sequential login failures or if an account is unused for certain period.
To check the status of password of an account, you need to use “passwd” command as shown below.
[root@techpulp ~]# passwd -S mark mark PS 2009-01-21 0 99999 7 -1 (Password set, unknown More >
How to create passwordless account in Linux system
Sep 1st
First of all, you should know that creating a password-less account is a very bad idea. You should be knowing what you are doing before doing so. However this may be of use in certain scenarios like doing SSH or Telnet to a virtual machines created using Virtualization software like VMWare, KVM, Microsoft Virtual PC etc. In such scenarios you should have a dedicated network adapter for each virtual machine that is accessible to the host machine only. Of course any such management service like SSH, Telnet or FTP should be running only on the adapter accessible to Host system More >
How to show desktop pop-up notification in Linux using notify-send command
Aug 27th
It is very useful when you are about to start a bulk job and want to get notified asynchronously after its completion. That helps you continue with other work without having to check for its completion periodically. Of course if you don’t have any other work, you can at least play few games without bothering about the job completion.
There is a command in Linux called “notify-send” that can be used to generate a desktop notification from command line or a script. However where exactly this notification message appears depends entirely on the desktop you are using. For example, if you More >
How to lock and unlock an user account in Linux
Aug 25th
Any user account can be locked or unlocked only by Administrator (i.e root user). This is done using passwd command as explained below. When an user account is locked, Linux sets a irrecoverable password for that account so that login always fails. However Linux still stores the original password of the account before locking so that unlocking such account retains its original password.
To lock a user account (liz) from logging in:
[root@techpulp ~]# passwd -l liz Locking password for user liz. passwd: Success [root@techpulp ~]#
To unlock a user account (liz):
[root@techpulp ~]# passwd -u liz Unlocking password for user liz. passwd: Success [root@techpulp More >
How to retain RPMs downloaded by yum
Jan 16th
Generally yum deletes all RPMs it downloads right after installing them. If you want to save Internet bandwidth and have multiple systems to be updated, you can make yum to keep the RPMs it downloads.
The highlighted line in /etc/yum.conf file can be edited to enable yum keep the cache of RPMs.
[main] cachedir=/var/cache/yum #keepcache=0 keepcache=1 ..
The “keepcache=1” tells yum to not remoe downloaded RPMs. But where are those downloaded RPMS? You can see “cachedir” line in /etc/yum.conf and that is the base directory where yum keeps the RPMs. In this case the cache directory is “/var/cache/yum“.
You can use “find” command as shown below More >
Creating alias commands in Bash to make life easier
Mar 1st
If you have longer command or a set of commands that needs to be run repeatedly and you are tired of typing full command or using history to run them, then alias commands are designed for you. Using history to run set of commands is not so comfortable.
You can define your own command using aliases based on existing commands. For example, you want to mimic Microsoft Windows command line in UNIX or Linux, you define an alias for windows command with the equivalent command in UNIX or Linux. Look at the following example in which a “dir” command is defined More >
How to open a popup window upon page load
Feb 28th
In JavaScript, window.open method can be used to open link in a new window. This method can be used to open a new window when a page is opened. However this method of opening a pop-up window will be blocked by recent browsers as part of their pop-up advertisement blocking feature.
Place the following code in your HTML file.
<script type="text/javascript"><!--
window.open('http://techpulp.com');
//--></script>


Recent Comments