I'm serious - is it really fun for *nix sysadmins spending half of their life on spotting typo in httpd.conf ? What not use xml or json - (write gui tools would be easy)
XML one is something like that:
<dict>
<key>2</key>
<array>
<string>A</string>
<string>B</string>
</array>
<key>3</key>
<array>
<string>C</string>
<string>D</string>
<string>E</string>
</array>
</dict>
XML Two is something like that:
<dict>
<key>A</key>
<array>
<string>A1</string>
<false/>
<false/>
<array>
<string>Apple</string>
<string>This is an apple</string>
</array>
<array>
<string>Apple Pie</string>
<string>I love Apple Pie.</string>
</array>
</array>
<key>B</key>
<array>
<string>B7</string>
<false/>
<false/>
<array>
<string>Boy</string>
<string>I am a boy.</string>
</array>
</array>
</dict>
I want to convert to this:
<dict>
<key>2</key>
<array>
<string>A, Apple, Apple Pie</string>
<string>B, Boy</string>
</array>
...
</dict>
I am dealing with an issue I am unclear on how to resolve and have been pulling my hair out for some time. I have been trying to configure an FTP user using the following (we use this same documentation on all servers)
Install FTP Server
apt-get install vsftpd Enable local_enable and write_enable to YES
and anonymous user to NO in /etc/vsftpd.conf restart - service vsftpd
restart - to allow changes to take place
Add WordPress User for FTP access in WP Admin
Create a fake shell for the user add "usr/sbin/nologin" to the bottom of the /etc/shells file
Add a FTP user account
useradd username -d /var/www/ -s /usr/sbin/nologin
passwd username
add these lines to the bottom of /etc/vsftpd.conf
- userlist_file=/etc/vsftpd.userlist
- userlist_enable=YES
- userlist_deny=NO
Add username to the list at top of /etc/vsftpd.userlist
restart vsftpd "service vsftpd restart"
make sure firewall is open for ftp "ufw allow ftp" allow
modify the /var/www directory for username "chown -R
/var/www
I have also went through everything listed on this post and no luck. I am getting connection refused.
Sorry for the poor text formatting above. I think you get the idea. This is something we do over and over and for some reason it is not cooperating here.
Setup is Ubuntu 12.04LTS and VSFTPD v2.3.5
Thank you in advance.
For example, if I have a directory containing files file1 and file2, and a directory dir1, then "ls -l file1" will show details just for file1. Doing the same thing for dir1 will instead show the contents of dir1. Is there a way to treat dir1 like file1?
I'm looking for a simple method that will log file system operations. It should display the name of the file being accessed or modified.
I'm familiar with powertop, and it appears this works to an extent, in so much that it show the user files that were written to. Is there any other utilities that support this feature.
Some of my findings:
powertop: best for write access logging, but more focused on CPU activity
iotop: shows real time disk access by process, but not file name
lsof: shows the open files per process, but not real time file access
iostat: shows the real time I/O performance of disk/arrays but does not indicate file or process
We have about 10 heterogeneous machines we would like to run various jobs on. The current situation is that people log in on a machine with ssh, see if other people are running stuff on it, then use screen to run the job.
I'd like to automate this process, but I don't have enough time to install a full-fledged cluster solution. So what's the simplest thing I can do?
I have the following command that lists all files with the extension doc, docx, etc.
find . -maxdepth 1 -iname \*.doc\*
The command returns numerous files some of which I would like to delete. So for example the results returned are
Example.docx
Dummydata.doc
Sample.doc
I would like to delete Sample.doc and Dummydata.docx. How do I delete the files using the -exec option. Am I able to pass in the names of the files e.g. rm Dummydata.docx Sample.doc hence the command would look as follows
find . -maxdepth 1 -iname \*.doc\* -exec rm Dummydata.docx Sample.doc
Can I pass the names of the files within {} afterrm`? e.g.
find . -maxdepth 1 -iname \*.doc\* -exec rm {Dummydata.docx} Sample.doc
Is there a better way of doing it?
I have a whole lot of photos and it's time to clean up the mess and free some disk space.
I know mogrify is great to batch-resize things down. The problem is, in some directories I have small images mixed with the big ones. I'd like to batch-downsize all the big one but not upsize the small ones.
As an example, I have a rep with tens of MBs-pictures in the 3000x2000s. Some of them I have already downsized so I could email them. They may be 1024x768. I'd like to downsize the big ones to 1600x1200, a disk-space-to-quality tradeoff I like. But then, with mogrify or convert, the small ones will be upsized, which would be a waste of disk space.
I found some tricky ways to use identify with cut and some scripting to filter the small pics out and mogrify the others, but man, there's got a way to tell mogrify not to upsize my pics... How ?
Is there some other tool better suited ?
I am having problems booting a new Ubuntu 10 (server) install. My primary HD (/dev/sda) is laid out as follows:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 18 144553+ 83 Linux <-- /BOOT
/dev/sda2 19 182401 1464991447+ 5 Extended
/dev/sda5 19 2207 17583111 fd Linux raid autodetect
/dev/sda6 2208 11934 78132096 fd Linux raid autodetect <-- / (ROOTFS)
/dev/sda7 11935 182401 1369276146 fd Linux raid autodetect
The rootfs is part of a RAID1 (software) array (currently degraded):
# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sda6[1]
78132032 blocks [2/1] [_U]
The UUIDs for the partitions are as follows:
# blkid /dev/sda1
/dev/sda1: UUID="b25dd301-41b9-4f4d-9b0a-0e31713dd74c" TYPE="ext2"
# blkid /dev/sda6
/dev/sda6: UUID="af7b9ede-fa53-c0c1-74be-31ec752c5cd5" TYPE="linux_raid_member"
# blkid /dev/md2
/dev/md2: UUID="a0602d42-6855-482f-870c-6f6ecdcdae3f" TYPE="ext4"
Finally, I have my grub2 menuentry setup as follows:
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-25-server' --class ubuntu --class gnu-linux --class gnu --class os {
insmod ext2
insmod raid
insmod mdraid
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b25dd301-41b9-4f4d-9b0a-0e31713dd74c
linux /vmlinuz-2.6.32-25-server root=UUID=a0602d42-6855-482f-870c-6f6ecdcdae3f ro nosplash noplymouth
initrd /initrd.img-2.6.32-25-server
}
When I attempt to boot, grub loads OK, however I eventually get the following error message:
Gave up waiting for root device. ALERT /dev/disk/by-uuid/a0602d42-6855-482f-870c-6f6ecdcdae3f does not exist. Dropping to a shell!
If from the grub bootloader I open a grub command line, I can ls (hd0,) and it lists the correct partitions with the UUIDs as shown above - sda6 shows 'a0602d42-6855-482f-870c-6f6ecdcdae3f' (the RAID UUID). If I ls (md2)/ it properly lists all the files on the RAID1 filesystem (ext4) so it doesn't appear to be an issue accessing the raid device.
Does anyone have any suggestions as to what the problem might be? I can't figure this one out.
Hi,
I need to install a pair of 1Tb disks into a server that has a hardware RAID card.
How long is it likely to take to configure the RAID controller - sticking the disks in is only a 5 minute job, but is there likely to be significant downtime while both disks mirror (even though they are both blank)? Am I looking at 10 minutes over all, or more like 2 hours for this to happen?
Thanks
I have an Ubuntu server. It is going to be a web server with a URI of www.example.com. I have a DNS A record pointing www.example.com to the server's IP address.
Let's say I pick "trinity" as the hostname for this server.
I want to set up the DNS records correctly. I need reverse DNS to www.example.com, so a CNAME for www.example.com doesn't seem appropriate. Here's my question:
Is it considered best practice to set up two DNS records (which in my case would likely be two A records), one for www.example.com and one for trinity.example.com, both pointing to this server's IP address? (Or, even if it is not accepted as a best practice, is it a good idea?)
If so, would the following be a proper /etc/hosts file?
$ cat /etc/hosts
127.0.1.1 trinity.local trinity
99.100.101.102 trinity.example.com trinity www.example.com
This server is a Linode and Linode's docs seem to imply that the above approach is best (if I am reading them correctly). Here's the relevant section. I bolded the line that seems to apply here.
Update /etc/hosts
Next, edit your /etc/hosts file to resemble the following example,
replacing "plato" with your chosen hostname, "example.com" with your
system's domain name, and "12.34.56.78" with your system's IP address.
As with the hostname, the domain name part of your FQDN does not
necesarily need to have any relationship to websites or other services
hosted on the server (although it may if you wish). As an example, you
might host "www.something.com" on your server, but the system's FQDN
might be "mars.somethingelse.com."
File:/etc/hosts
127.0.0.1 localhost.localdomain localhost
12.34.56.78 plato.example.com plato
The value you assign as your system's FQDN should have an "A" record
in DNS pointing to your Linode's IP address. For more information on
configuring DNS, please see our guide on configuring DNS with the
Linode Manager.
When I use netstat -tup, it only shows the processes for some. There are other ports that just have a - for PID, so how would I find out what process is listening on these ports?
After manually setting the display brightness on my laptop, the system re-sets the value. If the laptop is plugged in, the value is set to full brightness; if it is not plugged in, it is set to dimmer. How do I stop that behavior?
Note that I am not talking about what it does in response to the event of plugging in or unplugging my system. It changes on it's own - usually several minutes after I change the brightness value. I have observed this behavior on different systems, different distributions, and different desktop environments.
Shotwell helps me keep my photos organized. It would be nice if there was something similar for my videos. I prefer something Gtk-based, but I'm open to ideas.
I want to write code in Dev C++ so that when i execute in Ubuntu 8 , it clones my windows 7 from D: partition to its child partitions E:,F: ...
i have made my partitions of equal sizes and i have tested by manualy using ntfsclone ,so their will be no problem in cloning.
this is part of kiosk system and i hope you understand what i am upto
Some reference or help will be appreciated
thanks
I tried to find a previous question on SU pertaining to this, but I'm surprised this has not been asked before.
I have seen some deals lately for really cheap SDHC Class 4 cards, and would like to know whether these are a feasible alternative to USB flash drives for running an OS.
I was trying to bring up my custom kernel. I did the following :
make menuconfig && make modules && make modules_install && make install
I would like to change the install PATH. How can i do that?
I tried doing
export INSTALL_PATH=<my custom path>
But then it is only creating the vmlinux.bin(it is not creating the ramdisk image!!)
But if i am not doing that, make install will automatically create the ramdisk image in the default /boot folder.
How can i change that??
Thanks,
Sen
I have a USB stick with a Fedora 11 live environment on it.
It's booting fine on 3 PCs where I've tried it.
But I can't get it to boot on a Mac (Intel). When pressing the alt key (or command key, I don't remember which one) during startup I can only choose the "Macintosh HD" and the USB stick doesn't appear.
I recently purchased a netgear 150 usb wireless dongle for use with my 11.10 Xubuntu amd64 system. Using the network-manager interface, I can see local wireless networks and enter the authentication details for my local wireless lan. Unfortunately, the connection does not seem to work, I keep getting notifications that my wireless has disconnected (but none indicating that I've connected). When I examine syslog, it seems to indicate that I've successfully associated with the wireless switch and that dhcp has successfully acquired an ip address but the log shows that the dhcp process keeps sending requests, eventually dropping the connection. 'ifconfig wlan0' never shows the dhcp address logged in syslog.
I suspect that the problem lies with the usb dongle, my configuration or the wireless switch but I am not certain how to isolate the problem, can anyone provide some insight on how I should go about homing in on the cause of this problem or verifying the functionality of the individual components, thanks.
I've just rented a new server (CentOS 5.4) and I see it has only 3 partitions: /, /boot and the swaping partition.
I'd like to create, at least, partitions for /tmp and /var.
Would there be any problems if I try to create those new partitions through SSH??
Thanks.
I am interested in making an in house web ui to ease some of the management tasks I face with administrating many servers; think Canonical's Landscape.
This means doing things like, applying package updates simultaneously across servers, perhaps installing a custom .deb (I use ubuntu/debian.) Reviewing server logs, executing custom scripts, viewing status information for all my servers.
I hope to be able to reuse existing command line tools instead of rewriting the exact same operations in a different language myself.
I really want to develop something that allows me to continue managing on the ssh level but offers the power of a web interface for easily applying the same infrastructure wide changes. They should not be mutually exclusive.
What are some recommended programming languages to use for doing this kind of development and tying it into a web ui? Why do you recommend the language(s) you do?
I am not an experienced programmer, but view this as an opportunity to scratch some of my own itches as well as become a better programmer. I do not care specifically if one language is harder than another, but am more interested in picking the best tools for the job from the beginning.
Feel free to recommend any existing projects except Landscape (not free,) Ebox (not entirely free, and more than I am looking for,) and webmin (I don't like it, feels clunky and does not integrate well with the "debian way" of maintaining a server, imo.)
Thanks for any ideas!
I'm trying to use Skype with Ubuntu Karmic and I just don't understand how to configure Pulseaudio properly. The previous version of Skype allowed me to talk through and hear the voice on my USB phone and the ringing sounds through my laptop speaker. I'm not able to do this with the new version (2.1.0.47).