Hi
I'm trying to print a directories struct tree that will look like this:
A
_a
_b
_B
__c
__d
__C
___e
B
_a
_b
I'm doing a recursion, but how can I know how much space is needed before printing after the recursion? (3 Replies)
Hello
I am a newbie and want to learn unix .
Does unix and linux are one and same.
I have red hat linux cd but i want to take advice from some one wheather unix and linux are same.
If not ,where i'll get a Unix os setup and how i'll install it.
If linux would do then how should... (3 Replies)
HI can any one help me with the appropriate answers for the below:
1.Enter an # before a command and press .what do you see,and how do you think you can take advantage of the behaviour?
2.Is tar -cvfb20foo.tar*.c legitimate or not.will this command work without the - symbol?
3.The command... (1 Reply)
Hello,
I am quite new to AIX, but have Linux experience.
Iam facing a peoblem with AIX 5.2 running on a 43p Model 150 (RS6000).
I tried everyting and i cant have the network to run properly. :confused:
/etc/hosts looks like this:
127.0.0.1 loopback localhost
192.168.XXX.XXX... (5 Replies)
hi everyone i'm a noob trying to learn unix language.. but seems like i got no leads on how to start..
i'm playing with the 'ps' command.. i'm trying to show the pid, ppid, username, command, cpu utilization (in desc order), process start time and process status.. all in a command.. am i able... (3 Replies)
i've been given an assignment to Write a system utility called recycle that satisfies the following requirements as they might be displayed in a UNIX/Linux man page:
NAME
recycle - stores files in a recycle bin
SYNOPSIS
recycle ...
DESCRIPTION
Recycle is a replacement for the... (3 Replies)
Hi...
I have a folder /home/data ;where some files are present.
aaa_asas.txt
bbb_xxx.txt
ccc_xsxas.txt
ddd_sa2esa.txt
------
Also I have a file which is as follows.(/home/file1)
cat /home/file1
aaa you
bbb are
ccc very
ddd good
--------
now I want to rename all the files in the folder... (7 Replies)
Guys,
There is a file where there are 1000s of records.
In the file if some condition satisfies in a certain TAB record (TAB would be first 3 digits of a certain record) then move TAB and all the records (or lines) after TAB to new_file, until another TAB record is encountered in the same... (1 Reply)
First of all, let me state that I am a windows admin.
I have a windows share mounted to /mnt/server
I need a script that will either login as sudo or perform commands with sudo rights. I need the script to copy all of the users /home folders to the mounted windows share. Now If I can... (2 Replies)
Discussion started by: EricM
2 Replies
LEARN ABOUT CENTOS
pam_ssh_agent_auth
pam_ssh_agent_auth(8) PAM pam_ssh_agent_auth(8)PAM_SSH_AGENT_AUTH
This module provides authentication via ssh-agent. If an ssh-agent listening at SSH_AUTH_SOCK can successfully authenticate that it has
the secret key for a public key in the specified file, authentication is granted, otherwise authentication fails.
SUMMARY
/etc/pam.d/sudo: auth sufficient pam_ssh_agent_auth.so file=/etc/security/authorized_keys
/etc/sudoers:
Defaults env_keep += "SSH_AUTH_SOCK"
This configuration would permit anyone who has an SSH_AUTH_SOCK that manages the private key matching a public key in
/etc/security/authorized_keys to execute sudo without having to enter a password. Note that the ssh-agent listening to SSH_AUTH_SOCK can
either be local, or forwarded.
Unlike NOPASSWD, this still requires an authentication, it's just that the authentication is provided by ssh-agent, and not password entry.
ARGUMENTS
file=<path to authorized_keys>
Specify the path to the authorized_keys file(s) you would like to use for authentication. Subject to tilde and % EXPANSIONS (below)
allow_user_owned_authorized_keys_file
A flag which enables authorized_keys files to be owned by the invoking user, instead of root. This flag is enabled automatically
whenever the expansions %h or ~ are used.
debug
A flag which enables verbose logging
sudo_service_name=<service name you compiled sudo to use>
(when compiled with --enable-sudo-hack)
Specify the service name to use to identify the service "sudo". When the PAM_SERVICE identifier matches this string, and if PAM_RUSER
is not set, pam_ssh_agent_auth will attempt to identify the calling user from the environment variable SUDO_USER.
This defaults to "sudo".
EXPANSIONS
~ -- same as in shells, a user's Home directory
Automatically enables allow_user_owned_authorized_keys_file if used in the context of ~/. If used as ~user/, it would expect the file
to be owned by 'user', unless you explicitely set allow_user_owned_authorized_keys_file
%h -- User's Home directory
Automatically enables allow_user_owned_authorized_keys_file
%H -- The short-hostname
%u -- Username
%f -- FQDN
EXAMPLES
in /etc/pam.d/sudo
"auth sufficient pam_ssh_agent_auth.so file=~/.ssh/authorized_keys"
The default .ssh/authorized_keys file in a user's home-directory
"auth sufficient pam_ssh_agent_auth.so file=%h/.ssh/authorized_keys"
Same as above.
"auth sufficient pam_ssh_agent_auth.so file=~fred/.ssh/authorized_keys"
If the home-directory of user 'fred' was /home/fred, this would expand to /home/fred/.ssh/authorized_keys. In this case, we have not
specified allow_user_owned_authorized_keys_file, so this file must be owned by 'fred'.
"auth sufficient pam_ssh_agent_auth.so file=/secure/%H/%u/authorized_keys allow_user_owned_authorized_keys_file"
On a host named foobar.baz.com, and a user named fred, would expand to /secure/foobar/fred/authorized_keys. In this case, we specified
allow_user_owned_authorized_keys_file, so fred would be able to manage that authorized_keys file himself.
"auth sufficient pam_ssh_agent_auth.so file=/secure/%f/%u/authorized_keys"
On a host named foobar.baz.com, and a user named fred, would expand to /secure/foobar.baz.com/fred/authorized_keys. In this case, we
have not specified allow_user_owned_authorized_keys_file, so this file must be owned by root.
v0.8 2009-08-09 pam_ssh_agent_auth(8)