how can i make an user to nologin without locking the account for the user

Answers were Sorted based on User's Feedback



how can i make an user to nologin without locking the account for the user..

Answer / aman thakur

Simply edit a line in /etc/passwd and chage user's shell to /bin/false(in case of ubuntu) or /bin/nologin(incase of redhat or fedora)

Is This Answer Correct ?    45 Yes 7 No

how can i make an user to nologin without locking the account for the user..

Answer / balaji

usermod -s /sbin/nologin username

Is This Answer Correct ?    11 Yes 2 No

how can i make an user to nologin without locking the account for the user..

Answer / arnab chowdury

Simply edit a line in /etc/passwd and chage user's shell to /sbin/nologin

Is This Answer Correct ?    12 Yes 4 No

how can i make an user to nologin without locking the account for the user..

Answer / tinku prasad

Simply edit a line in /etc/passwd and chage user's shell
to /sbin/nologin

Is This Answer Correct ?    5 Yes 2 No

how can i make an user to nologin without locking the account for the user..

Answer / naveen.esamalla

i know just lock the useraccount ie usermod -L username

Is This Answer Correct ?    10 Yes 9 No

how can i make an user to nologin without locking the account for the user..

Answer / santhosh kumar

use password aging for that user. and set the date which is already past..!!! "chage username" is the command

Is This Answer Correct ?    3 Yes 4 No

how can i make an user to nologin without locking the account for the user..

Answer / girish

vi /etc/passwd
student:x:500:500::/home/student:/bin/bash
student:*:500:500::/home/student:/bin/bash

here student is user and just replace "X" with "*"

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More Linux AllOther Interview Questions

What is the other method of installing Linux O.S other than Text, GUI mode? Why we prefer that for installation of Linux in Real time?

2 Answers  


How to send automated email to a set of people at fixed time ?

3 Answers   Accenture, HP,


I want to configure production interface and manage interface, how to configure both interfaces in Linux. please post the answers

0 Answers  


In Linux(RHEL) server have two users with same name. one is local user and second one is NIS user. if you login the server which user will login (local or NIS)

1 Answers  


How to check all open ports on linux machine and block unsed ports????????

7 Answers   Tech Mahindra,






what is the gate of ftp server in redhat linux?

0 Answers  


How do i check which nfs version I am using ????????

9 Answers   CybAge, IBM,


How to sort a file of size 2N bytes, if I have N bytes of memory?

2 Answers   Yahoo,


How do display error messages instantly when command fails?

4 Answers  


1.how to know cpu information on linux system? 2.how to hardware information on linux system? 3.if we add the new user what are the files will be changed? 4.how to remove the cache in squid server ? 5.how to know ur useing 32bit r 64 bit os ? 6.at booting process at init level which file it is reads? 7.if ur system performance is show what can u do ? 8.if ur file system corrupted what can u do ? fsck also not working? 9.how did u do health check in linux? 10.how did u check system performance in linux? 11.how did u create NIS server? give me the steps ? 12.how did u add a packages in linux ? 13.how did u know depended packages for any package useing rpm how u know? 14.how did you monitor cronjobs in linux ? 15.what is the use of logroted? and how did u do ? 16.port no is already in use so what canu do for that in http? 17.how to samba configurated are not ? there are any command for that ? 18.how to create a NTP Client using commands ? not as graphical... 19.how to know how many members are using any service? like ftp are any other services? 20.what is the differences between cmp,diff,comm commands?

3 Answers  


what is the difference between fork and thread ? and parent and child process in fork system call?

3 Answers   Satyam,


What is the use of DNS Server? Name other servers works same as like DNS?

2 Answers  


Categories