Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

I just set up an IDS at work using fedora, and I wanted to also set up some sort of monitoring software for the web. The best outcome would be something that has an attached web interface (im using Snort+BASE right now for the IDS) I searched google but I keep getting odd sites with little information anyone know of anything good?

Adbot
ADBOT LOVES YOU

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Postal posted:

I meant anything. I'll give BASE and ACID a try once I get Fedora up and running. Right now I'm working in a VM only and having some trouble with Fedora 6 (in parallels on a MBP).
I have just set up a snort box using acid and BASE, i followed this tutorial pretty much to the letter.

http://www.howtoforge.com/intrusion...tion_base_snort

I was using fedora 5 however so im not sure what would need to be different.

Can anyone lead me to good web logging software, linux based?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

hello everyone

I'm writing a bash script but I've hit a stoping block, how would I check a directory, then drop all of the file names in this directory into a txt file?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

coconono posted:

ls >> blarg, where blarg is the name of the file

so quick thanks

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

oh jeeze one more bash question sorry, when I copy the names into this directory, is there a way to make sure that the access dates dont chage?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Now im having trouble using tar

I have a file, lets say its foo.txt, and inside this file are the filenames that I would like to tar. however I can't get tar to use these file names! I know there is a way to do this with the
-T flag, but I'm having some trouble using it.

Thanks again !

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

hedge77 posted:

are you running tar with the verbose option? If it is telling you what the error is could you post it perhaps?

here is the output i know something is off but im not sure foo.txt is in the same directory.

code:
tar -cfT foo.tar.gz foo.txt
tar: foo.tar.gz: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

CaladSigilon posted:

Why don't you tell us what you're trying to do, instead of the problem you're having?

We might have a shortcut.

Post your code too, if you want.

alright

what I'm trying to do is look at a bunch of mysql db's (not too big but large enough)

i want to tar them, then send them over ftp to our backup server. I'm using bash to script this.

here is my code so far:

code:
    $LOCATION = /var/lib/mysql; 
    $ARCHIVE_LOCATION = /archives;
    $DATE = date '+ SQL Archive Time: %l:%M %p %D';

    echo "Welcome to Archiver v 0.1";

    #Lets change directories to where we would like to be!

    cd $LOCATION;


    #lets make sure that none of the files are empty, no use copying them over
    if [-s mysql-bin.*]
    then
    #Now lets drop the each of the file names into a file
    ls >> $DATE.txt;
    echo "making archive text file";
    fi
since there are other files that i don't care to archive in this folder i use the if statement to find only those files then dump them into a file with the date in it.

using this file, then i execute the tar command (its not written yet) and then ftp to archive server. I know that there might be easer ways to do this but I want to learn some bash scripting and I thought this might be a good way to do it.

I hope that made sense!

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Zakalwe posted:

no no no no no ! You don't back up the db files directly. As you copy them they can be in an internally inconsistent state. You need to use mysqldump to dump the databases you want to a text file. You can then easily gzip this for storage and restore your databases later on in a clean and safe manner.

Ah yes, after reading a bit more I've found that you're 100% correct. And I fiddled with my script accordingly.

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

I've been bash scripting (go easy my first attempt) And after editing out the portion of code that I've gotten to work, I've discovered a new problem. I would like the text file that I've created to be emailed to myself, but I get:

code:
 U  5 MAILER-DAEMON@magni.  Fri Aug 25 12:59  31/1048  "Postfix SMTP server: errors from mailserver"
 U  6 MAILER-DAEMON@magni.  Fri Aug 25 13:01  66/2237  "Undelivered Mail Returned to Sender"
Here is the function for mailing.
code:

#mail function, really becuase i wanted to make a function.
function mail {
	/bin/mail -s "$EMAIL_SUBJECT" "$ADDRESS" < $MESSAGE;
	echo "Message Sent!";
}

Twlight fucked around with this message at 15:55 on May 21, 2007

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

