Unix OS





Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.

Share tech news, updates, or what's on your mind.

Sign up to Post

Was told by one of the vendor selling Ivanti (LanDesk related)
patch mgmt product that RedHat had since controlled it such
that any products that do patching for RHEL must have a
Satellite server with valid subscriptions for each RHEL endpoints
to be patched.

We don't want to do 'yum' (ie permit backend servers' connecting
to RHEL).

So without Satellite, is there any products our there that could
do patching of RHEL endpoints?  

Is this requirement to have Satellite something that Bigfix also
require?  Seems like the vendor selling Satellite is not aware.

Is there any scripts or tools out there that could pull all the
patches down with a single RHEL subscription, build a patch
repository which can be propagated down to our RHEL
endpoints?   I recall an ex-colleague who has built an RHEL
VM that could do something like this but I've lost touch with

Some years ago, a member in SunManagers list shared with
me that Satellite could patch Solaris as well (possibly that's
in the days of RHEL Ver 4.x): is this still the case today that
Satellite could patch Solaris?   What about Ubuntu, Debian,
& CentOS Linuxes?
Microsoft Azure 2017
LVL 13
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.


  I am developing a C++ application with libfuse on rhel 6.10. And, also a simple test application also there.

  When I run my test application with same arguments to fuse_main, works fine. But, with actual application, /dev becomes empty (corrupted).  I don't understand why this corrupts machine. I am running these apps with non-root user. added non-root user to fuse group as well as changed permissions to fusermount too.

   In which cases, /dev becomes empty due to any application.

Hi everyone,

I am trying to zip in zfiles<state>.zip file multiple (1000s) files (ASCII files) and get a count of each zip file in most efficient way (without dirrectory names and compress better) in Unix Bash script (zipfiles.sh) just like it was in the DCL language below.  If anyone knows how to do the same zipping process in the Unix bash script please let me know. Any suggestions or examples would be appriciated!

Note:  statelist.txt file has all states to loop through

Here is the DCL code portion that I am trying to convert to Unix bash scripting:
define/nolog DATA dir1/data
define/nolog proglog DATA:ZIP.LOG

laststate := ' '

 open/read statelist STATELIST.TXT
 read/end = endread statelist laststate

if f$search("ASCIIFILE%''laststate'%%%%%.TXT").EQS " " THEN -

! Create ZFILES<state>.zip  by zipping all ASCIIFILE files and send ZIP.LOG to the mail list
ZIP  -9V ZFILES'laststate'.ZIP - 

if .not. $status
  open/append pglog proglog
    write  pglog "--- Error Zipping ASCIIFILE*.TXT files ---"
   close pglog 
       SAY " --- Error Zipping ASCIIFILE*.TXT files ---"
 mail/subject="--- Zipping all files ==> Failure ---"

Open in new window

