Linux User with non-interactive shell

Oh ok. So you were saying the validation might have went wrong? In that case KKE team will look into this.

1 Like

@Inderpreet is there any way to keep this task pending . i have accidentally clicked the finish button . please help me in this regard to finish the task

Same error please check it

Hello, @Hemanthreddy
I think task is about to create a new user with non-interactive shell not just creating a new user.

Hi @a_chhabra, what password you entered for changing as root user. I am able to login but not able to change as root user.

You can use sudo to exec commands with privilege.

I belived the task for creating the user javed was on App2 server.

Hi @Inderpreet I think I performed this task correctly but actually I fail could you help me

@Nes_Leon, the task asks for a non-interactive shell. Your user entry in /etc/passwd has a /bin/bash at the end. bash is an interactive shell

Copy That! thank you so much @francilio!!

1 Like

Hi Team,
Please someone validate and confirm…
created the user with non-interactive shell…

image

Hello Team,

I believe user have been created on the correct server with an interactive shell.

Hello, @Preetesh
I haven’t read about /sbin/false. Can you please tell me why you used that? and any resource link?

Hello Player001

Thank you so much for your response.

I have not used any link, as it was my practice to use “/bin/false” to disable shell for user which can be called a non-interactive shell.

Because I used /sbin/false the task failed, it should be /bin/false.

Some Useful links:

shell - What's the difference between /sbin/nologin and /bin/false - Unix & Linux Stack Exchange.

@Inderpreet

I have performed the task again but it gets failed. Below i have attached the image

Hello, @Preetesh
Because you have added extra slash in the end of nologin. It’s /sbin/nologin not /sbin/nologin/. Hope it will clear your doubts.

Thanks @Tej-Singh-Rana It worked :slight_smile:

@hasmukhrathod…Please follow

ssh user@servername (e.g. ssh banner@stapp03)
adduser “name” -s /sbin/nologin (Make sure you try this from root )

hello guys, follow the below steps

  1. login to appserver
  2. sudo adduser username -s /sbin/nologin .
  3. to check if the user is created, use cmd compgen -u

where we will get login credentials for App server 1.