dfn_doe posted:

Seeing the headers and bounce messages would probably be more helpful than just the subjects...

Sorry here is the maillog, log:

May 22 10:24:06 XXXXX postfix/postfix-script: fatal: the Postfix mail system is already running
May 22 10:25:10 XXXXX postfix/pickup[12562]: A35414A00F1: uid=0 from=<root>
May 22 10:25:10 XXXXX postfix/cleanup[17395]: A35414A00F1: message-id=<20070522152510.A35414A00F1@XXXXX.coolsavings.com>
May 22 10:25:10 magni postfix/qmgr[12563]: A35414A00F1: from=<root@magni.coolsavings.com>, size=799, nrcpt=1 (queue active)
May 22 10:25:10 magni postfix/qmgr[12563]: A35414A00F1: to=<root@magni.coolsavings.com>, orig_to=<root>, relay=none, delay=0, status=deferred (delivery temporarily suspended: address resolver failure)

What else should i be looking for, or really where are the bounce messages.

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Try using yum (fedoras version of apt-get) to install what ever dependiences you might need. Of course you can bring up the yum man page and check certin flags if you want to install things with no dependencies.

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

.

Twlight fucked around with this message at 17:12 on May 29, 2007

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Hello

Iím working during my internship and Iím focusing on linux administration. While I am doing other projects the position leaves me with a lot of free time to build different things with some of the old hardware. (Pentium 3ís). Iíve built an IDS as well as written some perl scripts but Iím fresh out of ideas for a new side project. Anyone have any ideas or would like to share what theyíre working on?
Thanks

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Whats a good way to check and see what mail has been sent. I think there is a rouge script on a server at work (not my design) and its sending mail to the admin group. Since the script is broken I want to turn it off but I'm not sure where it resides.

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

