Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I got a set of assignments at work to do to see how can I work around Linux systems (namely I was recommended openSUSE since I will be working with SLES). Most of those assignments are pretty straightforward, or simple enough to find on Google.

However one of the assignments states:

User test03 should not be allowed to use interactive shell

I initially used -s /sbin/nologin option, but apparently this basically turns off the whole account, and I think this is most likely a wrong way to do what the assignment asks for. (I suppose the point is to be able to pipe scripts via ssh or something along those lines, but not to login as user directly.)

I have found heaps of information about how to find out whether shell is interactive, or how to force a script to run interactively and such. However, I have not found anything specific to disabling interactive shell.

Could anyone please point me in the right direction?

Thanks

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Use /bin/false instead to accomplish this.

share|improve this answer
    
I think it's time I marked this as the correct answer. Sorry for the delay... –  user2077697 Apr 18 at 20:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.