/r/unix

Photograph via snooOG

About

/r/unix is a subreddit for Unix and everything related to Unix.


Rules

/r/unix is a pretty chill place:


Related subreddits:

/r/unix

21,775 Subscribers

5

Need advice Solaris - Installing p2p packages

Hi all,

Need some advice on an issue i am facing install a package on several Solaris 11.4 U5 SPARC servers I am experiencing the same issue for all the servers. And i can't seem to figure out what is the issue is. And i have searched high and low for answers Hoping anyone had experienced the same and has a fix

Issue i am facing:

i am unable to install the installation package provided to me by the vendor on these servers. The vendor has provided 2 files which either of which can be used to install the packge

  1. 1 x Zipped file
  2. 1 x p5p file

When attempting to do any of the following in regards to installing the package, it produces the same error:

Error Message

pkg: The image cannot be modified as it is currently in use by another package client. ``

	root@Solaris_server:/tmp/agent_zipped# pkg install Agent-Core-Solaris_5.11_U4-20.0.1-21510.sparc.p5p
	pkg: The image cannot be modified as it is currently in use by another package client.
	root@Solaris_server:/tmp/agent_zipped#

i have attempted to do the following all of which produced the same error:

  1. Unset publisher
  2. Set publisher
  3. pkg install
  4. pkg upgrade
  5. pkg refresh
  6. stopped all service running /bin/pkg

File information

Zipped File:

After unzipping the zipped file

root@Solaris_server:/tmp/agent_zipped# ls -la
total 97968
drwxr-x---   3 root     root        2045 Nov  7 23:01 .
drwxrwxrwt  22 root     sys         1630 Nov  7 23:02 ..
-rw-r-----   1 root     root        1279 Oct  4 23:05 3trend_public.asc
-rw-r-----   1 root     root     24883200 Oct  4 23:14 Agent-Core-Solaris_5.11_U4-20.0.1-21510.sparc.p5p
-rw-r-----   1 root     root     24679046 Nov  7 22:59 Agent-Solaris_5.11_U4-20.0.1-21510.sparc.zip
-rw-r-----   1 root     root        3087 Oct  4 23:05 Feature-AM-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root         561 Oct  4 23:05 Feature-DPI-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root         357 Oct  4 23:05 Feature-FW-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root       24614 Oct  4 23:05 Feature-IM-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root       13450 Oct  4 23:05 Feature-LI-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root       62146 Oct  4 23:05 Feature-WRS-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root       24499 Oct  4 23:05 File-Manifest-Solaris_5.11_U4-20.0.1-21510.sparc.txt
drwxr-x---   2 root     root         314 Nov  7 23:00 META-INF
-rw-r-----   1 root     root      209178 Oct  4 23:05 Plugin-DSSP-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root         248 Oct  4 23:05 Plugin-Filter_5_11-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root       68459 Oct  4 23:05 Plugin-Filter-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root       46119 Oct  4 23:05 Plugin-FWDPI-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root        5210 Oct  4 23:05 Plugin-PROCINFO-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root        1822 Oct  4 23:05 Plugin-TMUFE-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root       18474 Oct  4 23:05 Plugin-UPDATE-Solaris_5.11_U4-20.0.1-21510.sparc.dsp
-rw-r-----   1 root     root          55 Oct  4 23:05 versions.txt
root@Solaris_server:/tmp/agent_zipped

p5p file:

root@Solaris_server:/tmp/agent_p5p# file Agent-Core-Solaris_5.11_U4-20.0.1-21510.sparc.p5p
Agent-Core-Solaris_5.11_U4-20.0.1-21510.sparc.p5p:      USTAR tar archive

Information on Servers:

OS Release:

	root@Solaris_server:cat/etc/os-release
	NAME="Oracle Solaris"
	PRETTY_NAME="Oracle Solaris 11.4"
	CPE_NAME="cpe:/o:oracle:solaris:11:4"
	ID=solaris
	VERSION=11.4
	VERSION_ID=11.4
	BUILD_ID=11.4.71.0.1.170.2
	HOME_URL="https://www.oracle.com/solaris/"
	SUPPORT_URL="https://support.oracle.com/"
	VARIANT_ID=sru
	VARIANT="Support Update" 

UNAME

root@Solaris_server:# uname -a
SunOS Solaris_server 5.11 11.4.71.170.2 sun4v sparc sun4v logical-domain

PSR Info

PSR InfoPSR Info

	root@Solaris_server:/# psrinfo -pv
	The physical processor has 4 cores and 32 virtual processors (0-31)
	  The core has 8 virtual processors (0-7)
	  The core has 8 virtual processors (8-15)
	  The core has 8 virtual processors (16-23)
	  The core has 8 virtual processors (24-31)
    SPARC-M8 (chipid 0, clock 5067 MHz)

Repo information

All these server also share one local repo server

Repo Information:

	root@Solaris_server:/tmp/agent# pkg publisher
	PUBLISHER                   TYPE     STATUS P LOCATION
	solaris                     origin   online F http://192.168.100.2:443/
	root@Solaris_server:/tmp/agent#  

PS: I am unable to reboot the servers as they are live.

If you have any idea how to resolve this it will be god send!

Thank you!

2 Comments
2024/11/08
03:53 UTC

0

Can someone pls help me to convert a src_code_tarball to Windows executable ?

Hi there,

So it seems the Iridium-Browser Devs are only sharing the source-code-tarballs from now on, and it is upto the end-user to install it on their machines.

Link: (Scroll to the Download section)
https://iridiumbrowser.de/

I am not well-versed with anything apart from running a *.exe file.

Would appreciate any sort of help on this matter.

TIA.

2 Comments
2024/11/04
18:23 UTC

140

Happy birthday UNIX! 🥳🎉

UNIX turned 53 on November 3❤️

8 Comments
2024/11/03
11:08 UTC

0

ken sent me

ken thompson!

ken thompson!

ken thompson!

0 Comments
2024/11/02
03:42 UTC

5

Need help understanding how to make all users in a share appear as "s02_guest"

Doing an assignment for college, and in my final part I have created a share called /nfs_shares/pub and the assignment says

All users must appear as the user s02_guest when performing operations on the share

Would anyone be able to help me with this? Any help is appreciated

2 Comments
2024/11/01
16:56 UTC

1

boot unix on a pendrive

can i boot linux on a pendrive? i need for some educational prouperse, i saw somewhere thats using rufus would work, but im not sure if it.

5 Comments
2024/10/30
16:11 UTC

5

Learning unix

Any suggestion where i should start learning unix

28 Comments
2024/10/30
08:11 UTC

3

Help Understanding/Finding Info on Antiquated Server Hotkeys

Hello everyone! I used to work for a medical software company for several years, then went on to work for a hospital. I have back end terminal access to our EMR server and sometimes I find it useful to run ping tests and check host file for specific tasks. I run into some issues as syntax and hotkeys work much differently from a standard Linux environment, and trying to understand if they are custom or emulating some old version of Unix.

Some background/info: When I was working for the company, they were using Unixware for their backend, then they switched to Scientific Linux, then CentOS. They use Linux kernel 3.10(custom), and many backend files use COBOL. When trying to view a previous command for example, you cannot simply press the UP arrow key, you have to use the hotkeys [CTRL]+[SHIFT]+[P]; to go forward in command history, the hotkey is [CTRL]+[SHIFT]+[N].

The reason I am posting is because when running a command like "ping *ip address*", I am unable to stop the process with [CTRL]+[C] and it keeps running until I force close the session.

I can try to provide more info or examples, but I am posting here because I am wondering if these are hotkeys for an older or specific version of Unix. If so, I may can find more documentation on how to navigate the system more cleanly. Thanks!

2 Comments
2024/10/28
15:20 UTC

3

Need some advice on my logic

Hi all, need some advice if the way I am approaching this is right.

For some context: My organisation has bought ansible automation platform (AAP) I have not worked with AAP before, but in all my previous roles, I have worked with ansible My team consist of 5 of us managing unix servers There is another team in my organisation that Is tasked to work with the red hat team to develop the playbooks and the setup etc.

The setup has been completed and they have been developing playbooks for the past couple of months.

My team’s requirement: In my team there is a repetitive task we engage in. This task involves setting up servers, and going thru a checklist to ensure each “setting” is captured accurately.

Example: Part of the task is to ensure the Redhat server’s setting matches with the security standard of our organisation; which is based off CIS framework.

Other parts of the task include ensuring fire systems are created, ensure each filesystem meets a specific size, ensuring certain application are installed and running - you get the idea

Example: Section 2.3: Ensure Log audit filesystem is created and the size is 59GB

The playbook present: The playbook that is supposed to automate the above mentioned task was presented to my team recently.

First off, in the playbook for what I gather, the playbook is running a command to check

Using the above as an example;

Example: Section 2.3: Ensure Log audit filesystem is created and the size is 59GB

It is checking on the server is /var/log/audit exist If it does it returns a “True” Else if it doesnt it returns a “False”

This is essentially what is done throughout the whole script at the end when the script is finally completed all the return values are collected and output to a file which which is sent to the user via email and the user will read from and see which has failed and fix those which have failed

The file that is being sent to the user Will display the results for each section.

Example of file generated

Section 2.1: Pass Section 2.2: Fail

The user is then supposed to go and address those section which has failed

Script for each type of unix flavour and version is Being created since we have many types of unix OS and different versions and each has different “pre defined” values meaning for an example the size of the /var/log/audit filesystem size for Redhat 8 would be 59GB Redhat 9 would be 20GB AIX would be 70GB

The checklist is the same for all server, just that the specific values for each requirement is different

The issue I have and what changes I believe should be made

  1. Static workflow to dynamic workflow

The current logic of what has been developed relies on “hard coded” values as such there will be multiple playbooks which my team have to manage

Suggestions: I have suggested to change the logic to be a dynamic logic, since all the serves have the same base requirement, only one playbook should be developed; the user provide a separate file which contains the value that needs to be true. The playbook reads off the separate and iterate through each requirement.

  1. Handling of results besides true and false

The current playbook only return true or false. Otherwise it does not do anything. If the value matches; then true If the value doesn’t match or anything else; false

suggestion: My suggestion is to incorporate the logic of error handling

Using the same example: If /var/log/audit exist return true Else if /var/log/audit does not exist return false Else if return error 400 or whatever error code, which can be generic or error specific

When I suggested these above points during a meeting with Redhat I was told by the Redhat employee thsg is assigned to us for ansible setup mentioned that I am over complicating things and the other team’s manager agreed with him and mentioned that i have a wrong understanding of ansible

From my understanding from past experience using ansible, programming and software engineering, I believe that my logic is pretty simple and common practice. And ansible is just an automation tool.

He has spent the past couple of months just to create 1 playbook for Redhat 8 in a testing environment, he stores the playbook on a gitlab The changes he makes on the playbooks are not following standard git practices. He Commits all the changes without version control

So I don’t know if the fella is pulling a fast one At the same time, I am worried that I might be making a fool of myself

In addition to that 3.I have not used AAP before I have only used Ansible Tower and the standard cli.

In thr past, I found using the UI much slower than CLI. It’s more of a preference as I am faster on terminal then on a UI.However when I asked if I could be able to use Ansible to run the playbooks on terminal, I was told the “UI” is more powerful and has a lot more features than the cli, which doesn’t make sense to me. And I wrong or am I right?

Do leave your suggestions, if I am wrong I am okay to accept it, part of a being an engineer, I will know better!

My concern is that since it will be my team of 5 using Ansible, and the Redhat employee is being paid to help us develop the playbooks; it should benefit us, with the playbook that is being developed, I rather write a batch script which is faster than python.

1 Comment
2024/10/25
02:19 UTC

5

Help understand ed(1) pattern

I am playing with OpenBSD's little ed(1) quiz program (fun!) and got stumped on this. Was wondering if anyone can explain if the semi-colons in the correct answer are just making this a one-liner, or if they are providing symantics that is new to me...

The question was: `go to line after third "PP" ahead'

And the provided answer was:

/PP/;//;//+1

I understand the double forward-slashes, but the semi-colons were a head scratcher. Of course, I use semi-colons all the time in various langs to put things on one line, but I had I feeling I wasn't grasping something.

Also, if the semi-colons are just making a one-line possible, does anyone know if there are any limitations on using this pattern in ed(1) everywhere? Meaning, can I chain a ton of goodies on one line, separated by semi-colons?

UPDATE: It should be noted that this does actually work.

10 Comments
2024/10/24
16:37 UTC

8

SCO OpenServer 5.0.7 on VirtualBox

I recently set up a SCO Openserver 5.0.7 on virtualBox following the tutorial (here).

Everything works fine except one thing, I have a significant access delay on network traffic. Indeed, when I ping my guest machine from my host machine I have 900 ms when I should have <1 ms.

Being still a novice on SCO Openserver 5.0.7 I am out of ideas to solve this problem.

let me know if someone, had this issue and solved it.

ty

12 Comments
2024/10/24
14:00 UTC

7

Technical question about sockets and kernel tls

5 Comments
2024/10/19
17:21 UTC

4

Basic Regexp puzzle

Was wondering if there was an elegant way (using Basic Regexp -- not Extended) to match a pattern (on a line), but not if contains another given pattern. This came up the other day in ed(1), and I wasn't sure how to go about it. The exact problem was:

find all urls in my file that matched `reddit.com'

for each of those, don't show any that match the string `comments'

It went a little like...

g/.*reddit\.com.*[^\(comments\)]/n

That didn't work, and not sure how to negate a word-pattern (instead of just a character list...)

4 Comments
2024/10/14
17:35 UTC

22

Some things you dislike about UNIX/UNIX-likes

Is there anything you'd like to see be improved upon when it comes to UNIX / UNIX-likes? I'm interested in operating system design and I'd like to maybe someday make an OS that is similar to UNIX, but also addresses its shortcomings.

34 Comments
2024/10/11
08:23 UTC

8

Is there any MacOS Clone OSes made by other people to install on PC?

Something around the lines of Unix clones made to look exactly like Mac or even complete forks of it-
I want to try something different, rather than messing around with linux trying to make it look like Mac.

Any ideas?
Pretty thanks in advance.

6 Comments
2024/10/09
15:33 UTC

108

Found this book. Good vibes, but is it?

Is this a good book?

8 Comments
2024/10/08
11:24 UTC

4

rsync force resume EXISTING partial file

I have spent the better part of a day transferring a file over a slow connection. It hanged at 95%. I could ssh into the directory without cancelling the transfer and found a file with a name like

File.abc123 of almost the same size as the original next to the almost empty File file

I have tried to use --partial to attempt continuing the transfer but rsync just started from scratch again. (The original attempt was without --partial)
How do I only transfer THE REMAINING 5% of the file in this current state ?
(if it is at all possible of course since a quick google search strongly indicates that it isn't through omission but doesn't outright say so. However, all common sense and good will implies it should definitely be possible)

4 Comments
2024/10/08
06:41 UTC

81

UNIX epoch time :)

4 Comments
2024/10/03
21:52 UTC

0

Modern Unix-like OS in 2mb 386.

20 Comments
2024/10/02
22:19 UTC

11

A hard puzzle for Unix masters

Hey! Please guys, help me to solve this geocache → https://www.geocaching.com/geocache/GC880J7

I solved the easier one, but the harder one is too hard for me.

Task:
We saved the coordinates in our pet PDP-11 mini computer. For a 40 years old machine, it is still quite operational. Ready to try it out?

https://pdp11.ciovil.li

Thanks!

6 Comments
2024/09/22
16:11 UTC

12

any good Unix operating system or distro for a hard drive?

I have this 150GB hard drive on my pc that is practically unused, so I'm looking to install a linux distro that at least can increase the speed of usage a bit compared to midweight distros or windows, I was thinking of maybe going for Haiku but idk much about it, my only requirements is that it can run vscode or vscodium, if it isnt available maybe something like neovim or emacs

26 Comments
2024/09/17
14:39 UTC

1

System call undefined reference error

I wanted to create a custom system call, i followed the geeks for geeks method, consider it getyear().
I made changes in the following files accordingly:
syscall.h (assigning a number) #define SYS_getyear 22
-> syscall.c (indexing getyear e.g [SYS_getyear] sys_getyear and extern uint64 sys_getyear(void))

-> sysproc.c (wrote the whole function which was simple e.g uint64 int sys_getyear(void){return 2000;}

->usys.S
.global getyear
li a7, SYS_getyear
ecall
ret
-> user.h int getyear(void)

-> defs.h int getyear(void)

-> year.c
#include kernel/types.h
#include kernel/stat.h
#include user/user.h

int main(void){
printf("user is born in year: %d\n", getyear())
return 0;
}

then i included year.c in user folder as well as makefile
still i was getting the error undefined reference when i was trying to run make qemu. What seems to be the issue?

0 Comments
2024/09/17
06:51 UTC

9

Can u guys share some resource to learn unix/linux including shell scripting

same as title

7 Comments
2024/09/15
04:54 UTC

5

What easy to use webcam recording software is available for Linux?

6 Comments
2024/09/13
19:28 UTC

4

I dont know how to ask google

I use "cat data.txt | sort | uniq -u" to find a unique string in a file, but why doesn't work without the sort "cat data.txt | uniq -u"?

19 Comments
2024/09/10
07:04 UTC

Back To Top