At work we have alot of systems, and since these systems are referenced by ip address mostly (due to snort's web frontend) I was thinking of creating a local whois server just so BASE can interface with it. Whats the quickest way to go about this in linux.

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

JoeNotCharles posted:

Uh, what exactly do you need from the whois server? If you have the name and want the IP, you need DNS server. If you have the IP and want the name, you need reverse DNS. whois won't help you - it just tells you who's registered a domain name.

drat, you know I knew that my question sounded odd, I guess I need reverse dns but I found some articles that allows me to do that. sorry about the mix up.

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Hello everyone,

Ill admit that my knowledge of Linux and mail servers is very weak and I have a few questions that I hope you guys can answer.

Here at work I have a server that I would like to send mail to our exchange server and then to my desk (all internal) But I'm not sure what I'm trying to ask. Is this mail forwarding? or something else? I've been reading and found that Sendmail is quite complex, should I use postfix?
Thanks

Twlight fucked around with this message at 16:55 on Jun 28, 2007

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

I've got a server I've inherited and it has many running processes that don't seem to be needed (as I never use an X session) I'm having a hard time trying to figure out what many of these are and if I can safely remove them. Here is a list:

code:
22098 ipaudit   25   0 15652  13m 1560 R 39.8  2.7   0:35.14 MakeReport30
22084 root      16   0 10916 9436  596 R 29.6  1.8   1:32.72 ipaudit
24657 snort     25   0  183m 105m 3320 R 28.6 21.0   3202:30 snort
21441 root      15   0  2156 1020  784 R  1.0  0.2   1:07.43 top
 1972 mysql     15   0  138m  13m 2820 S  0.3  2.7 225:19.84 mysqld
22097 ipaudit   18   0  1592  388  320 S  0.3  0.1   0:00.20 cat
    1 root      15   0  2004  564  532 S  0.0  0.1   0:05.16 init
    2 root      34  19     0    0    0 S  0.0  0.0   0:00.13 ksoftirqd/0
    3 root      RT   0     0    0    0 S  0.0  0.0   0:00.27 watchdog/0
    4 root      10  -5     0    0    0 S  0.0  0.0   0:08.19 events/0
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
    6 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kthread
   55 root      10  -5     0    0    0 S  0.0  0.0   0:07.47 kblockd/0
   56 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
  114 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 cqueue/0
  115 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd
  118 root      13  -5     0    0    0 S  0.0  0.0   0:00.00 khubd
  120 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod
  140 root      10  -5     0    0    0 S  0.0  0.0   1:23.86 kswapd0
  141 root      18  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0
  306 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 kpsmoused
  327 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 kmirrord
  334 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 ksnapd
  344 root      11  -5     0    0    0 S  0.0  0.0   9:51.75 kjournald
  383 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 kauditd
  408 root      21  -4  2352  360  356 S  0.0  0.1   0:00.82 udevd
  658 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 ata/0
  659 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 ata_aux
  664 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 ac97/0
  944 root      16   0  7832 2356 1900 S  0.0  0.5   0:11.35 sshd
  947 sbaumkir  15   0  7976 1824 1356 S  0.0  0.4   0:17.51 sshd
  948 sbaumkir  16   0  4452 1440 1220 S  0.0  0.3   0:00.12 bash
  970 root      18   0  4764 1176  936 S  0.0  0.2   0:00.04 su
  971 root      15   0  4580 1480 1208 S  0.0  0.3   0:00.22 bash
 1140 root      15   0  3664  472  404 T  0.0  0.1   0:00.00 tail
 1227 root      20   0  9540 3212 2320 S  0.0  0.6   0:09.56 vim
 1233 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kjournald
 1511 root      16   0  4764  936  932 S  0.0  0.2   0:00.02 su
 1512 root      15   0  4584 1232 1228 S  0.0  0.2   0:00.71 bash
 1579 root      15   0  3660  408  404 T  0.0  0.1   0:00.00 tail
 1587 root      16   0  1656  560  472 S  0.0  0.1   3:12.25 syslogd
 1590 root      16   0  1604  328  324 S  0.0  0.1   0:00.02 klogd
 1596 root      17   0  9624 2272 2268 T  0.0  0.4   0:00.32 vim
 1615 rpc       23   0  1736  404  400 S  0.0  0.1   0:00.00 portmap
 1634 rpcuser   24   0  1844  596  592 S  0.0  0.1   0:00.04 rpc.statd
 1663 root      15   0  4744  308  284 S  0.0  0.1   0:01.71 rpc.idmapd
 1678 dbus      21   0  3000  312  308 S  0.0  0.1   0:00.02 dbus-daemon
 1722 root      15   0  1820  392  376 S  0.0  0.1   0:38.81 hidd
 1810 root      15   0  1872  608  564 S  0.0  0.1   0:26.24 automount
 1824 root      18   0  1916  440  288 S  0.0  0.1   0:00.82 smartd
 1833 root      18   0  1596  328  324 S  0.0  0.1   0:00.00 acpid
 1842 root      24   0  4996  300  296 S  0.0  0.1   0:00.00 hpiod
 1847 root      15   0 12512 1068  768 S  0.0  0.2   1:25.31 python

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

ShoulderDaemon posted:

Good info

Thanks! this is an IDS box, and IPaudit does traffic logging and makes nice graphs. (if you wanted to know

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

hey everyone!

I've been having a hell of a time trying to track a script down on an older box that keeps emailing our networking department. I've pulled up the maillog and this is the entry:

code:

Aug  7 10:01:04 magni postfix/local[30818]: AD414480002: to=<admins@magni@no.com>,
orig_to=<admins>, relay=local, delay=1, status=sent (forwarded as 263F0480001)
Aug  7 10:01:04 magni postfix/smtp[30821]: 263F0480001: to=<tmccomb@no.com>,
 orig_to=<admins>, relay=chexchange.no.com[172.16.2.8], 
delay=0, status=sent (250 2.6.0  <20070807150103.AD414480002@magni.no.com> Queued mail for delivery)
(sorry bout the line breaks)
I've searched through the cron jobs and cant find where this is coming from. I know I'm missing something but I just can't put my finger on it.

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

hey everyone,

I'm having a hell of a time trying to figure out Parameter expansion. What I'm trying to do is check filename patterns with substitution parameter expansion. However, I cant quite figure out how to take the array of file names I have and the parameter i want to check and make sense of it It's quite vexing. thanks!

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Hello everyone


I'm running a FC5 server and I want to send email from this server to my gmail address. We already have a mail server at work but I'm not sure how to configure sendmail to work with an existing email server. I'm not really sure how to google for this type of question most results just show how to configure sendmail as a standalone email server.

Thanks

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Alowishus posted:

You need to configure sendmail to use a smarthost (where the smarthost is your existing mailserver):
code:
define(`SMART_HOST',`[smarthost.example.net]')dnl
That has to go into sendmail.mc and then you have to generate a new sendmail.cf. If that's not something familiar to you, I really recommend 'yum install postfix' followed by 'yum remove sendmail'. Postfix isn't nearly as retardedly difficult to configure as sendmail is... you'll be able to just read through the comments in /etc/postfix/main.cf and make pretty good sense of everything ("relayhost" would be the Postfix parameter for this particular situation).

I'm going to try and do this through sendmail. I might as well get some practice with it! thanks!

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

I have a poo poo load of files in my /tmp directory and I want to remove some of them. They begin with A or B have the string 406 inside and end in .txt and/or .text.

I created this command

code:
rm a|b406.txt|.text
Is this correct? I'm getting conflicting reports that rm will alow regular expressions. Or are they not even needed?

I'm refrencing this page regarding regex and rm.

http://polishlinux.org/console/regu...earch-patterns/

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

I'm having some trouble using IPtables with CentOS 5. I'd like to use the firewall but it seems when I turn it on I can't access internal web pages. (This server is running Cacti/Nagios) so when I try and open their web interfaces I cannot establish the connection.

Here are the Iptables rules

code:
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [896:94521]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A INPUT -s 192.168.1.106 -d 192.168.7.111 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -d 192.168.7.111 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -s 192.168.1.106 -d 192.168.7.111 -j ACCEPT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
I tried removing all the rules and starting from scratch with the -F flag but they just keep coming back How can I remove everything them restart from scratch?

Edit: I figured it out, I wasn't saving the file with
code:
service iptables save
sorry!

Twlight fucked around with this message at 16:44 on Mar 24, 2008

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Hey everyone:

I've wanted to create some simple mysql reports based on the database that Snort creates. When I Google for MySql reporting, it's mostly "Please buy this product" and so on. Does anyone know of a free reporting tool?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

While this is some time out, I'd figure that I should learn more about linux mail systems. I might have to build one for work at some time and having one built and running on my home pc might be something id use as well. Where should I go about learning the in/outs of a particular program? I've been reading about postfix and it seems pretty good. I'd like to get calendar integration too, but at a much lower priority, as well. Where should I begin to search?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

This is a question i've had mulling over my head for some time and wanted to know what everyone else thought:

I would like to start keeping track of where/what/how our server config files are managed. I was looking into subversion, and was liking what I was seeing. However are there any things that I should know before using subversion for configuration file control, instead of it's "normal" use as for developing applications?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

GringoGrande posted:

There are newer and better SCM's than subversion. Here's a blog entry on how to use git and a apt hook to keep track of /etc.

Man, just what I was looking for, thanks!

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Hey everyone:

I created a quick bash script that has a long command that I execute a lot. I've added the command name to my bashrc but what other steps do I need to allow it to be ran from all across the file system?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

SynVisions posted:

I assume you mean ran across all users? Take it out of your bashrc and drop the script somewhere in your $PATH. i.e. copy/symlink the script to /usr/bin.

Thanks! You're right I meant to say users

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Here is an odd question:

At my new job most of our printers work off of cups. This isn't bad, the web interface is nice and I don't mind administering printers in this way. However I would like to change one thing. When a printer is locked, all users must contact me to have the printer unlocked. I feel that with the web interface there isn't much of a need to contact me. I was poking around cups and found that you can adjust what privileges users have. I just don't want a user to be able to lock and unlock printers which arn't in there location.

I found this link:
http://linux.derkeiler.com/Mailing-...04-08/2848.html

which someone highlights the same problem, I was wondering if anyone has ran into this and how they figured it out.

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

I've been given the task of setting up account management for our Linux systems. we have 4-5 CentOS 5 systems and about a 1/2 dozen Red Hat systems as well. All of our windows servers are authenticating through AD. Searching on Google really hasn't brought the kind of information I've been looking for. I'm not sure where to begin, would radius be a good idea? we have a radius server already in house handling some Cisco log in information, or should I use something else?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

chryst posted:

If you can get your AD admins to add the POSIX extensions (they might be called something else) to Active Directory, then you can auth your servers via AD using LDAP and Kerberos. It's not terribly hard, and it works reasonably well.

haha I am the AD admin. Ill look this up thanks.

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

I have a couple hundred users that connect to our ERP solution that runs RHEL 3. Before I got here when a user left the company there user account was never removed from the system. Now I have a huge homes directory that has both inactive and active accounts.

What would be a decent way to do the following?

1: get a list emailed each month with users that have been inactive for x amount of days

2: automatically disable accounts inactive between x and y

3: remove accounts that are inactive past y

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Ashex posted:

I would have a list generated of users that haven't logged in within the past 90 days, then automatically disable them.

Ideally, before it goes through the disable part, delete users who haven't logged in within the past 6 months, but only disabled accounts. This avoids removing users who may be on sick/vacation/maternity leave.

Then just have it email the results of the check after it has run.

Edit: Although, that would still get users who are on extended-leave since it does auto-disable. Possibly have a "standby" group to add these users to.

Yea I just ran into this problem we had a manager that was gone for 2 months on medical, now hes leaving again for another 2 months so I can see where a holding group would make sense.

how would it be best to get logged in information? just ls -al the home directories?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Ashex posted:

I would suggest using last


Edit: actually, that won't work since cleanup will remove that once a week. I suggest looking at this script.

Here's an example:

Example: To get a list of all real users who haven't logged in in at least a
year:

lastlogin -onb -a -u'(t-b) > 86400*365'


source

These systems are not well maintained, cleanup isn't running so last worked out perfectly. To script this up, I'm assuming i would use awk to grab dates that i would like?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

JoeNotCharles posted:

Depending on cleanup not running seems like a bad thing - if someone took over and started maintaining the system better, things would start breaking.

EDIT: do you have an easy way to get a list of each employee's manager? (I assume they have one.) I'd have it email their manager when their account is about to be deleted, so that a human gets a chance to intervene. ("If this employee is still with the company and is just on extended leave, please contact IT immediately.")

I should have been more clear, I've started to document (because there is 0 documentation about anything) and automate how things are done. This IT department is a loving mess beyond belief, but it does give me the change to learn which has been invaluable. I'm writing scripts and using CFengine to push out changes which is a step in the right direction, we just have so many little things like automating user administration (or at least doing it a single way) that should have already been done.

Adbot
ADBOT LOVES YOU

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior

Fun Shoe

Lucien posted:

Here, try this on for size:
code:
#!/bin/bash
newfile=$HOME/Documents/ClassNotes-`date +%Y-%m-%d`.odt
mv $1 $newfile
ooffice $newfile
Save this in /usr/local/bin/YOURSCRIPTNAME and call like so:
code:
$YOURSCRIPTNAME FILENAME
Make sure the file is executable and the path in the script is correct.

I just did something like this. It's best to take the output of date into a variable.

code:
today="$(date +%Y-%m-%d)" 

$today.yourfilename.whatever

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply