Delete user with command - proftpd

I would like to know that how to delete a user in proftpd created with command:
adduser username-GroupManager --in group ftpusers --home /home/username/somewhere/
I have not found anything on the web.

vi /servers/proftpd/etc/passwd
shift + /meteo - search file for user meteo
dd - delete line
esc + !wq + enter
I hope this helps.

How to delete а ProFTPd virtual user run this command
ftpasswd --passwd --delete-user --name=qs3_1553011872_7558 --file=/etc/proftpd/ftpd.passwd
How to delete а ProFTPd virtual group run this command:
ftpasswd --group --delete-group --name=qs3_1553011872_7558 --file=/etc/proftpd/ftpd.group
source: https://orbisius.com/blog/how-delete-proftpd-virtual-users-and-groups-p4637

Related

z/OS Unix System Services BPXBATCH ends with CC=3840

My BPXBATCH step is failing and I can't find the specific RC/RSNC described in M&C. For what it's worth, I had the JCL in an HFS dataset and ran USS's submit command.
Can anyone tell me what I did wrong?
Another clue:
My z/OS system will not allow me to sign into my ID in OMVS (3270 mode through ISPF panels), and simultaneously log in to my id in USS's SSH shell. It gives a resource busy error. The sysadmin claims this is not supported, but I suspect it could be made to be supported.
I've tried to find info on messages and codes, but did not see anything for this specific error.
COPYHFS Step
//COPYHFS EXEC PGM=BPXBATCH
//STDERR DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDPARM DD *
SH cp
-P "RECFM=FB,LRECL=287,BLKSIZE=6027,SPACE=(TRACK,(1,1))"
/u/woodsmn/SSC.D051721.T200335.S90.CP037
//\'WOODSMN.SSC.D051721.T200335.S90.CP037\'
/*
STDERR DD
FSUM1004 Cannot change to directory </u/woodsmn>
IEF142I WOODSMNX COPYHFS - STEP WAS EXECUTED - COND CODE 3840 (edited)
I cannot see why you got FSUM1004 Cannot change to directory </u/woodsmn>, since you wrote you can change to directoy /u/woodsmn. So I thought I'd try to reproduce your error, but got different one:
cp: FSUM6258 cannot open file "//'Z10411.SSC.D051721.T200335.S90.CP037'": EDC5121I Invalid argument.
After I changed SPACE=(TRACK,(1,1))to SPACE=(TRK,(1,1)) the job completed without error.
The job did run under your userid WOODSMN, didn't it?

Disable root login in yocto build

I am new in yocto project and I simply want to disable root login in yocto build image?
I do not want my final image to ask me for login. Simply I need to flash my yocto image on sdcard and no login prompt shows.
Any help is appreciated.
iF YOU ARE USING SYSTEM V Add below lines in build/conf/local.conf file.
EXTRA_IMAGE_FEATURES = "debug-tweaks "
IMAGE_INSTALL_append = " mingetty "
Now the below recipe provide the serial inittab open file and look at the do_install function
poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
./poky/meta/recipes-core/sysvinit/sysvinit-inittab/inittab
#1:2345:respawn:/sbin/getty 38400 tty1 #comment this line in bb file
1:2345:respawn:/sbin/mingetty --autologin root tty1 # add this line
If you are using systemd, in the file meta/recipes-core/systemd/systemd-serialgetty/serial-getty#.service change the ExecStart in the service to this :
ExecStart=-/sbin/agetty -a USERNAME -8 -L %I #BAUDRATE# $TERM
change USERNAME to root or other.
When you create your image, add debug-tweaks to EXTRA_IMAGE_FEATURES, this will allow no password to root. and add mingetty.
EXTRA_IMAGE_FEATURES = "debug-tweaks "
IMAGE_INSTALL_append = " mingetty "
After that, edit /etc/inittab, comment out the previous line and use mingetty for autologin;
#1:2345:respawn:/sbin/getty 38400 tty1
1:2345:respawn:/sbin/mingetty --autologin root tty1

How to change sender name in ssmtp?

I have installed ssmtp on my Linux server. Apache server works under www-data user, and send mail from ssmtp. In recieved emails I see www-data in sender name. How can I change it?
Here`s my configs:
/etc/ssmtp/ssmtp.conf
mailhub=smtp.gmx.com:587
hostname=mysite.com
FromLineOverride=YES
AuthUser=username#gmx.us
AuthPass=password
UseTLS=YES
UseSTARTTLS=YES
/etc/ssmtp/revaliases
root:username#gmx.us
user:username#gmx.us
www-data:username#gmx.us
You could change the user finger information for user 'www-data', namelly the 'Full Name" finger parameter.
You may do so using Linux 'chfn' command:
chfn -f "Email Sender Name" www-data
What this does is setting/changing the real name for that user in the finger information (stored in the /etc/passwd file -cf chfn man page-).
Alternatively you could use the Linux 'usermod' command as follow (though Linux manual states this is normally modified using the chfn utility - cf user mod man page - ):
usermod -c "Email Sender Name" www-data
This worked for me.

Displaying output of a remote command with Ansible

In an Ansible role I generate the user's SSH key. After that I want to print it to the screen and pause so the user can copy and paste it somewhere else. So far I have something like this:
- name: Generate SSH keys for vagrant user
user: name=vagrant generate_ssh_key=yes ssh_key_bits=2048
- name: Show SSH public key
command: /bin/cat $home_directory/.ssh/id_rsa.pub
- name: Wait for user to copy SSH public key
pause: prompt="Please add the SSH public key above to your GitHub account"
The 'Show SSH public key' task completes but doesn't show the output.
TASK: [Show SSH public key] ***************************************************
changed: [default]
There may be a better way of going about this. I don't really like the fact that it will always show a 'changed' status. I did find this pull request for ansible - https://github.com/ansible/ansible/pull/2673 - but not sure if I can use it without writing my own module.
I'm not sure about the syntax of your specific commands (e.g., vagrant, etc), but in general...
Just register Ansible's (not-normally-shown) JSON output to a variable, then display each variable's stdout_lines attribute:
- name: Generate SSH keys for vagrant user
user: name=vagrant generate_ssh_key=yes ssh_key_bits=2048
register: vagrant
- debug: var=vagrant.stdout_lines
- name: Show SSH public key
command: /bin/cat $home_directory/.ssh/id_rsa.pub
register: cat
- debug: var=cat.stdout_lines
- name: Wait for user to copy SSH public key
pause: prompt="Please add the SSH public key above to your GitHub account"
register: pause
- debug: var=pause.stdout_lines
If you pass the -v flag to the ansible-playbook command, then ansible will show the output on your terminal.
For your use case, you may want to try using the fetch module to copy the public key from the server to your local machine. That way, it will only show a "changed" status when the file changes.
Prints pubkey and avoid the changed status by adding changed_when: False to cat task:
- name: Generate SSH keys for vagrant user
user: name=vagrant generate_ssh_key=yes ssh_key_bits=2048
- name: Check SSH public key
command: /bin/cat $home_directory/.ssh/id_rsa.pub
register: cat
changed_when: False
- name: Print SSH public key
debug: var=cat.stdout
- name: Wait for user to copy SSH public key
pause: prompt="Please add the SSH public key above to your GitHub account"

SQLGetPrivateProfileString failed with

Typing the command: odbcinst -q -s on RHEL 6, I get the following error message:
odbcinst: SQLGetPrivateProfileString failed with .
All my DSN's are also not showing up when I run:
odbcinst -q -d
Type the command: env |grep 'ODBC' to check if the ODBCSYSINI and the ODBCINI variables are set. If no results are returned - you need to add the variables to the environment variable pointing to the directory and the path to where the odbc.ini file is located as follows (in my case for RHEL 6 it is located at /etc - others may have it on /usr/local/etc):
Edit ~\.bash_profile and add the following lines:
export ODBCSYSINI=/etc
export ODBCINI=/etc/odbc.ini
You are good to go!
In my case (ubuntu 16.04) it was related to this bug, just not ~/.odbc.ini but /etc/odbc.ini. Adding a line to /etc/odbc.ini
[empty-sys]
fixed the problem.
Its too late to answer on this question probably, but it is for those who still couldn't get this resolved using #kapil Vyas answer-
Adding to his answer, you will need to logout and then login again from your user for export commands (saved in .bash_profile) to work.
When I had this problem, I edited /usr/local/etc/odbcinst.ini to add:
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8a.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
Pooling = Yes
CPTimeout = 120
I hope this is helpful.