Questions tagged [shell]

A shell is terminology for a command-line interpreter most commonly used with Unix-like operating systems, but also used to interact with GUI-based operating systems in a more granular fashion. Not only does it allows the user to run programs from a text interface, but frequently offers basic programming features such as variables, substitution, output redirection, and wildcards.

A shell is terminology for a command-line interpreter most commonly used with Unix-like operating systems, but also used to interact with GUI-based operating systems in a more granular fashion.

Not only does it allows the user to run programs from a text interface, but frequently offers basic programming features such as variables, substitution, output redirection, and wildcards.

The name was first used by Unix operating system for an interpreter used for command prompt, but currently the term shell refers to BASH(Bourne Again SHell) and other command prompt interpreters too.

1348 questions
0
votes
2 answers

How to get the email I entered on Proxmox VE setup in the shell?

When I login to my Proxmox VE7 host, I'd like to get the email that I entered when I set up Proxmox on installation. Is it possible? The idea is to automate certbot initialization non-interactively and I would rather use the email I entered…
Martin Braun
  • 100
  • 11
0
votes
1 answer

Variables on set-hostname and mv command in shell script

I have the below script in Shell: read n for ((i=1;i<=$n;i++)) do echo "Connecting to $publicip" ssh -i ./key.txt root@$publicip 'hostnamectl set-hostname autotest$i.domain.com && mv /etc/letsencrypt/live/autotest.domain.com…
serverstackqns
  • 764
  • 3
  • 16
  • 42
0
votes
0 answers

Strange record in /etc/shadow after useradd -p and crypt function in bash script

Ubuntu 20.04 LTS. There is a simple bash script to add a new user via command line in interactive mode: #!/bin/bash # Script to add a user to Linux system if [ "$(id -u)" -eq 0 ]; then read -p "Enter username : " username read -s -p "Enter…
Skuld
  • 1
  • 1
0
votes
1 answer

export new env params without outputting to terminal

I'm trying to run a script and bash export is outputting text when I don't want it to because it's breaking up the output. I need to run a script which extracts some information and then inserts it into the next commands environment, kind of like…
0
votes
1 answer

Run commands that run in a shell as a script

Running the following commands in a shell runs without issues: ssh user@machine systemctl status my-service.service ssh user@machine sudo systemctl stop my-service.service scp -r ./my-service/* user@machine:/home/user/my-service ssh user@machine…
Ramon Smits
  • 145
  • 9
0
votes
1 answer

How monitor open files and kill its PID by shell script?

My system gets me an error that saying 'Too many open files'. I investigated this error and turned out that /usr/bin/uwsgi created sockets(?) more than 1020. If it creates more than 1020, I guess, the above error comes up with. So What I try to do…
deokyong song
  • 13
  • 1
  • 3
0
votes
1 answer

Automating GDB memory dumps

I'm trying to dump memory from a process on my Linux machine using GDB, but I'm trying to automate this using a script. So far I've been using the following commands (example): $ gdb --pid [pid] (gdb) dump memory dump_file 0x00621000 0x00622000 Is…
0
votes
3 answers

Error when changing shell of root user in Solaris 10

I can't change my shell for root in Solaris 10. When i change, i can't login again after logout. The error is "no shell".
user33651
0
votes
1 answer

finding docker images with tag and name

when I do docker images I have below docker images as list where there are images with multiple tag and also image with latest tag value. REPOSITORY TAG IMAGE ID CREATED SIZE m1 …
Alex
  • 172
  • 1
  • 1
  • 8
0
votes
1 answer

Postfix After-Queue Content Filter full example

i'm trying the Simple content filter example: i followed the steps mentioned here http://www.postfix.org/FILTER_README.html#simple_filter but in line 24 of the content filter that can be a simple shell script like this you need to specify your…
0
votes
2 answers

Default solutions for very limited remote linux shells

I have a user that needs to connect to a remote machine M (via ssh) and run one in a fixed set of commands (say N in total). These commands rely on python, libraries thereof, and privileged access to the network (which machine M has). Are there…
Acorbe
  • 103
  • 1
  • 1
  • 6
0
votes
1 answer

How to know in my network which computers have the local administrator account active

As the title says: How do I know in my network which computers have the local administrator account active? Because, as per security consultant request, we have to know, and if possible, disable, every local administrator account on every of the…
0
votes
1 answer

CGroup not mounted on Fedora 34

I have freshly provisioned Linode instance with Fedora 34. The only thing I have installed on it is libcgroup. cgconfig service is starting properly and there are no errors but the subsystem is not working. I am getting the following error when I…
0
votes
0 answers

Shell Scripting - Multiple Process ID's instead of one

I'm writing a simple bash script to shutdown tomcat, and if it doesn't stop gracefully then check if the tomcat's PID still exists and kill it. I pass the tomcat name as a variable to the script as below. In some instances I pass two or three names…
Raj K
  • 1
  • 1
0
votes
0 answers

strings are over-writing variables when using echo

I've currently got an IP address in a variable and I'm trying to echo that variable with some string at the end: echo $INTERFACE_IP echo ":0.0" echo "${INTERFACE_IP}:0.0" And what I'm getting is: 192.168.240.238 :0.0 :0.0168.240.238 Expected…
doublespaces
  • 121
  • 3