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

commands regarding the adding of users into groups n different options with useradd...?

5 Answers   IBM,


What is the complete name of the default configuration file for LILO?

1 Answers  


I want to send pop-up message to samba users when they access the shared folder.... for eg: i want to tell them (dont copy mp3 and video files)

2 Answers  


How to give 2 different gateway IP addresses for 2 different interfaces in same system ?

5 Answers   Toyota,


What is the difference between an argument and an option/switch?

3 Answers   Wipro,


As a system admin i want to know some things what are the troubleshooting issues we are facing frequently and what are the tickets will be raised.

0 Answers   Ondot,


Through ssh whole directory structure from / is shared regardless the user we have connected with ....... how do i prevent sharing ??

4 Answers   Tech Mahindra,


What is page-in and page-out in redhat linux?

1 Answers  


why you are using nis server

2 Answers  


i want to install XP on RHEL5 with virtualization tell me step by step configuration

1 Answers  


Tell me command which is use for create quota database in Linux.

7 Answers   Wipro,


How to load the old kernel without rebooting server

1 Answers  


Categories