Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable non-root user login ..

Status
Not open for further replies.

vivek1712

Technical User
Dec 17, 2002
47
0
0
IN
Sometimes it is necessary to disable users from logging into a system,particulary when doing certain types of administration work.

To disable user login in AIX, simply create the file /etc/nologin.

When a non-root user attempts to login, the system blocks the login and displays the contents of the /etc/nologin file. So u can also write a message in the nolgin file which will get displayed when non-root user tries to login.

To enable user login, erase the /etc/nologin file.

/etc/nologin file gets removed automatically if server is rebooted.

Best Regards,
vivek
 
"/etc/nologin file gets removed automatically if server is rebooted" ... I was a little confused about this part ... but it is correct ..

Best Regards,
vivek
 
Vivek,

Will this disconnect users that are attached remotely (telnet, ssh, etc.)? I would like to be able to use this but have remote login for root disabled so admins have to su for tracking purposes.

Thanks,

[morning] needcoffee
 
Hi,

No this will not disconnect non-root users that are already connected. So u can su from ur already existing login. If u don't have any login at the time of /etc/nologin creation and remote login for root has been disabled then first login with ur id , keep that session open and then create /etc/nologin.So now from ur already opened session u can su to root.

Only non-root users who will try to login after /etc/nologin has been created will be blocked.

Best Regards,
vivek
 
That is a great idea.

But I wonder if there is any form requirement in the file /etc/nologin and the authority of the file?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top