Programming :: Write A Script That Says Hello, [current User]?
Feb 11, 2011
I have to write a script that says Hello, [current user]. Today is [date]. The time is [time am/pm]. You have logged into a [term] terminal.My script looks like this:
I have several users on handhelds and they like to let their sessions time out. Their zombie processes then cause record locks.I've come up with calls for killing the pids for any prior sessions started by a given user. This procedure would be executed in the .bash_profile.
I am trying to write a perl script which will give an interactive session to a user to execute command on the server. I have written a small script to do this :
Code: !/usr/bin/perl -w use strict; use Net::SSH::Perl; my $host = '192.168.1.1'; my $username = 'user'; my $login_passwd = 'test123';
I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.
This netbook only has a user with non-administrative privs on it and root user but I do not have root's password.Is there a way that I can create a new administrative user of change the current user's group so that it can do sudo commands or have more privs?
I have an old Mac OS (Tiger) and the new OS are not backwards compatible with computers as old as mine. In the reading I've found they explain how to partition the hard drive, but this is not what I want. I only want to have the Linux OS.
I've looked everywhere but I can't find where to change the default box for incoming mail, or am I on the wrong track. It's a nuisance having to change folders and I can't configure wastebin to empty on exit.And I can't get kmail to import from evolution. Do I have to go to the evolution storage and do it manually, and if so, how do I do that?
I installed Linux on a laptop once.. i'd like to do a dual boot but i've never done it before. Is there anything special i need to do? i don't want it to write over my current operating system.
user@host$ killall -9 -u user Will it definitely kill all processes owned by user (including forkbombs)?
No new processes is spawned to user from other users. No user's processes are in D-sleep and unkillable.No processes are trying to detect and ptrace or terminate this started killall (but they can ptrace or do other things with each other) There is ulimit that prevents too much processes (but killall is already started and allocated it's memory)
E.g. if killall will finish untampered and successfully is it 100% that no processes are left with this uid? If no, how to do it properly (with standard commands and no root access). Will SysRq+I definitely kill all things (even replicating)?
i'm using centos 5 and i want to save my setup when switching the user.when i switched user from user1 to user2 and then i logged in user1 back without shutting down, i couldn't see any working window on user1. But since it's working on the CPU, i guess it's working but i cannot just see the window(such as terminal in my case) i was using. i have been using scientific linux which have "save current setup" when logging out. but centos seems not to have that check box!i want to know whether centos can contain the setup for each user when switching user.
Is there anyway to monitor the current bandwidth in use by a user (NCSA auth) on squid? Occasionally we get a user downloading too many videos at once, which blocks bandwidth to other users on the network. As I have no idea which user it is until the end of the day (SARG reports), we just restart the squid server to disconnect their downloads.
On my laptop for testing, I simply chown each subdir of /var/www to my myuser:www-data. But, now that I am setting up a public facing server, I'm wondering if this is the proper way to do so? If not, what is the best way to allow a non-root account to write to /var/www.
As a testcase on how encryption works out of the box with OS11.4 I've formatted an external drive with encryption. All goes well and upon boot the passphrase is requested. However I cannot write files to the disk as a user and I can't find the correct mount command in order to get it mounted so that my users can write to it and not only the root.
I was wondering, i have a webfolder and have permissions set to 770 with group being www-data. I would like to give access to one folder to a friend so he can edit images, css, etc. I made that folder 770 with group being site_name with www-data and him being in the group. So far so good it sounds like. However when i use the full path to the directory linux says it doesnt exist.
Is there a way i can make it so he doesnt have r/w file on files inside the parent directories and still access the directory i want to give him?
so i have a limited user (my dad) on Jaunty who has no write access to his floppy disks. Nautilus gives a permission denied error, and i discovered that root owns the floppy drive, thus allowing his read-only. (that write tab on the floppy in on btw). However, when i login as a admin, nautilus says that user has write access. ??? I check the user's user privliges and everything exept "administer the system" is checked. I can copy files on it by logging in as root.
I am having an issue with a Chrooted SFTP User not being able to write files.
The permissions are setup correctly as if I remove the Chroot the user can write files correctly.
User has a transfer folder which they should be able to write files to and read from, this works correctly until I apply the snippet from sshd_config file below then the user can only read files. I have tried tweaking the permissions but this doesn't seem to have helped at all.code...
allow specific user permission to read/write my folder
I have a folder called /TAR/Sketch
I added a new user, named Snoopy, I want to grant this user the ability to add files & directories to this folder which is under the group Sketches and the owner is me.
I need 2 Linux users to share a folder. Within this folder, users should always be able to create files and sub-folders and write into any sub-folder (whether they own it or not). However, they should only be able to edit the files they actually own.
I have a computer with no floppy drive (x64 ubuntu lucid installed) I have a program (wine windows xp) that will only save data and export data from/to a floppy drive. I found information on setting up an emulated floppy drive. i.e.
I modified the winecfg to include under the drive section A: /media/floppy. Problem is I cannot write to the drive as a normal user. I have tried everything I know but only root can read write to the drive. Is there someway to set up this emulated floppy to allow me as a user to write and read contents.
I'm having an odd problem (although I'm probably missing something obvious to a non-semi-newbie):I have a directory used for samba shares which is owned by user fred, a system user which the windows clients on my network authenticate with to access the shares. I, roger, want to access the directories without having to put my 'sudo boots' on every time, so I made the directory group users and added roger to that group, and changed the file/folder modes from 0755 to 0775.However I still do not have write permissions inside the directory; I still seem to be considered 'other' and hence only have read and execute.
I need to give a user write access to /var/www and its subdirectories. The current directory permissions are as follows:rwx r-x r-x root root
I added the user to the root group but that didn't seem to help.I read I could chmod -R to change the access to write for the www directory and subdirectories but I don't want to change things and mess up the website. How can I give the user access to write to the www directory and subdirectories without messing anything up? Would changing the www directory group owner to his group cause an issue anywhere?
When I log on a root and attempt to issue the command Freshclam to upgrade the virus definitions it attempts or create a new file with a definition name. I get a message stating that the directory isnt writable. The user and group access rights are as follows:
USER = read, write, execute Group = read, write, execute All= read, execute.
The only way I can get around this is by applying a 777 which would be read, write and execute for all. Now, I have a group define with several user ids in it including Root.How do I connect the group with the directory/file so I dont have to apply a 777 access right to group users could issue the Freshclam command.
I managed to setup an encrypted partition that's mounted on boot using dm-crypt/LUKS.
The relevant entry from my /etc/fstab:
/dev/mapper/st_crypt /media/st ext4 defaults 0 2
The partition is mounted at boot, and I can write to it as root just fine, but I have no idea how to make it writable by a normal user (i.e the users group).
I am digging the forum through and cannot find the answer. My problem is, the usb hard drive when plugged in get automatically mounted what is great. Unfortunately I get only read permissions, while need write too.There are no any entries in fstab, so I do not know what does handle automounting and how to edit options to force mounting with write permission to user (root obviously can write). Are they hald options or any other app does this? Where to edit them? The drive is not permanently ON, just switch it when need, so it has to work every time I put it on.