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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User accounts without shell accounts/ HOW?

Status
Not open for further replies.

waynemh

MIS
Jun 8, 1999
5
0
0
US
I am setting up a server at my company using Linux 2.0.36 (Red Hat 5.2) and would like it to be both the SMTP and POP3 server as well as an ftp server and web server.<br>
I want users to be able to send and receive email, ftp to their directory, BUT NOT have a shell account (no telent).<br>
How is this done?<br>
<br>
Thanks in advance,<br>
Wayne
 
Try making the shell type in the /etc/passwd file /dev/null instead of /sbin/sh or whatever you have.
 
You need to create a dummy shell. I think if you do the /dev/null idea that was posted the users will not be able to ftp. To create a dummy shell do the following<br>
In the directory were your other shells are located, usually /bin depending on the distribution. I use SuSE not Redhat so I'm not sure were Redhat keeps this info<br>
<br>
touch nosh<br>
chmod 755 nosh<br>
in the /etc/shells file add /bin/nosh<br>
change the users to use /bin/nosh in etc/passwd<br>
<br>
the users will be able to use mail and ftp, but cannot telnet<br>

 
I'm not a guru, so RTFM before trusting my advice implicitly! &lt;grin&gt;<br>
<br>
If you don't want telnet access, disallow telnet connections through tcpwrappers! Take a look at your /etc/inetd file, and you *should* see an entry for telnet there. Comment this out, and restart the inetd (kill it, then run it again).<br>
Now any connection requesting telnet should be refused by the wrappers!<br>
Let me know how you go! :)<br>
<br>
The dummy shell idea should work, too.<br>
I think the appropriate file in RH is /etc/profile rather than /etc/shells but I could be wrong (I'm at work on a windozzze machine, so I can't check :( )<br>
<br>
Cheers,<br>
Milamber
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top