Linux OS Dev

8K

Solutions

3

Articles & Videos

7K

Contributors

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

I have linux application account and  would like to restrict the user to login directly. I want this account to be under sudoers. users can login and sudo into this account. How do i do that in linux?
0
On Demand Webinar: Networking for the Cloud Era
LVL 8
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Hello,

What is the difference between puppet class vs module?
0
I am running redhat linux 6.8

i want to build a new RPM using the source code of nodejs (6.10)

As i am new to RPB build, i am looking for assistance with creating RPM.

https://nodejs.org/en/download/
0
Hi Experts

I have a customer that has Linux Centos 6.5 samba file server installed. (old server)
They also have another server that has Centos 7 samba file server installed. (new server)
My scope on the project is to migrate from old server to new server.
I'm not very good in Linux but I understand that it requires to create Linux users as well as samba user for file sharing permission.

What is the proper way to migrate shared folder to new server including [file and folder permissions] and [list of users(linux and samba)"]?
Example we can use Robocopy in Windows server to migrate permission, how about in Linux ? Could you please provide step by step ?


Thanks
0
Dear All,

We have created a chrooted jail environment for our SFTP access. Using chrooted environment, we restrict users either to their home directory or to a specific directory. Now my question is if there's anyway we can an additional username to access the same home directory for other username? Or any other words, is there anyway I can assign different usernames to the same home-directory and have it chrooted jail?

Below is our current config if that helps:

group add sftponly


vi /etc/ssh/sshd_config

#Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp
Match Group sftponly
ChrootDirectory %h
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no

systemctl restart sshd.service

useradd USERNAME –g sftponly –s /bin/false
passwd  USERNAME


mkdir /home/USERNAME/SFTPWRITE
chown root /home/USERNAME
chmod 755 /home/USERNAME
chown USERNAME /home/USERNAME/SFTPWRITE
chmod 755 /home/USERNAME/SFTPWRITE

setsebool –P ssh_chroot_rw_homedirs on
0
Hello
How to turn on computer automatically from crontab in Cantos & Ubuntu ?
0
Have a telecommunication server that switched over to its backup. After the switchover we noticed a couple of files that can't be deleted.

[root@LABSYS2 log]# ls -ltr
ls: cannot access 1000025.DBG: Input/output error
ls: cannot access 10002CB.AUD: Input/output error
total 769808
-????????? ? ?          ?            ?            ? 10002CB.AUD
-????????? ? ?          ?            ?            ? 1000025.DBG

I tried to find the inode of the file and use it to delete but "ls -il" did not return inodes  (it only did for other files in dir)

ls -li
find ./ -inum <inode number> -exec rm -i {} \;

Please offer any suggestions.

Thanks!
0
Which logformat should use to entry like this:

[2016-12-30T23:43:14.0013+00:00] [OHS] [ERROR:32] [] [core.c] [client_id: 127.0.0.1] [host_id: oracle9] [host_addr: 10.13.19.187] [tid: 140543029438784] [user: ia] [ecid: 005HEZ3wEdAF4Ej6D3NES0008f000RFT] [rid: 0] [VirtualHost: FCDB.pays:443]  File does not exist: /pmo/admin/pmo_oracle29/OHS/htdocs/index.html
0
I have nas disk mounted as nfs mount point i linux. how to create a dd image of this. the mount point is like that
s
tor01-nas.llg:/export/shared/ps_oem   nfs     2G  9.9K  2G    1% /oem1
0
I have two servers that recently shut down due to a UPS failure.  Effectively 2 identical builds - Centos 6.6 OS Servers on Dell hardware RAID 5 over 4 drives.  There are some encrypted volumes that do not show up after this unscheduled/ungraceful shut down happened.  The server is rebooted but there is no dev/mapper/crypot device showing.    I think that the 'cryptsetup luksOpen /dev/sda2 crypt command is failing at boot.
Error message when trying to access volumes says:  "fsk.ext4: No such file or directory while trying to open /dev/vg_00/DIRECTORYNAME.  The superblock could not be read or does not describe a correct ext2 file system.  If the file is valid and it really contains a ext2 file system (and not swap or ufs or something else) then the superblock is corrupt and you might try running ef2sck with an alternate superblock. eft2ck -b 8193.
This is on both servers after an ungraceful shutdown.
0
The Orion Papers
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

We had someone (a junior admin) go in and delete a bunch of rpms using rpm -e a few weeks ago.  Now when I try to reinstall the packages that are missing I get this following:


Total download size: 894 k
Installed size: 2.4 M
Downloading Packages:
mysql-5.1.73-7.el6.x86_64.rpm                                                                                               | 894 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
mysql-5.1.73-7.el6.x86_64 was supposed to be installed but is not!
  Verifying  : mysql-5.1.73-7.el6.x86_64                                                                                                       1/1
  Verifying  : mysql-5.1.73-7.el6.x86_64                                                                                                       2/1

Failed:
  mysql.x86_64 0:5.1.73-7.el6

Complete!


I already trying yum clean all and rebuilding the rpm database.  Any other suggestions?  The error message is kind of cryptic.
0
On Centos 6.5 I have several cron jobs that been running without any problem.
I just added a now job

22 4 * * * python3.5 /home/chariya/python/downloadImages.py spc > /home/chariya/python/log

Open in new window


Which ran as scheduled but no result and no log produced (in ~/python/log)
Here is the job logged in /var/log/cron

Jul 17 05:18:01 web511 CROND[31384]: (chariya) CMD (python3.5 /home/chariya/python/downloadImages.py hyb > /hom                      e/chariya/python/log)

Open in new window

0
We have a backup of a machine that had been virtualized on Xen. The image was an LV snapshot, exported to raw disk .IMG with DD, then converted to VMDK with QEMU-IMG and imported to Vmware ESXi 6.

The machine boots to the first menu where three versions are offered but no matter which option is selected there is an immediate black screen.

An internet search brought up suggestions related altering the GUI boot (didn't help and we don't get that far) or for reinstalling/repairing GRUB. Following those suggestions we've booted from a CENTOS 6 ISO and selected the option to recover the existing OS.

The existing install is detected on /dev/sda and the recover process mounts /dev/sda1 on /mnt/sysimage/boot ; /dev/sda2 on /mnt/sysimage and indicates that the detected OS was mounted on /mnt/sysimage

The recovery steps then indicate we should chroot /mnt/sysimage and then reinstall GRUB. The chroot command fails with "Failed to run command /bin/sh Input/Output error" and we cannot continue

Stuck and don't know what to try next....
0
Hello expert,
I would like setup netmap on ubuntu release 15. Thanks.
s.s.
0
I perused the answers in this excellent Unix Stack Exchange article;

http://unix.stackexchange.com/questions/24731/automounting-usb-sticks-on-debian

and tested it earlier yesterday on an Ubuntu Linux 16.04 instance ,
Lenovo Thinkstation quad core desktop , and saw that the autofs rule hides
my /home/frank directory and /media/data1 directory.

    Why does autofs restart hide my /home/frank subdirectory so I cannot
reboot and login again?

   I read in Evi Nemeth's Unix and Linux System Administration Handbook , 4th Edition,
Page 715, that "when you list the contents of an automounted filesystem's parent directory ,
the directory appears empty and you cannot browse the automounts in a GUI filesystem
browser such as Nautilus and that the photos filesystem is automounted under /portal .
It's accessible through its' full pathname". But, that is not what I observe.
Instead when I cd to /portal/photos the kernel says "no such filename or directory".
Furthermore , I cannot login to my home directory.  

    How do I fix the autofs procedure, which is an alternative to modifying
/etc/fstab?

    Why is the autofs hint preferred by Ubuntu Linux practioners
over  modifying /etc/fstab for the purpose of creating a permanent
mount point for a CD, DVD or USB drive.

    Any help is greatly appreciated.
0
Hello,
Linux newbie here.
I am trying to change the hostname of a RedHat 7  linux machine.
I tried to change the hostname by entering changed the etc/sysconfig/network file changed an entry on etc/hosts
entered hostnamectl set-hostname "myhostname" --static
tried to follow the nmtui command do it the gui way.

but all the above changes do is change the hostname till next reboot.
how can I change the hostname permanently and make it persist after a reboot

Thanks
0
Hi Friends,

We have CentOS 6.4 server and it was working fine, now its saying centos 6 booting up in 10 seconds and freeze and just showing single cursure and unable to do anything  and unable to boot again if hard reboot last time we had error “kernel:ECC/ChipKill ECC error”  Kindly suggest for further please help me

Regards
Vikrant
0
I have to remove older files which are older than one month back from linux server.

How can I
0
Hi All:

I want to implement TR181 by using klish in linux, where can I get the tutorials and starting point?

BR,

Jelly
0
Free Tool: Site Down Detector
LVL 8
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Using FileZilla or another FTP program and entering the IP address, Username, password on port 22 but is not accessing Fedora. Error message says Fedora server is refusing the file transfers. Am new at Fedora so am not sure what to do here. Need to upload files in the var/www/html but Fedora won't allow it. Any help would be appreciated.
0
I assigned 15Gb of my hard disk to Linux Mint but I later found it's quite not enough. How can i adjust the size
0
If i put in a data cd it appears on the desktop. i tried different dvd,it did not work. In fstab it shows as:

dev/scd0 /media/cdrom0 udf,iso9660 user,atime,auto,rw/dev/exec/,suid 0 0.

the RW burner is the same except scd1 and cdrom1.

i do not see any of that in mtab.
0
root@ansible01:/etc/ansible# ansible-playbook create_vms.yml -e dest_servers=webserver01.example.com

PLAY: ***************************************************************************

TASK [fail msg=One of the mandatory variables not defined] **********************
fatal: [webserver01.example.com]: FAILED! => {"failed": true, "stdout": ""}

NO MORE HOSTS LEFT **************************************************************

PLAY RECAP **********************************************************************
webserver01.example.com    : ok=0    changed=0    unreachable=0    failed=1
0
I have a user in NIS environment and would like to move to openLDAP environment.

does NIS and openLDAP uses the same hash?

what is the best way to move the users so they can use the same password they have used in NIS
0
i am trying to setup nagios server on my ubuntu box.
Ubuntu 14.04.2 LTS

root@nagios:~# apt-get install nagios
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package nagios is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'nagios' has no installation candidate


I am unable to install it
0

Linux OS Dev

8K

Solutions

3

Articles & Videos

7K

Contributors

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.

Top Experts In
Linux OS Dev
<
Monthly
>