Aniruddha, when u do "usermod -L loginname" it does locks ur system but in this situation the user would never know whats happening to his account and may bug the system administrator. So if there is a valid reason to lock a particular user then the good method would be:
Method 1
--------
step1: vi /home/deny
#!/bin/bash
echo " Boss you are restricted to access this machine"
echo " The reason is ........."
echo " The remedy is this ......"
read
exit 0
:wq
step2: chmod 755 /home/deny
step3: usermod -s /home/deny loginname
* u can use any directory for putting this file /home/deny
Method 2
--------
If ur system is PAM enabled and login is also PAM enabled. Use PAM then.
pam_listfile.so the key for doing this.
This is a decent way of locking users or restricting users.
vineet
> From: "Patwardhan, Aniruddha" <[EMAIL PROTECTED]>
> To: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
> Subject: [LIH]locking a particular user account......
> Date: 08 Jan 2003 08:02:30 -0600
>
> Hi Gurus,
>
> I am an administrator.
> Now I want to lock a particular user account.
> How should I do this??
>
> TIA
> -Aniruddha
>
> ----
>
> From: Sukrit <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [LIH]Test Ignore *nt*
> Date: 09 Jan 2003 01:12:29 +0530
>
> ----
>
signature.asc
Description: This is a digitally signed message part
