|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
/etc/profile file not executed
Hi Experts,
On one of hp-ux box I have writen the code to disable the direct login for some of the users in /etc/profile file. However when logging into terminal seems /etc/profile is not executed and users are still able to directly login into the terminal. Default shell for user is /usr/bin/sh. Are there any configs/settings that needs to be changed for the same? |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Don disable users in /etc/profile by scripting in it
![]() Which way are your users connecting ? If ssh, then check out the man sshd , in which configuration you can allow which users can connect via ssh. Also you can modify the /etc/passwd file and put /sbin/nologin as default shell for users you don't want to login to your system (any protocol). |
| Sponsored Links | ||
|
|
#3
|
||||
|
||||
|
As Peasant recommends, it is not the way to stop people connecting... Now you have not said how they connect, at first look I would say with your issue: Using ssh... If people spend time writing man pages, it is in the hope one will read them, why didnt you? You would not have posted - or at least not in the same way... in ssh man pages you would have heard of ~etc/ssh_config file and more interestingly : ~etc/sshrc file, I use ~ for I suppose path may vary depending of implementation e.g. on my HP: Code:
ant:/usr/local/etc $ ll total 2754 drwxr-xr-x 5 bin bin 1024 Apr 15 2011 . drwxr-xr-x 21 bin bin 1024 May 28 2009 .. drwxr-xr-x 2 root sys 96 Apr 15 2011 bash_completion.d drwxr-xr-x 4 root sys 96 May 28 2009 fonts drwxr-xr-x 2 root sys 2048 Dec 7 2004 gtk -rw-r--r-- 1 root sys 920 Nov 12 2004 im_palette-small.pal -rw-r--r-- 1 root sys 224 Nov 12 2004 im_palette-tiny.pal -rw-r--r-- 1 root sys 3376 Nov 12 2004 im_palette.pal -rw-r--r-- 1 root sys 5474 Nov 12 2004 imrc -rw-r--r-- 1 root sys 1443 Jan 11 2011 slsh.rc lrwxr-xr-x 1 root sys 24 Sep 18 2009 sshd_config -> /opt/ssh/etc/sshd_config -rw-r--r-- 1 root sys 1391457 Mar 15 2007 termcap |
|
#4
|
|||
|
|||
|
If they are using telnet, let's see the code in /etc/profile (blotting any real names with x's). I have a script called from /etc/profile which selectively limits logins on one system according to complex rules.
If they are not using telnet, how do they connect when it is bad? How do they connect when it is good? |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Users who desire to have their .profile executed must explicitly do so in the crontab entry. Why? | thulasidharan2k | Shell Programming and Scripting | 1 | 07-29-2011 02:36 AM |
| Script not getting executed via cron but executes when executed manually. | samsungsamsung | AIX | 3 | 07-15-2011 10:33 AM |
| php file is not executed | phpalerts | Red Hat | 5 | 03-08-2010 01:28 PM |
| File compiles but produces Memory fault when executed | sewood | Programming | 3 | 08-29-2008 04:51 PM |
| changed .profile but didnt ./.profile, yet reflected changes | yls177 | UNIX for Dummies Questions & Answers | 4 | 12-05-2002 10:21 AM |
|
|