Sponsored Content
Top Forums Shell Programming and Scripting AIX pam ssh/sshd configuration not allowing sed or awk Post 302759865 by pjeedu2247 on Wednesday 23rd of January 2013 03:02:25 AM
Old 01-23-2013
AIX pam ssh/sshd configuration not allowing sed or awk

This is a weird problem. Following is my code.

Code:
/opt/quest/bin/vastool configure pam sshd
/opt/quest/bin/vastool configure pam ssh

cat /etc/pam.conf | \
awk '$1=="ssh"||$1=="sshd"||$1=="emagent"{sub("prohibit","aix",$NF);}1' OFS='\t' > /etc/pam.conf

cat /etc/ssh/sshd_config | \
sed -e 's/^UsePAM no/UsePAM yes/' > /etc/ssh/sshd_config

If I remove below from the script, both awk and sed are working accordingly.

Code:
/opt/quest/bin/vastool configure pam sshd
/opt/quest/bin/vastool configure pam ssh

But if I execute them together, those files, which are supposed to change are becoming empty SmilieSmilie

Is there any relation between pam ssh configuration and sed/awk? I totally not getting the point behind that.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Pam configuration

I have suse (SLES 9) machine,I would like to know how to creat a PAM configure file for ldap authentication and loading it using a "config" argument to pam_ldap.so Thanks for your help (0 Replies)
Discussion started by: hassan1
0 Replies

2. UNIX for Dummies Questions & Answers

reread pam configuration

Hi. i am on solaris. I have changed pam configuration. Do i need to let pam re-read its configuration again? If so, how can i do it? ps -ef | grep -i pam, returns no hits. Rgds (0 Replies)
Discussion started by: yls177
0 Replies

3. AIX

Problem starting sshd on AIX

I just installed SSH on an AIX machine: > lslpp -l openssh.base.server Fileset Level State Description ---------------------------------------------------------------------------- Path: /usr/lib/objrepos openssh.base.server 4.1.0.5301 COMMITTED Open... (1 Reply)
Discussion started by: outtacontrol
1 Replies

4. Red Hat

PAM configuration: Kerberos authentication and NIS authorization problem

Hi, I've configured two linux boxes to authenticate against Windows Active Directory using Kerberos while retrieving authorization data (uids, gids ,,,)from NIS. The problem I ran into with my PAM configuration is that all authentication attempts succeed in order.i.e. if someone tried his... (0 Replies)
Discussion started by: geek.ksa
0 Replies

5. Red Hat

sshd started, but ssh/sftp/psftp not working

The OS is CenOS. The sshds is started, but ssh/sftp/psftp are not working with "time out" errors. # service sshd status openssh-daemon (pid 2894) is running... # tail /var/log/secure Feb 16 10:56:47 cenos userhelper: pam_timestamp(system-config-securitylevel:session): updated... (3 Replies)
Discussion started by: aixlover
3 Replies

6. Solaris

LDAP, PAM or SSHD?

Hi, I´m trying to make Solaris authenticate users in AD. NTP is working, nsswitch.ldap is listed above, DNS is Ok and I made something different in pam.conf, krb5.conf and sshd_config (see above) nsswitch.ldap: passwd: files ldap group: files ldap hosts: files dns ipnodes: ... (0 Replies)
Discussion started by: mpcavalcanti
0 Replies

7. Emergency UNIX and Linux Support

PAM? cannot login, ssh or su

look at this, as root user change passwd and su -: I cannot ssh in or rlogin either, (3 Replies)
Discussion started by: bigearsbilly
3 Replies

8. Solaris

pam sshd error

Hi I wanted to convert my pam libraries to 64 bit. so recently compiled my pam_banner and pam_wheel to 64 bit. I got the following error... sshd: dlsym failed pam_sm_authenticate:error ld.so.1 : sshd fatal: pam_sm_authenticate: can't find symbol thnaks (8 Replies)
Discussion started by: chinchao
8 Replies

9. AIX

Ssh not allowing NIS user to login

As I do a ssh <nis_user>@server1 from server2, ssh prompts for certificates (as expected the first time), then it prompts for the users password, as soon as I enter the password, I get a Connection to server1 closed by remote host, and connection to server1 closed. and I disconnect back to the... (3 Replies)
Discussion started by: mrmurdock
3 Replies

10. UNIX for Advanced & Expert Users

SOCKS proxy & PAM configuration exposure

I've got a problem with a proxy configuration. We have an LDAP group that lists all users who are authorised to use the proxy to FTP (usually Filezilla) out to the world, and by implication those not in the group should be denied. My users are delighted that this has been enabled and those that... (9 Replies)
Discussion started by: rbatte1
9 Replies
SSH-KEYSIGN(8)						    BSD System Manager's Manual 					    SSH-KEYSIGN(8)

NAME
ssh-keysign -- ssh helper program for hostbased authentication SYNOPSIS
ssh-keysign DESCRIPTION
ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during hostbased authentication with SSH protocol version 2. ssh-keysign is disabled by default and can only be enabled in the the global client configuration file /etc/ssh/ssh_config by setting HostbasedAuthentication to ``yes''. ssh-keysign is not intended to be invoked by the user, but from ssh(1). See ssh(1) and sshd(8) for more information about hostbased authen- tication. FILES
/etc/ssh/ssh_config Controls whether ssh-keysign is enabled. /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, read- able only by root, and not accessible to others. Since they are readable only by root, ssh-keysign must be set-uid root if hostbased authentication is used. SEE ALSO
ssh(1), ssh-keygen(1), ssh_config(5), sshd(8) AUTHORS
Markus Friedl <markus@openbsd.org> HISTORY
ssh-keysign first appeared in OpenBSD 3.2. BSD
May 24, 2002 BSD
All times are GMT -4. The time now is 03:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy