Linux OS Dev

Kernel programming for Linux operating systems can be done with many different languages; C, C++, Python, Perl and Java, which are some of the most common languages used.There are also many different varieties of Linux, such as Ubuntu, Fedora and OpenSUSE.

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

Sign up to Post

unable to get DNS service up and running.

[root@dns01 named]# systemctl restart named
Job for named.service failed because the control process exited with error code. See "systemctl status named.service" and "journalctl -xe" for details.
[root@dns01 named]# journalctl -xe
-- Unit named-setup-rndc.service has begun starting up.
Mar 16 21:02:23 dns01.cioft.com systemd[1]: Started Generate rndc key for BIND (DNS).
-- Subject: Unit named-setup-rndc.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit named-setup-rndc.service has finished starting up.
--
-- The start-up result is done.
Mar 16 21:02:23 dns01.cioft.com systemd[1]: Starting Berkeley Internet Name Domain (DNS)...
-- Subject: Unit named.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit named.service has begun starting up.
Mar 16 21:02:24 dns01.cioft.com bash[11622]: cioft.com.lan:9: unknown RR type 'define'
Mar 16 21:02:24 dns01.cioft.com bash[11622]: cioft.com.lan:11: unknown RR type 'internal'
Mar 16 21:02:24 dns01.cioft.com bash[11622]: cioft.com.lan:12: #.cioft.com: bad owner name (check-names)
Mar 16 21:02:24 dns01.cioft.com bash[11622]: cioft.com.lan:13: unknown RR type 'define'
Mar 16 21:02:24 dns01.cioft.com bash[11622]: cioft.com.lan:14: #.cioft.com: bad owner name (check-names)
Mar 16 21:02:24 dns01.cioft.com …
0
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 running nginx on Ubuntu server 16.04LTS

I am trying to configure partkeepr.org

During the install, this error appears when  I use this config

