# how do you disable login privileges?

## niyogi

how do you disable login privileges?

----------

## Nitro

If you do 

```
 passwd -l <username> 
```

The account wil become locked, the encrypted password will be prefixed by a '!' and will never match any hash.  And to unlock it use 

```
passwd -u <username>
```

----------

## gschneider

 *niyogi wrote:*   

> how do you disable login privileges?

 

if you want to disable console login only (e.g. for ftp users) you can set the users' shell to /bin/false

```
usermod -s /bin/false username
```

Regards,

 Gerald

----------

