Disable users to direct login


 
Thread Tools Search this Thread
Operating Systems Solaris Disable users to direct login
# 1  
Old 10-15-2012
Disable users to direct login

Hi all,
how can I disable direct login to a Solaris system not only for root user but also for other accounts?

Looking in google I came to the following:

For telnet (/etc/default/login):
  • disable root access> CONSOLE=/dev/console
  • disable generic user> ?

For ssh (/etc/ssh/sshd_config):
  • disable root access> PermitRootLogin No
  • disable generic user> DenyUsers username1 username2

I also found references to files:
  • /etc/hosts.deny
  • /etc/hosts.allow

Which is the best practice?

Thanks in advance,
Evan
# 2  
Old 10-15-2012
If you disable all logins, how do you plan on logging on to perform maintenance, such as patching?

If you want to disable remote access, just don't run telnet or sshd.
# 3  
Old 10-15-2012
Strange answer ... anyway I just want to disable the following users:
  • root
  • achenle

Thanks,
Evan
# 4  
Old 10-15-2012
# 5  
Old 10-15-2012
Hi all,
thanks for your contribute.

Reading blogs, forum and techdoc came out that there's no way to deny a specific user (except root) to login directly with telnet.

I was able to make some tests in the lab and I think that the right solution is the one provided in my first post.

Moreover I'm going to discuss with colleagues to stop the telnet service so that we should solve the problem of direct access with specific user "X".

Thanks again.

Kind regards,
Evan
# 6  
Old 10-15-2012
How can i prevent logging user1 from console?

See post by jlliagre. You can change the user to a role (only) thereby preventing login. He also explains how to allow another user to take on this role.

Root is a role by default in Solaris 11. Another user can su to become root.

You can therefore make root and achenle unable to login directly by changing both to roles.

Last edited by hicksd8; 10-15-2012 at 12:52 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

How to disable sudo -i in sudoers file for users?

All, I need to disable "sudo -i" and "su - " for all servers in our environment, We want to make sure no one run commands or delete files across environment using switching to root account. can you guys please lets me know if this is achievable. Thanks and Regards shekar (2 Replies)
Discussion started by: shekar777
2 Replies

2. Shell Programming and Scripting

Manipulating sed Direct Input to Direct Output

Hi guys, been scratching round the forums and my mountain of resources. Maybe I havn't read deep enough My question is not how sed edits a stream and outputs it to a file, rather something like this below: I have a .txt with some text in it :rolleyes: abc:123:xyz 123:abc:987... (7 Replies)
Discussion started by: the0nion
7 Replies

3. Solaris

Temporary disable of users

HI Gurus can I temporary disable users to connect to Solaris, need help Regards (3 Replies)
Discussion started by: smazshah
3 Replies

4. AIX

AIX Disable direct root login problems

I have disabled rlogin for root successfully , but after that i could not login to root from console and could not su to root from other users as it responded as expired account I did not have any admin user but I have managed to recover the situation by accessing rootvg before mounting it, but... (5 Replies)
Discussion started by: majd_ece
5 Replies

5. Solaris

Direct login without password

Hi, I am trying to setup direct login from server test1 (Solaris 10) to server test2 (Solaris 9) using id taops (ldap id). Process Followed on Test 2. created .rhosts file in home directory of user taops geneted public key on test1 and appended to authorized keys on test2. Now trying... (8 Replies)
Discussion started by: tuxian
8 Replies

6. UNIX for Dummies Questions & Answers

How to disable root login (Not over SSH)?

I have already disabled root login over the ssh by modifying /etc/ssh/sshd_config. But how would i disable root login on a server itself. We have implemented LDAP in our environment and our security guide states that root login must be obtained by first logging into the host using his/her own... (2 Replies)
Discussion started by: pinga123
2 Replies

7. Solaris

Disable local user from remote login

Is there a way to disable a certain local user from remote login, and only allow su to that user. :confused: i know i can stop remote login for root user, i need it for other users. Appreciate your help (4 Replies)
Discussion started by: mduweik
4 Replies

8. Linux

ssh - disable direct root login

Hi Guys.... I am a newbie to unix. I have a requirement. I have a server. I have to configure ssh to disable direct root login and then add a user with sudo access to this server.Then change the ssh port to 22315 and the server should permit the ssh only from my local machine ip.I also have to... (1 Reply)
Discussion started by: mahesh_raghu
1 Replies

9. AIX

How to disable user login infor?

If user login and don't do anything in 15 mins, the user is kicked off from the server. how to disable it? (5 Replies)
Discussion started by: rainbow_bean
5 Replies

10. UNIX for Dummies Questions & Answers

Disable Root Console login

After Configuring a brand new netraT1, It appears, the only way you can log in as root is throught the Serial Port (console). I believe there is a file in /etc which can be edited to allow root to access login via other methods eg: telnet, ssh, etc. My Question: Which file contains... (2 Replies)
Discussion started by: SmartJuniorUnix
2 Replies
Login or Register to Ask a Question