server {
    # Listening port and host address
    listen 80;
    server_name inventory.techpress.internal;

    # Default index pages
    index app.php index.html

    # Default character set
    charset utf-8;

    # Turn off access.log writes
    access_log off;
    log_not_found off;

    # Send file is an optimization, but does not work
    # across unix sockets which I use for php fpm so is best
    # used for local static content onlya 
    sendfile off;

    # Root for / project
    root /var/www/html/inventory.techpress.internal/web/;

    # Setup rewrite helper
    rewrite ^/setup/webserver-test$ /setup/tests/webservercheck.json;

    # Handle main / location to symfony app.php controller
    location / {
        try_files $uri $uri/ /app.php?$query_string;
    }

    # Handle /setup location to symfony setup.php controller
    location /setup {
        try_files $uri $uri/ /setup.php?$query_string;
    }

    # Handle all locations *.php files via PHP-FPM unix socket
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        #fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_pass unix://var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME 

Open in new window

0
Hello
I am trying to write a microservice that writes the SD card on dell edge box 3001 so the data can be saved directly to the SD card.
any ideas how can I achieve this.
Thanks in advance.
0
im using debian, ubuntu, linux, mint, ext4 if that specific info helps

when saving a file from within notepad ap or from within the libreoffice word processor ap the exact same message box appears when saving to a file name that already exists.....  it warns that the file already exists and asks if one wishes to cancel or overwrite.....   does this identical message box originate from the application or the OS?   and is the fact that the file already exists determined within the ap or is the message box generated by info passed between the ap and the OS

rename fails when renaming to a filename that already exists but mv and cp overwrite with no warnings.....
Screenshot-from-2019-02-25-13-41-48.png
0
New ubuntu 18.04 server build. Running zfs for datastorage for backup. Receiving Errors about ata2.00 failed command: WRITE FPDMA QUEUED.

Please see attached screen shot.

What does this mean? Are my drives going bad? or is it a motherboard issue?

Any guidance would be appreciated.
Ubuntu_ATA_error.jpg
0
Hi
I am trying to read a stored text file on SD card and this card is on  dell 3001 edge box with ubuntu core 16.04, I have tried to mount the SD card but I can not see the text file to edit or read the contents.
Thanks in advance
Seham
0
Hello
where is the logs files are stored in the snap that runs on edge boxes with ubuntu core 16.04
Thanks  in advance
0
Hello Experts,

I am a novice in Linux and having to try to enable the SSO ( Single Sign-on) for a website built on Ubuntu using apache2 web server. We basically wanted to have authentication in place for anybody connecting to that website and I enabled LDAP auth and it's working fine. But the client needs Sigle Sign on so that staff need not to manually authenticate using their AD credentials when accessing the website.  I have gone through online documentation, and its confusing what all i need to change in the existing config and install the new stuff. If any one can help/guide me in the right process. It would be of great help.

Thanks a lot in advance.
0
Hi
I am running Node.js app to check for connectivity and reboot if the timer reaches 0, and I am logging the status on a log file but when I run this code as a snap on ubuntu core, I can not find where the log files are in snap.
here is my code:
#!/usr/bin/env node
const moment = require('moment');
const shutdown = require('electron-shutdown-command');
const electron = require('electron');

const fs = require('fs');

let counter = 0;

function checkInternet(cb) {
    setInterval(function(){
    require('dns').lookup('google.com',function(err) {
        if (err && err.code ===  "ENOTFOUND") {
            cb(false);
        } else {
            cb(true);
        }
    }); }, 30000);
}

function rebootEdgeBox(){
    shutdown.reboot();
    console.log('Shutting down now');
   
}


checkInternet(function (isConnected) {
        if (isConnected) {
            console.log('alive');
             counter =0;
        } else {

            const timeStamp = moment().format('YYYY-MM-DD, HH:mm:ss');
            const status = 'Disconnected at ' + timeStamp;
            console.log(status);
            counter += 1;
            vortexLog(status);
            if (counter === 10){
                counter = 0;
                console.log('ji');
               rebootEdgeBox();


            }
        }

    });

function vortexLog(string) {
    fs.appendFile('./Logs/connectionLog', string + "\r\n", function (err) {
        if (err) throw …
0
I have a newly configured, headless, Ubuntu 18.04 dedicated server on a hosting company, so it's not a local server.

The problem is that while I am connected and doing something on the server using SSH, running top, transferring a file, etc, I get disconnected and cannot connect again. I have to reboot the server to do so.

The hosting company says the server is configured to have power saving mode turned on, and it goes into power saving mode.

I find it weird because:
1. I never had encountered a server OS with power saving mode turned on, because, well, it's a server
2. Even it it was turned on, it should not kick in while it's in use. At lease that's how I understand how it should work
3. The server is almost 2 months old, and we only encountered this issue twice. Had it been on all the time, it would have been a constant problem since day 1

So my question is, how do I check that power saving mode is on, and how do I turn it off? I've read some articles in other sites, but I'd rather have the answers here.

Thanks in advance!
0
Learn SQL Server Core 2016
LVL 13
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

I am using WAMP on my Windows 10 machine.

I am having the same issue on my Ubuntu machine.

When I add to many columns to my database I get an error:

Rebuild database fault: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.

Open in new window


I have gone to the my.ini file and added:
innodb_strict_mode=0

I have also tried increasing my log file size to 512 and the buffer size to 2048 just to see. Still no change.

Any time I try and add another column in mysql I get the error.
0
grep "testing" 789.log

zgrep "testing"  123.gz

i like to redirect above production server output to
abc/def/test.txt file which is on some other system test server where i have access

how to do it
grep "testing" 789.log >> abc/def/test.txt
above gives error no such directory as that directory is not there in production server

grep "testing" 789.log
how above different from
grep -C2 "testing" 789.log

i see below time stamp lines came 3 of them when i use -C2
2019-Jan-17 04:50:51.198 EST

i see below time stamp lines came 3 of them when i did not use -C2
2019-Jan-17 04:50:51.198 EST

please advise
WithC2.png
WithoutC2.png
0
when i do ls -ltr i see bunch of .gz files says 123.gz and 456.gz
and bunch of no gz files say 789.log etc

how to grep on say "testing" on both zip gz files and non zip files

grep "testing" 789.log

zgrep "testing"  123.gz

not sure how to combine above two together

also how search today log between 10 am to 11 am for that "testing" word in log?
please advise
0
Hi,

I have a security related question on Linux Ubuntu.
Can we remove sudo access to root console for power users.
But still allow admin to ssh to the servers with root password.
As a security measure is it a good idea to disable root access to everyone if  connecting to servers remotely.

Thanks
0
VirtualBox guest in windows 10, running a 10 GB xUbuntu client. I want to increase to 20 gb. After a lot if work i got the vmdk to 20 gb. But the  "actual size"  in VirtualBox is still only 10 gb. The partition is a vmdk file. (virtual size 20.00 GB, Actual Size 9.07 GB).

No tool i can find can see the file as a partition and increase it from windows, from inside xUbuntu I have the same problem. How can i get the actual size up to 20 GB?

(no i does NOT autoincrease, its just get full)
0
I managed to run docker and install wordpress on ubuntu linux but can't seem to get the handle how I can edit the files within the dock as I get permission issues.
I think I am looking at it the wrong way about,
Could somone get me thinking the right way because  I love the performance for local development :).
(PHP ,Wordpress,MYSQL on NGINX).
0
Hi,

I have a NFS server on Ubuntu 16.04 LTS installed on it. The client machine has Windows Home edition , it connects to the server with ovpn which is
on another subnet,
I am unable to mount the NFS share from the client machine .
Kindly guide me how to connect to the NFS share on Ubuntu.

Thanks
0
Hello,

Does anyone have any idea how to authenticate a user against two different OUs on the same AD server?

I am using Apache 2.4 on Ubuntu 18.04.
Server version: Apache/2.4.18 (Ubuntu)
Server built:   2018-06-07T19:43:03

The user could be in "ABC User" or "XYZ user".
AD OUs are:
AuthLDAPURL "ldap://adx.ABC.org:389/OU=ABC Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*)"
and
AuthLDAPURL "ldap://adx.ABC.org:389/OU=XYZ Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*)"


Part of the current conf file:
<Location />
      AuthName "ABC Intranet"
        AuthBasicProvider ldap

        AuthType Basic
        AuthLDAPURL "ldap://adx.ABC.org:389/OU=ABC Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*)"

      # login to AD
      AuthLDAPBindDN "CN=ldap_ABCweb,OU=ABC Service Accounts,DC=ABC,DC=org"
        AuthLDAPBindPassword
        AuthLDAPGroupAttributeIsDN off
        AuthLDAPGroupAttribute memberUid

# tried this and failed
#      Require ldap-filter (&(memberOf='OU=XYZ Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*')|(memberOf='OU=ABC Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*'))

# tried this and failed                                     
#      <RequireAny>
#        Require ldap-filter (&(memberOf='OU=ABC Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*'))
#        Require ldap-filter (&(memberOf='OU=XYZ Users,DC=ABC,DC=org?sAMAccountName?sub?(objectClass=*'))
#       </RequireAny>

      # require any is implied
      require any
      Require valid-user
      …
0
Hi Experts,

I'm looking for a simple script to collect the local time drift on Ubuntu Bionic and send it to a specific TCP port in the local system.

Any advice would be highly appreciated.

Thanks & Regards,
Sumedha
0
CompTIA Cloud+
LVL 13
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Hi All,

I am looking to semi-automate the setup of Ubuntu machines.  I don't do that many, so this is more of an 'out of interest' thing than any real productivity issue.

For the avoidance of doubt, I am not looking for a full automated / scripted setup at this point, just to move some setup tasks from being a manual / GUI action to command line.

The first and simple thing is that, when I have setup a new Ubuntu install (16.04 or 18.04), I remove the 'Amazon' icon from the 'favourites' bar.

I do that by right-clicking, and selecting 'remove'.

My underastanding is that I could uninstall Unity Web Apps entirely with this:

sudo apt-get remove unity-webapps-common

Open in new window

which would include the Amazon icon going, but I don't want to remove anything else at this point (unless you think I should?)

I also found a reference that I could run:

sudo apt-get remove ubuntu-web-launchers

Open in new window

to remove the Amazon icon.

My concern is that often there is no explicit mention of what else might be removed or impacted, if anything, which makes me reluctant.

So, how can I just delete the icon from the favourites bar via the command line?


Thanks,

Alan.
0
What's the best way to monitor for UDP syslog traffic coming in from a redhat 4 and redhat 5 syslog clients if it's not arriving at the syslog server. The syslog server is running on a Redhat 6 server. netstat -taulpe | grep syslog is showing that UDP is listening on all IP's on the server but I'd like to see if there is any other way apart from running  tcpdump -i <nic> port 514. Would watch lsof -a -i:514 show it?
0
I started with asking what the different is between "mode" and "flag", see: https://www.experts-exchange.com/questions/29122213/What-is-the-difference-between-mode-and-flag.html

However, I see that people are using different definitions for a flag. So it's better to start with the question: what is the definition of a flag? I'm not asking for general definitions, or your own definition, but specifically use the definitions in this post (and if necessary correct them and tell me what's wrong about the existing definition).

See: https://techterms.com/definition/flag

In computer science, a flag is a value that acts as a signal for a function or process. The value of the flag is used to determine the next step of a program. Flags are often binary flags, which contain a boolean value (true or false). However, not all flags are binary, meaning they can store a range of values.

Let's start with:

a flag is a value

So apparently, according to this definition, a flag IS a value. So a flag can not be seen as something that be two different values (two different states).

The next sentence confirms that:

Flags are often binary flags, which contain a boolean value (true or false).

Let's say we have c++ std::bitset, but it's about 1 bit. Firstable, it's important to be aware of the difference between:

1. setting the flag
2. setting the bitset

The bitset can be 1 or 0  (in this case because we have one …
0
When it's about "flags", I've noticed that different people have different ideas of what a flag is. Some people start to talk about "bit set" when it's about flags. I think the problem lies with the underlaying definitions. It looks like things are not well defined. So for this question, forget about your own ideas/definitions of what a bit set is, just follow the definitions in this post (and change them if necessary). Also forget about flags, this post is specifically about "bitset". First let's start with some "definitions":

See: http://www.cplusplus.com/reference/bitset/bitset/ (std::bitset)

A bitset stores bits (elements with only two possible values: 0 or 1, true or false, ...).

And see: http://www.cplusplus.com/reference/bitset/bitset/set/ (std::bitset::set)

all bits (1)      
bitset& set();
single bit (2)      
bitset& set (size_t pos, bool val = true);

(1) all bits
Sets (to one) all bits in the bitset.
(2) single bit
Sets val as the value for the bit at position pos.

I understand this. But now first let's start at the beginning and let's define a "bit". Let's define it like this:

A bit is an element of two possible binary values: either 0 or 1.

So let's see a bit as a box that contains a ball or a box that doesn't contain a ball. Now let's take a look at a bitset that represents the number 4:

 -----------------------
|0     | 0     |  1     |
|0*2^0 | 0*2^1 |  1*2^2 |
 -----------------------
3 boxes: 
Box 1: no ball
Box 2: no ball
Box 3: ball

Open in new window

0
In short, I would say:

A flag is a predefined bit or bit sequence that holds a binary value.

A mode is a distinct setting.

So it's not always possible to replace the term "mode" by "flag". This is only possible if it's about a binary value. I got confused by these terms when reading:

http://man7.org/linux/man-pages/man2/open.2.html

The argument flags must include one of the following access modes:
O_RDONLY, O_WRONLY, or O_RDWR.

The file creation flags are O_CLOEXEC,
O_CREAT, O_DIRECTORY, O_EXCL, O_NOCTTY, O_NOFOLLOW, O_TMPFILE, and
O_TRUNC.

The file status flags are all of the remaining flags listed
below.

Why they just don't say:

The file access flags are O_RDONLY, O_WRONLY, and O_RDWR.

Why they suddenly use a different term when it's about "access"? Probably behind the scenes it's also just about a binary value, right? Probably all O_VARIABLE's above are 0 or 1.

And see: https://en.wikipedia.org/wiki/File_descriptor

This table records the mode with which the file (or other resource) has been opened: for reading, writing, appending, and possibly other modes.

So Wikipedia uses the term "mode" only (and not flag). At least they are consistent, because they call them all "modes".

Is there a specific reason why sometimes mode is used and something flag (while it's about the same thing)? I would stay, be at least consistent to avoid confusion.
0
In reality, the "open file table" is not really a table, but let's say we will see it as a table. Which columns does this table have?

For example, see: https://cseweb.ucsd.edu/classes/sp16/cse120-a/applications/ln/lecture15.html

The open file table contains several pieces of information about each file:

the current offset (the next position to be accessed in the file)
a reference count (we'll explain below in the section about fork())
the file mode (permissions),
the flags passed into the open() (read-only, write-only, create, &c),
a pointer to an in-RAM version of the inode (a slightly light-weight version of the inode for each open file is kept in RAM -- others are on disk), and a structure that contains pointers to all of the .
A pointer to the structure containing pointers to the functions that implement the behaviors like read(), write(), close(), lseek(), &c on the file system that contains this file. This is the same structure we looked at last week when we discussed the file system interface to I/O devices.

So according to this, I would say:

- offset
- reference count
- file mode (permission)
- the flags passed into the open() (read-only, write-only, create, &c),
- pointer to in-RAM inode
- pointer to "read(), write(), close(), lseek(), &c".

But the file descriptor also points to the open file table, so we need another column that connects the "file descriptor table" with the "open file table". So I would add a column like:
0

Linux OS Dev

Kernel programming for Linux operating systems can be done with many different languages; C, C++, Python, Perl and Java, which are some of the most common languages used.There are also many different varieties of Linux, such as Ubuntu, Fedora and OpenSUSE.