Prevent root login directly


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Prevent root login directly
# 1  
Old 09-16-2002
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
# 2  
Old 09-16-2002
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.

https://www.unix.com/showthread.php?s...ent+root+login
# 3  
Old 09-16-2002
CONSOLE=-

I am not aware if it works for systems other than SSolaris
# 4  
Old 09-26-2002
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 :-)
# 5  
Old 09-27-2002
Lightbulb

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
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Prevent user from creating new user from his login

Hi Experts, Need your support Redhat 6.5 I want to create a user with all(read, write, execute) privileges except that user should not be able to create any new user from his login to perform any task. (10 Replies)
Discussion started by: as7951
10 Replies

2. Red Hat

Su root or login root

Hi, I find there is some customized linux with application. When I use login account root and type the password. It is not allow to login. But if I login with specified user and password. Then I use command "su - " and type root passwd. It allow you to switch to "root" account . Or if i... (14 Replies)
Discussion started by: chuikingman
14 Replies

3. Red Hat

Is there any method by which fedora 13 can be boot directly from root??

Is there any method by which fedora 13 can be boot directly from root?? (4 Replies)
Discussion started by: sony star
4 Replies

4. Solaris

Prevent users logging in as root

I would like to know how to prevent users connecting to a server using SSH as root. I would still like them to be able to login with their username and then change to su. But I would like to prevent them logging in directly as root. I have searched the forum and read that I should set... (3 Replies)
Discussion started by: Sepia
3 Replies

5. HP-UX

User not able to login directly using ssh

HI, We are facing a problem while trying to login using ssh. The user is able to login using telnet. We are able to login as another user using ssh and then su to that user which is successfull. What should i be checking for the user to be able to login directly using ssh. Thanks in... (2 Replies)
Discussion started by: sag71155
2 Replies

6. AIX

Can't login root account due to can't find root shell

Hi, yesterday, I changed root's shell in /etc/passwd, cause a mistake then I can not log in root account (can't find correct shell). I attempted to log in single-mode, however, it prompted for single-mode's password then I type root's password but still can not log in. I'm using AIX 5L version 5.2... (2 Replies)
Discussion started by: neikel
2 Replies

7. UNIX for Advanced & Expert Users

How to prevent local root from su to an NIS user?

We have a shared development box, running Solaris 10 that is an NIS client, all the developers have local root password. If they know the NIS uid of another user, they can just do % useradd -u <uid> login And then log in as that user and have full access to his files in his home directory. ... (3 Replies)
Discussion started by: nfw
3 Replies

8. UNIX for Dummies Questions & Answers

How to prevent root users from editing files (logs)

How to prevent root users from editing files (logs)? Is there any way? (4 Replies)
Discussion started by: vehchi
4 Replies

9. Answers to Frequently Asked Questions

Lost root password / Can't login as root

We have quite a few threads about this subject. I have collected some of them and arranged them by the OS which is primarily discussed in the thread. That is because the exact procedure depends on the OS involved. What's more, since you often need to interact with the boot process, the... (0 Replies)
Discussion started by: Perderabo
0 Replies
Login or Register to Ask a Question