![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Prevent users logging in as root | Sepia | SUN Solaris | 3 | 06-05-2008 10:45 AM |
| User not able to login directly using ssh | sag71155 | HP-UX | 2 | 03-26-2008 04:53 AM |
| Can't login root account due to can't find root shell | neikel | AIX | 2 | 01-30-2008 07:07 PM |
| How to prevent local root from su to an NIS user? | nfw | UNIX for Advanced & Expert Users | 3 | 01-08-2008 09:38 AM |
| How to prevent root users from editing files (logs) | vehchi | UNIX for Dummies Questions & Answers | 4 | 12-06-2005 02:29 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Prevent root login directly
Hi
How can I prevent anyone from logging in as root directly? I have added the line console=/dev/null to the file /etc/default/login I was still able to login as root from the console. Please advice. Thanks Srini |
| Forum Sponsor | ||
|
|
|
||||
|
Edit this file if present. You may need to create it first.
vi /etc/securetty put "console and/or root" in here and any other user that you don't want logging in directly. Here is a thread that discusses it as well. Logging in and then su to root
__________________
My brain is your brain |
|
|||
|
i'm sure that the thread starter is not using none of the bsd family variant, but i think useful to say that root login can be prevented [in all .BSD variants] editing /etc/ttys and removing "secure" attribute from all consoles where root login is not allowed. of course, /dev/console might be a good [even the only one] console for root login in single mode :-)
|
|
|||
|
Hi,
I have done this through using the following: I create a file in /etc called telnet_users where I list the name of all users that I want them to login directly to the system. Then in /etc/profile I check if the user (through whoami) is in the telnet_users file if not I exit. If u need the code I can provide it to u Regards |
|||
| Google The UNIX and Linux Forums |