User Management
User Management
useradd -g rms -G rms -c "[email protected]" ine12397307 ==> create user with giv
secondary with gcose commants
passwd ine12397307
chage -d 0 ine12397307 => set user first login password change
chage -d 0 ine12397307;chage -l ine12397307
chage -l krishna ==> list the user paswword change date and password never Expiry or not
tesco@123
adduser dioneftp
usermod -aG wheel veeamflr ===> add existing user in any secondary group
cat /etc/passwd
useradd -u 10029 -c "RMS Server Service account" rms
useradd -m -u 10100 -g rms -G rms -c "Sankaralingam Moorthy" inc22914473
useradd -m -u 10101 -g rms -G rms -c "Gaurab Dasgupta" xf31
useradd -m -u 10102 -g rms -G rms -c "Komma Jahnavi Priya" inc22914125
useradd -m -u 10103 -g rms -G rms -c "Balamurugan Dhanabalan" gph3
useradd -m -u 10104 -g rms -G rms -c "Prabu Selvaraj" yu16
useradd -m -u 10105 -g rms -G rms -c "Tenju Varghese" inc22912412
useradd -m -u 10106 -g rms -G rms -c "Manikandan Manickam" inc22913804
useradd -m -u 10107 -g rms -G rms -c "L Arun Kumar" inc22913823
useradd -m -u 10108 -g rms -G rms -c "Gopinath" zc40
chown -R rms:root /appl/
visudo
vi /etc/ssh/sshd_config
systemctl restart sshd
clear
passwd inc22914473
chage -d 0 inc22914473
passwd xf31
_ukirtb100 ukirdbw24
mkdir servers_list_SCTASK0026920_output;
cat >othercmd.sh<<EOF
useradd -g users -c "Reshma G" -p '$1$fgjZP5di$dlQn3fhiyaCh8/yopRwbr0' p021549a; chage
gpasswd -a p021549a s_webadmin;
gpasswd -a p021549a s_wasadm;
gpasswd -a p021549a s_dsadm;
gpasswd -a p021549a s_cmci;
gpasswd -a p021549a s_dsadm;
EOF
ercmd.sh
EOF
use strict;
use Socket;
if ($#ARGV != 1) {
print "usage: open_port_check hostname portnumber\n";
exit 2;
}
my $hostname = $ARGV[0];
my $portnumber = $ARGV[1];
my $host = shift || $hostname;
my $port = shift || $portnumber;
my $proto = getprotobyname('tcp');
my $iaddr = inet_aton($host);
my $paddr = sockaddr_in($port, $iaddr);
eval {
local $SIG{ALRM} = sub { die "timeout" };
alarm($timeout);
connect(SOCKET, $paddr) || error();
alarm(0);
};
if ($@) {
close SOCKET || die "close: $!";
print "$hostname is NOT listening on tcp port $portnumber.\n";
exit 1;
ercmd.sh
};
if ($@) {
close SOCKET || die "close: $!";
print "$hostname is NOT listening on tcp port $portnumber.\n";
exit 1;
}
else {
close SOCKET || die "close: $!";
print "$hostname is listening on tcp port $portnumber.\n";
exit 0;
}