Hi everyone,
I am trying to create a Menu script in Unix bash. A few issues that I am experiencing are:
1. Each Menu selection (#1,#2, and #3) ends right after I run each selection and the menu exits out back to the command line. I would like the Menu to ask a user if a user would like to continue with other selections (for example #2 or #3 if #1 was run in the first place) or exit the menu. Right now the Menu just exits after each selection without asking anything.  

2. In part of the selection #1, I would like to capture a value entered for "filecnt" (can be any number but 0) in the $parfl (parameter file). Right now this script allows to enter the value but that this value for some reason is not captured in the $parfl parameter file. The script creates the $parfl file but it is empty.  

What am I missing? Any suggestions or examples would be greatly appreciated. Thank you!

Open in new window

export DATA=/home/data
export EXEC=/home/exec

export parfl=${DATA}/parameterfile.txt
chmod 777 $parfl

# Menu

echo "             Control Menu"
echo " "
echo "Selection 1: Run Script1"
echo "Selection 2: Run Script2"
echo "Selection 3: Run Script3 "
echo "Selection 9: Exit System"
echo -e "\n"
echo -e "*** Make a selection from the Menu above and press enter ***"
read select

select=$(echo $select | tr '[:lower:]' '[:upper:]')
if [[ (("$select" <…
How come sometimes the owner and group for some files look odd on my file system?
Dear Unix Gurus,
I got a new server which the below in the root directories.
Now I need to mount a new directory '/data/inout' here .
IS there a way we can do this.
ls -la
drwxr-xr-x.   2 root    root       6 Dec 14  2017 srv
drwxr-xr-x.   2 root    root       6 Dec 14  2017 mnt
drwxr-xr-x.   2 root    root       6 Dec 14  2017 media
drwxr-xr-x.   3 root    root      18 Sep 27  2018 export
lrwxrwxrwx.   1 root    root       7 Sep 27  2018 bin -> usr/bin
lrwxrwxrwx.   1 root    root       9 Sep 27  2018 lib64 -> usr/lib64
lrwxrwxrwx.   1 root    root       7 Sep 27  2018 lib -> usr/lib
lrwxrwxrwx.   1 root    root       8 Sep 27  2018 sbin -> usr/sbin
drwxr-xr-x.  13 root    root     155 Sep 27  2018 usr
drwxr-xr-x.   2 root    root       6 Sep 27  2018 tmproot
lrwxrwxrwx.   1 root    root      10 Sep 27  2018 esm -> /opt/DBesm
drwxr-xr-x.   4 root    root      33 Sep 27  2018 SSH_Keys
drwxr-xr-x.  11 root    root     128 Sep 27  2018 opt
drwxr-xr-x.  21 root    root    4.0K Oct  8  2018 var
dr-xr-xr-x.   4 root    root    4.0K Oct  8  2018 boot
drwxr-xr-x.   4 root    root      38 Apr 17 07:22 home
drwxr-xr-x. 105 root    root    8.0K Jul  1 02:00 etc
dr-xr-xr-x. 251 root    root       0 Jul  6 21:31 proc
dr-xr-xr-x.  13 root    root       0 Jul  6 21:31 sys
drwxr-xr-x.  19 root    root    3.3K Jul  6 21:31 dev
drwxr-xr-x.   2 root    root       0 Jul  6 21:31 misc
drwxr-xr-x.   2 root    root       0 Jul  6 21:31 net
drwxr-xr-x.  28 root    root    1000 Jul  6 

Open in new window

I have a 2 columns of data from oracle, moved to Excel, "Id_Num, Rand_Key"

I have another column that originated on Unix, sent as *.txt, loaded to Excel, "Id_Num_from_Unix"

I'm trying to to VLOOKUP on the Id_Num_from_Unix to the Oracle.Id_Num, but it's not working.

If I compare the two fields, they are different, e.g., =IF(D24=G24,"ok", "Diff !"). But if I subtract the two numbers, I get 0. Visually they're the same.

If I hand type a number, it matches the column from Unix ... so that means the data originating from Oracle is at issue - - - but shouldn't I be able to convert the data type in Excel so things are equivalent? The lengths of the fields are both 6.

I've tried making both columns text, number, general. Can't seem to get the comparison to work.
Excel comparison not working
Adding User to Ubuntu

I need a user that I can use when I do not want to risk doing damage to my Ubuntu installation.

So, I ran

sudo su

then ran

adduser curiouswebster

following these instructions,

is ran
usermod -aG sudo curiouswebster

but doesn't this add root privileges for curiouswebster??

If so, please help me downgrade the permissions.

I was hoping to log in as curiouswebster and install various systems, like Apache, MySQL, PHP and WordPress.

Shouldn't I use root for this?

Also, how do I log in as curiouswebster?

What Ubuntu tools (or tips) make learning Ubuntu easier?

I have used LINUX here and there over the years, but always feel like it's the first time. Most of my software development jobs were Windows and Web, with Windows Server.

So, I just successfully SSH'ed to my AWS Ubuntu instance. AND need to get up and running quickly.

What tools can you suggest?

Is there a GUI I should consider?

Was the X-Windows??

And what other tools are there besides a GUI?

I expect to host a WordPress Podcast. So, any helpful tools or tips would help greatly.

Which AWS FREE Tier is most advisable (for WordPress)?

I will not choose either of the Windows Server options due to exposure to viruses.

There are 4 LINUX options:

Amazon Linux
Red Hat
SUSE Linux

(Is Ubuntu an instance of LINUX?)

But I m a .NET developer and may be interested in the following option:
NET Core 2.1 with Amazon Linux 2 - Version 1.0 - ami-0bed74d89326c46bc
.NET Core 2.1 and the PowerShell 6.0 pre-installed to run your .NET Core applications on Amazon Linux 2 with Long Term Support (LTS).

Which platform is safest against hacking and viruses?

CompTIA Network+
LVL 13
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Dear Gurus,
I have been given root access to a Red Hat linux server 7.5
Now I need to do the below

Onboard a user : george with a home directory /home/george
I used:
adduser -m george

Open in new window

. It works

Onboard an application Account (System User): java_user
I used:
 adduser -r java_user

Open in new window

It works

Define  a Home directory to the java_user:  /home/java_datahub
I used:
usermod -d /home/java_datahub java_user

Open in new window

The above command doesn't do anything. The directories are already existing.

Give sudo access to george  so that he can login to the application account once on the server using the below command
sudo su - java_user

Open in new window

I am not sure how to do this.

Kindly suggest

i have a sftp server on docker. In compose file i open a port 2121:2121 and 2222:22 as you can see here
 sftp_server                                      "/usr/local/bin/entr…"   40 hours ago         Up 2 hours    >2121/tcp,>22/tcp
it's working fine when i ask    sftp -P 2121 "user_name@"host_name"
in my domain.
i create an haproxy in other server (is internet connection)  i add following in my /etc/haproxy.cfg
listen  sftp-server
            bind   *:2121
            mod     tcp
            option  tcplog
             default_backend          sftp-server01
backend       sftp-server01
 server ftp01         "docker_container_with_sftp_name"."domain":2222 check port 2222
and i restart haproxy

in my domain i can ssh to sftp with port 2121 (ssh "user_name"@"host_name" -p 2222)
without any problem.
but nor working with haproxy even in my domain. what is wrong ?
Hi ,
I have below script which i want to improve to include one more exec run if first one finish good.

spool ICMTR.lst
var out number;
EXECUTE  test.run_batch_all(1,:out);
spool off

Now i want to add one more only if EXECUTE  test.run_batch_all(1,:out);
finish good then
execute test.pp.all(1,0)
Problem with lpsched & printing from Solaris 10.

LP printing has been working but stopped working today.  Running lpstat -t gives the following errors:

lpstat -t
scheduler is running
no system default destination
system for CUPS-Print-Anywhere-Staff: adfe-183-db130.mohawkcollege.ca (as lpd://adfe-183-db130.mohawkcollege.ca/printers/CUPS-Print-Anywhere-Staff)
system for Print-Anywhere-Staff: adfe-183-db130.mohawkcollege.ca (as lpd://adfe-183-db130.mohawkcollege.ca/printers/Print-Anywhere-Staff)
CUPS-Print-Anywhere-Staff accepting requests since May 21, 2019 10:59:02 PM EDT
Print-Anywhere-Staff accepting requests since May 21, 2019 10:59:02 PM EDT
Failed to get printer info for CUPS-Print-Anywhere-Staff: not-found
Failed to get printer info for Print-Anywhere-Staff: not-found
Failed to get job list: bad-argument
Failed to get job list: bad-argument

Printing had been working including from CUPS and from the native O/S lp/lpsched.  There should be a list of approx. 80 network printers listed along with the printers configured in CUPS.  LPSCHED is running and CUPS is currently not running (for troubleshooting purposes) as shown in the output below.

svcs -a |grep print
disabled       Oct_27   svc:/application/print/ppd-cache-update:default
disabled       Oct_27   svc:/application/print/ipp-listener:default
disabled       13:31:38 svc:/application/print/rfc1179:default
online         15:37:12 svc:/application/cde-printinfo:default
online         16:22:57 …
Hi Experts,

What would be the regular expression to denote


Where XXXX is the bank code. For eg. SBI's bank code is SBIN. All alphabets
A is the system identifier. The possible values are A-Z
YY is two digit year. 10 for 2010. (Possible Dates 01.04.1991 to 31.12.2025)
DDD is julian date. 032 for Feb 1.
999999 is 6 digit sequence number.



Where XXXX is the bank code. For eg. SBI's bank code is SBIN. All alphabets
A9 is the system identifier. One is digit and one alphabet. Range from A-Z and 0-9
YYYY is four digit year
MM is month. 04 for April
DD is date. 04 for 4th.
(Possible Dates 01.04.1991 to 31.12.2025)
99999999 is 8 digit sequence number.

I need to use the same to found the UTR number from Sentence given in a Excel Cell.

E.g., Sentence is UTM:XSCXQ52019050400148805//UUQP PQDQ XQP/MTGS TO:SXXXX19124112345:SQDHNQ GHOST

I will be using the same in the following function to extract UTR.

Function FindUTR(strin) As Boolean
    FindUTR = UCase(strin) Like "[A-Z][A-Z][A-Z][A-Z][A-Z] [0-9] (0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)[0-9]{2} ########"
End Function

Whether Strin is appropriate here ?

we have run a few security scripts over a red hat linux server and one of the issues it has raised is the fact that passwords are available in plain text in an /etc/fstab file. By review of the permissions I can see all users on the server can read this file, so this is not good. I think the /etc/fstab file is being used as there is a link between this server and another for storing documents. I presume amending the ACL on the /etc/fstab file itself from the current presumably default ACL, is not a good idea as it could break things. So what other options are there to prevent users seeing this plain text password in the /etc/fstab file, or what are the best practices in such cases.
Can you assist with interpreting the output of getafcl for /etc/passwd and /etc/shadow files on a live server. The output shows as below:

# file: etc/shadow
# owner: root
# group: root

/etc/passwd permissions

# file: etc/passwd
# owner: root
# group: root

fromwhat I understand security best practice suggests /etc/shadow should only be readable by root (as it contains security sensitive info), and /etc/passwd should only be writable by root as you can upgrade permissions to root if you can edit the file. However, the permissions on /etc/passwd indicate 'user' has rw which indicates read & write permissions. Is this a security flaw or is this the default setting? What does 'user' actually represent, and is it all users on the server, if so this seems like a problem from the offset.
Hi all,

 I have to install libfuse for development on rhel 6.

 how to install? I tried with "yum install fuse-devel".  But, I couldn't find /etc/fuse.conf to configure fuse on my local machine.

When logging in via "dzdo us - [user_name]", the server times out after like 2 minutes! I do heavy work on it sporadically, and it's like 50 times a day I'm logging on, then dzdo, etc.

could I run a small job that would simulate "pwd", so the thing does not time out? And this would run every 30s.

And I'd want to turn it off, if I am going to be doing some "vi" editing, then back on.
HTML5 and CSS3 Fundamentals
LVL 13
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

I need to run a command in Unix to set up aliases. This is for a "su - " account and when logged in, there's no .profile file that I can set up.

I created "aliases.sh" and tried to run it as ./aliases.sh and it "runs" but the aliases are not created.

How can I quickly set up my aliases upon login to the "su - " account?
Does access control list testing/reporting in red hat linux follow the same principles as windows, e.g. you can only produce a report (access control list) of who can access a file/directory if the account you are running the tests from has access to it yourself. E.g. if you are not a root level account, can you only check who can access files/directories that you have access to. If you try and get an access control report for a file/folder you don't have access to, will you get some sort of access denied error?

I have been looking at the ls command for my own development. I think this may produce similar to windows CACLS command (but also gives a bit more info such as size etc, what would the correct syntax be to check permissions of a file, is it simply ls path, or is there a bit more to it?

I assume most critical information (e.g. system configuration files) are by default locked down to root access only, so it would take an admin to start amending settings to make a default copy of linux less secure in terms of critical server wide configuration files. Or can other things amend settings above and beyond naive administrator amendments.
Is there any way at all to enable Solaris 10 BSM without rebooting Solaris.
Will issuing "pkill -HUP  BSM_process" enable certain config files to be read
without rebooting?
Do any of the config files in the \etc\ directory give any clues on the last time certain RHEL accounts were used/logged into. I can query /etc/shadow but I think the numerical value in there is actual days since password last set, not days since last login/last login date. It would also be helpfull, if at all possible, to identify the date an account was created.

Also is there a command that will show the exact version number/build of RHEL.

And using putty.exe and running a command with a >>output.txt result, how can you tell where the putty software defaults to when saving the output of a file, e.g. on commandprompt in windows I can see where its going to write the files too unless I specify a new path, but in putty connected to RHEL I cant actually tell where it is going to write the output to.
is there any quick command that can be run via putty once connected to a RHEL server, to determine the privileges granted to that account you are logged in with, e.g. is it a root account, does it have su/sudo privileges etc. I have been given an account to a test server for some security checks, but I am pretty sure a lot of it is not completing as the account has limited privileges. But as it is a fairly new area to me, I could do with a quick command you can run via putty once connected with this account to list what security privileges it actually does have.
I am looking into some basic security controls regarding red hat linux (v6.8). I am trying to identify some of the critical files that I can ask the sysadmin to extract for analysis offline, e.g. on a windows machine. The key files I want are:
1-a list of all accounts on the server (status/permissions/password last set)
2-history of security updates applied to the server/last time OS patches were applied.
3-password policy settings the accounts are subject too
4-list of running services/open ports
5-ideally an inventory of all files on the server, path, file size and corresponding file access permissions
6-what audit policies are configured on the server, if any, e.g. logins, file access etc
7-inventory of installed software/versions

can anyone give the basic commands an admin would run to extract these files into a format that could be analysed on a windows machine. Plus any other key areas you would focus on from a basic security controls perspective that I have not covered in my main 7 areas above.

Unix OS





Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.