Linux user with non-interactive shell-task

Yes @Tej-Singh-Rana. My comment was for @Sivagurunathan. because thor is then user for jump_host.

my misunderstanding, sorry @elsebasan

Not sure on which Server you add siva, need to do the following. It s bit confusing initially -

  1. thor need to be logged in as root user. You ll find the thor user password from documentation.
  2. After having the root access, thor user now have ssh command access. So you need to connect app01 server(which is actually stapp01 or find the ip from documentation.) But you need to login in app01 server with another user (the user & password are listed in documentation as well)
    So the command would be → ssh user@stapp01 and then you ll be prompted to enter the app01 user’s password. You enter and log in app01 server.
  3. There you create a user with non-interactive shell like sudo adduser username -s /sbin/nologin.

Well the question is not so clear , so need dig into the system as well as read carefully the documentation. I was also stuck initially.

Hopefully it would help. :smiley:

1 Like

thor password provided in the documentation is not working

It should work. I normally use the password provided from the wiki/documentation.

Can anyone tell me where is the Documentation?

https://kodekloudhub.github.io/kodekloud-engineer/docs/projects/nautilus

Same thing here

image

But as per my understanding, you wrote wrong /usr/sbin/nologin instead of /sbin/nologin.

Yes, I did write that, but not mistakenly. I did it on purpose because I know that RHEL based distros (such the kodecloud containers) link the /sbin to usr/sbin. So although the path is different, the program itself is the same and has the same functionality, that is also why I cannot su - to the user (I checked before submitting the task). In the new screenshot below you can see both the link I mention, the inode, that shows it is the same file on the disk and the fact that it has the same functionality in a Centos 7 VM.

image
To summarize, I think the validation should be based on the result and not how it got there. If that is too difficult or out-of-scope, then at least give a hint about not using the /usr/… path.

1 Like

That is correct. Looks likes a technical error. @Inderpreet @Ayman @kodekloud-support3 Can we get confirmation that this is being looked at? Is the expectation to use /sbin/nologin and not /usr/sbin/nologin ?

I am facing the same problem,
I have logged in as a user in appo3 but while logging as root to create user, it is asking for root password, what should I fill

Hello, @hisham.albeik
You can check the already assigned shell in the /etc/passwd. Which is valid or not.

Hello, @Vikrant
What steps did you follow to ssh to app03 server?
You can try below command:
ssh banner@stapp03

For the correct password, check the below documentation.

Hello @Tej-Singh-Rana, thanks for replying. Please see the screenshot. I am entering the password " BiGgr33n" as per the document.is there something else I am supposed to enter.

Strange. Did you try sudo -i?

I’m aware of that. But that is not the concern. The concern is that even though a non-interactive shell was definitely created (even checked through login attempts). The method to achieve it was not what the “script” that checks expected (/usr/sbin/nologin vs /sbin/nologin). Either the script should check that the user does indeed have a non-interactive shell, or the question needs to be specific as to which executable should be used to achieve the desired result.

thanks @Tej-Singh-Rana, it worked :slight_smile:

go through video to understand where you made mistake

1 Like

In your video @1.55 what password did you entered ?..because i am facing issues it says " Authentication failure "…