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.
@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
Hi Team,
Please someone validate and confirm…
created the user with non-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.
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.
@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
- login to appserver
- sudo adduser username -s /sbin/nologin .
- to check if the user is created, use cmd compgen -u
where we will get login credentials for App server 1.
I have a task to create an user john in App server 1. But How to get the username & passwrd for this App server 1 to get login into it by using ssh. Please suggest
Okkkkk
/sbin/nologin it works
but whyyyyyyyyyyyyy?
HI @Elsevi ,
The --shell
option specifies the user’s login shell. In this case, we are using the nologin
shell, which is a non-interactive shell that prevents the user from logging in. This is often used for system accounts that need to run background tasks or services, but do not need to log in to the system.