- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- lock account but still need access via ssh
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2008 02:10 PM
09-10-2008 02:10 PM
lock account but still need access via ssh
Is there a way to lock an account on HP-UX, but still allow access via ssh using public keys? On Solaris I can set an account up that has no password (an "NP" in the encrypted password field in /etc/shadow) which
means a user can't directly login via telnet, but can still login using ssh and public keys. It seems that if I lock accounts on HP-UX (trusted) and normal, then I'm unable to log in via ssh. is there a way? Please help?
Thanks
Terry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2008 05:31 PM
09-10-2008 05:31 PM
Re: lock account but still need access via ssh
I am a little confised about the statement "On Solaris I can set an account up that has no password which
means a user can't directly login via telnet, but can still login using ssh and public keys"
Setting no password is not same as account is locked. So i dont think you are comapring apple to apple.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2008 07:37 PM
09-10-2008 07:37 PM
Re: lock account but still need access via ssh
In your case, you don't want to allow telnet logins. So, you would disable the telnet daemon, telnetd. You would have to do this for other methods you don't want to allow, such as ftp and the "r" commands.
you want to have access using ssh. So, install the secure shell software. sshd can be configured as to which methods of authentication that can be used. You would configure sshd to disallow password authentication and to allow public keys.
you should check as to what you mean by "locking" the account. when an account is locked on a unix system you cant login weather your using ssh with public keys or telnet with a password. And that is the way it is on solaris, hp-ux, aix or linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2008 09:20 PM
09-10-2008 09:20 PM
Re: lock account but still need access via ssh
As far as I know, locking the account will prevent access via SSH too on any platform.
But if you set a password and expire it, then TELNET access will not be possible (unless the user knows the old password of course), but SSH using keys will continue to work fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2008 09:27 PM
09-10-2008 09:27 PM
Re: lock account but still need access via ssh
Addendum:
In fact, if you just have a valid password for an account but don't let the user know what the password is then you get the same scenario.
If you don't set a valid password then the SSH will fail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2008 09:59 PM
09-10-2008 09:59 PM
Re: lock account but still need access via ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2008 10:11 PM
09-10-2008 10:11 PM
Re: lock account but still need access via ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2008 10:29 PM
09-10-2008 10:29 PM
Re: lock account but still need access via ssh
here i enter "NP" in /etc/shadow
sandchau:NP:14133::::::
after thois if i try ssh it is OK.
then i tried to lock account
suxde033 # passwd -l sandchau
root as root@suxde033 [/root]
suxde033 #
cat /etc/shadow|grep sandchau
sandchau:*:14133::::::
sandchau@suxde900 /home/sandchau > ssh suxde033
Connection closed by 10.55.243.35
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2008 04:20 AM
09-11-2008 04:20 AM
Re: lock account but still need access via ssh
On hpux you have the /var/adm/inetd.sec file which can restrict the telnet/ftp users by IP.
This doesn't affect sshd as it runs as daemon and not by inetd.conf.
Usually lately the telnet/ftp are completely disabled in /etc/inetd.conf.
After having the telnet disabled, you can play with the ssh configuration - on hpux it's in /opt/ssh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2008 04:48 AM
09-11-2008 04:48 AM
Re: lock account but still need access via ssh
As already said it is not true in case of HP-UX. Not worked on solaris much but if this is the case it is a security concern.
Once user is blocked intensionally then there should not be another mean to open backgate to him..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2008 05:05 AM
09-11-2008 05:05 AM
Re: lock account but still need access via ssh
I have to disagree with all previous posters. You *can* do this exactly as you can on solaris. Doing this is a good security practice for accounts that you don't want to have directly accessible but still want/need to be accessible. The other advantage to this is cron still works. If you lock an account via the passwd command, the cron jobs for that account are disabled. Using the NP option, cron still works.
The trick is the same in HPUX as it is in solaris. You replace the encrypted password in the /etc/shadow or appropriate /tcb/files file with NP. Since NP is an invalid encrypted password, people will not be able to use password authentication to access the account *but* ssh/public key authentication still works as does sudo.
You can provide sudo access to the account set up this way so that users have to log in as themselves, then sudo to the user. The approriate sudoers entries would look similar to:
User_Alias ORA = ${user1}, ${user2}
Cmnd_Alias ORASU = /bin/su - oracle, /usr/bin/su - oracel
ORA ALL=(ALL) ORASU
I'm honestly a little surprised at the previous posts. This is a fairly standard security practice for disallowing direct password access to application admin accounts - usually for all the same reasons you don't want to have direct password access to root.
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html