Linux user with non-interactive shell-task

I have perform the task but shows failed.
PFA

1 Like

have you set it in app1 server?

Yes I have set in app1

Have you set it with option --shell /sbin/nologin?

useradd -s /sbin/nologin siva

It failed for me too.

tony@stapp01 ~] hostname stapp01 [tony@stapp01 ~] date
Tue Apr 14 15:40:15 UTC 2020
[tony@stapp01 ~] id -a anitha uid=1002(anitha) gid=1002(anitha) groups=1002(anitha) [tony@stapp01 ~]

I have created a user anitha with non-interactive shell like below

tony@stapp01$sudo useradd anitha -d /home/anitha -s /sbin/nologin

then it’s a technical issue, you have to contact with KKE team.

How to connect to KKE Team?

I will do it. @Inderpreet @kodekloud-support3 kindly have a look here for this technical issues.

Make sure to execute the useradd command with the parameters: -s /sbin/nologin

I did it same way : useradd -s /sbin/nologin siva

2 Likes

How to login as root or sudo ?while doing its asking for password

sudo. I typed the password for the user = $(whoami).

No luck basan… any straightforward answer … ? for me login user is thor

In witch host?
user thor is for jump_host.
The task is for hosts stapp0X.

https://kodekloudhub.github.io/kodekloud-engineer/docs/projects/nautilus from here @elsebasan

Yes @player001. 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