To create a user named ravi
with a non-interactive shell on App Server 1, follow these steps
✅ Linux CLI
- Access App Server 1 If you're managing multiple servers, first connect to App Server 1 via SSH
ssh user@stapp01 # Replace `user` with the appropriate username
-
Create the user with a non interactive shell
Use
/sbin/nologin
or/usr/sbin/nologin
(depending on the distro)
sudo useradd -s /sbin/nologin ravi
-s /sbin/nologin
sets the user's shell to "non interactive" (i.e., login access is disabled).ravi
is the username.
On some systems, the non interactive shell might be located at
/usr/sbin/nologin
. Use that if/sbin/nologin
doesn't exist.
- Verify the user and shell Run
grep ravi /etc/passwd
Expected output
ravi:x:1001:1001::/home/ravi:/sbin/nologin
ssh steve@stapp02
(enter the password for steve user)
sudo -i
(again enter the password for steve user)
useradd amar -s /sbin/login
refer this link for usernames and passwords for different servers within nautilus.
Top comments (0)