02-28-2013
sudo -i is not actually a system login. /bin/login is not involved, so the motd doesn't happen.
When you login to an actual terminal username prompt, you're talking to /bin/login.
10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
Is there an issue with it? (2 Replies)
Discussion started by: Spetnik
2 Replies
2. Shell Programming and Scripting
I need to replace the current /etc/motd text file with a new motd across 30+ servers.
Which is the best way to do this? Shell script? sed?
Does anyone have an example I can use?
Thanks in advance. Unix people are the best!!! :) (2 Replies)
Discussion started by: antalexi
2 Replies
3. UNIX for Dummies Questions & Answers
I have a site, www.mySite.com
I have a folder where pages are served from, htdocs/
I have a folder containing one site at htdocs/drupal/. I'd like to be able to go to www.mySite.com and see the index.php page within the drupal folder, but instead I see a directory listing:
drupal
phpBB3
... (9 Replies)
Discussion started by: kumakuma
9 Replies
4. Solaris
Hi Gurus out there...
I am pondering over a situation where I have non-root access (user account), where I am trying to determine paths (including multipaths) on a host.
"luxadm display" seems very appropriate, but requires root access.
Is there anyway I can get the FC path information?
... (1 Reply)
Discussion started by: verisund
1 Replies
5. IP Networking
I have a Linux server connected to the Internet like so:
Server (66.77.88.130) -> /29 VLAN Gateway (66.77.88.129) -> Core Router (64.0.0.1) -> Internet
If I run a traceroute from my server to an arbitrary site on the internet I get a result like this:
# traceroute some-other-server... (2 Replies)
Discussion started by: ramnet
2 Replies
6. Homework & Coursework Questions
im making c code in linux and im having problems with one command, id should bring up a list but instead id doesnt do nothing, there are no error's, can anyone solve whats wrong ?
void environ()
{
extern char **environ;
int i=0;
for (i = 0; environ !=NULL;i++)
{
... (1 Reply)
Discussion started by: figureout
1 Replies
7. UNIX for Advanced & Expert Users
I'm trying to compile vim73 with the Motif Toolkit.
./configure --enable-gui=motif
make
./src/vim -g
Vim runs in a window, without the standard toolbar and
menu bar.
I tried to recompile with
./configure --enable-gui=gnome2It compiled with GTK2 toolkit, but still no menubar, nor toolbar.... (0 Replies)
Discussion started by: mghis
0 Replies
8. Emergency UNIX and Linux Support
Hi guys.
I have installed Acronis disk director in windows XP and allocate some free space to install Debian beside fedora.
after completion i rebooted and now grub is in command line mode and does not show the menu list.
(I didn't remove the fedora partition. I just allocate some space from... (1 Reply)
Discussion started by: majid.merkava
1 Replies
9. Red Hat
I've created a Perl daemon that needs to send an email when an error/shutdown occurs. I use the Perl Email::Valid module and that uses sendmail. When I run the script as a regular user, the email is sent with no issues. When I run the script as the root user, I get the following message in... (1 Reply)
Discussion started by: OldManEd
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have a cronjob that mounts machines every 15 minutes.
sudo mount -t cifs -o username=Ren_user,password=AIB#1109$,nounix,bg,sec=ntlmssp //10.204.129.233/Desktop /mnt/clinical/234mac
When I open a new shell and ls /mnt/clinical/234macto the mount point it is blank, but when I do the... (7 Replies)
Discussion started by: jdilts
7 Replies
LEARN ABOUT PHP
stream_socket_enable_crypto
STREAM_SOCKET_ENABLE_CRYPTO(3) 1 STREAM_SOCKET_ENABLE_CRYPTO(3)
stream_socket_enable_crypto - Turns encryption on/off on an already connected socket
SYNOPSIS
mixed stream_socket_enable_crypto (resource $stream, bool $enable, [int $crypto_type], [resource $session_stream])
DESCRIPTION
Enable or disable encryption on the stream.
Once the crypto settings are established, cryptography can be turned on and off dynamically by passing TRUE or FALSE in the $enable param-
eter.
PARAMETERS
o $stream
- The stream resource.
o $enable
- Enable/disable cryptography on the stream.
o $crypto_type
- Setup encryption on the stream. Valid methods are
o STREAM_CRYPTO_METHOD_SSLv2_CLIENT
o STREAM_CRYPTO_METHOD_SSLv3_CLIENT
o STREAM_CRYPTO_METHOD_SSLv23_CLIENT
o STREAM_CRYPTO_METHOD_TLS_CLIENT
o STREAM_CRYPTO_METHOD_SSLv2_SERVER
o STREAM_CRYPTO_METHOD_SSLv3_SERVER
o STREAM_CRYPTO_METHOD_SSLv23_SERVER
o STREAM_CRYPTO_METHOD_TLS_SERVER
If omitted, the $crypto_type context option on the stream's SSL context will be used instead.
o $session_stream
- Seed the stream with settings from $session_stream.
RETURN VALUES
Returns TRUE on success, FALSE if negotiation has failed or 0 if there isn't enough data and you should try again (only for non-blocking
sockets).
CHANGELOG
+--------+------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+------------------------------------+
| 5.6.0 | |
| | |
| | The $crypto_type is now optional. |
| | |
+--------+------------------------------------+
EXAMPLES
Example #1
stream_socket_enable_crypto(3) example
<?php
$fp = stream_socket_client("tcp://myproto.example.com:31337", $errno, $errstr, 30);
if (!$fp) {
die("Unable to connect: $errstr ($errno)");
}
/* Turn on encryption for login phase */
stream_socket_enable_crypto($fp, true, STREAM_CRYPTO_METHOD_SSLv23_CLIENT);
fwrite($fp, "USER god
");
fwrite($fp, "PASS secret
");
/* Turn off encryption for the rest */
stream_socket_enable_crypto($fp, false);
while ($motd = fgets($fp)) {
echo $motd;
}
fclose($fp);
?>
The above example will output something similar to:
SEE ALSO
"OpenSSL Functions", "List of Supported Socket Transports".
PHP Documentation Group STREAM_SOCKET_ENABLE_CRYPTO(3)