General :: Scp Is Not Working With Restrict Bash?
Apr 21, 2011I just wondering if scp working with restrict bash ? It seems like my scp just stuck there while login.
If i use ftp i get 530 login failed..
I just wondering if scp working with restrict bash ? It seems like my scp just stuck there while login.
If i use ftp i get 530 login failed..
below are the details of my system. I have bash as my current shell, some really common commands aren't working.
Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])
Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$
[Code]....
When you are performing time consuming operations in bash like installing new software, is it possible to write text that will appear at the prompt when the operation has finished.
E.g
Imagine running:
apt-get install eclipse-platform
Then it will use quite a while to finish while you see the installation log, meanwhile I want to create new folders (workspaces) which Eclipse later will use.
Is this possible without opening a new terminal (or tab)?
I have bash 4.0. I used the following for loop example, but all it outputs is "{1..10} instead of the actual numbers one through ten. why?
Code:
for a in {1..10}
do
echo -n "$a "
done
when ever some error happens in the functions, they are not propagated and err_out function is not called.I tried #!/bin/bash -E too; that way when there is an error the script exits but what I need is error to be propagated properly to the handler.
View 1 Replies View RelatedI have bash script which has lots of echo statements and also I aliased echo to echo -e both in .bash_profile and .bashrc, so that new lines are printed properly for a statement like echo 'Hello World' the output should be I even tried using shopt -s expand_aliases in the script, I am running my script as bash /scripts/scriptnm.sh; if I run it as . /scripts/scriptnm.sh I am getting the desired output.
View 4 Replies View RelatedThe Cookbook gives us
for FN in $*
do
echo changing %FN
chmod 0750
done
but that changes all. how can I change all files but subdirectorys? I was thinking of something likels -l | grep -v ^d but can't get it to work. I'm still learning about variables and how to use them. thanks in advance for your Patients.
I would like to keep track of not only what bash commands I used and when, but also where they were issued from, i.e. what was the current working directory when I issued "foobar" on a particular day and time. Can we ask bash history to keep track of working directories too? I have tried to get an idea of this reading the enormous "man bash", but I don't seem to have an answer yet either way.
View 11 Replies View RelatedJust trying to execute cd command in a .cshrc file (bash shell in SUSE Linux) it says."No such file or directory".Do you see any reasons for this
View 3 Replies View RelatedSuppose that some person is insomniac because of a bad habit of chatting on the IRC every night until 3AM. That completely ruins this person's life because he is unable to wake up on time to attend his exams, because he will be fully exhausted everyday and will feel depressive.
That person is conscious of this bad behaviour, and would accept any help including installing a software on his own computer granting me admin privileges to install it.
Do you know of such a software that ideally would: Would prevent use of the computer at certain time ranges, let's say 11PM — 6AM Would gracefully shutdown the computer at the beginning of that time range (not killing all the applications brutally), and shutdown it if the user attempts to switch it back on Would warn 10 minutes beforehand Could occasionally be disabled if I give a one-time password to that person?
That person uses Linux, and I am curious of knowing what is available for that purpose. It is kind of a parental control, but not for a child.
Under Linux, I would like to be able to launch anything from command line in a "safe" environment, i.e. be assured that it can't read or write any file on my computer, and even better if it couldn't access the network.I thought about creating a user with reading rights only in the current folder (and nowhere else), and su to this user to launch the command, would this work ? And what about the network ?
View 2 Replies View RelatedAs example, I have directory in /root called as "shared". i already shared this directory using NFS. i want to limit this directory size into 20 GB(20*1024*1024).That means "shared" directory reserved 20 GB disk space from the HDD.how can i solve this problem
View 3 Replies View Related1-Can I do su - userA in php? Cam I have php run the whole script as userA.
2-Can I make php to run from a certain directory? like chroot kind of things.
I use Rh server , can advise if I want to restrict the root user can not directly login to the system ( eg. ssh -l root IP_address" , what can i do ?
View 5 Replies View RelatedCan I restrict the number of ssh connections to my Linux box - by username or by ip or both?
View 1 Replies View RelatedI have written a simple server application (with an HTTP interface). I want to ensure that only calls from the local machine are processed - i.e. I want to prevent outsiders from accessing/using my server.
How may I restrict outsiders (i.e. requests from remote machines)?
During set-up of a home server (running Kubuntu 10.04), I created an admin user for performing administrative tasks that may require an unmounted home. This user has a home directory on the root partition of the box. The machine has an internet-facing SSH server, and I have restricted the set of users that can connect via SSH, but I would like to restrict it further by making admin only accessible from my laptop (or perhaps only from the local 192.168.1.0/24 range). I currently have only an
[Code]....
I'm in the process of restricting access to my Linux production box, where ssh access needs to be limited to only a few MAC addresses.I've followed the instructions outlined in this guide and ran the following two commands:
/sbin/iptables -A INPUT -m mac --mac-source XX:XX:XX:XX:XX:XX -j DROP
/sbin/iptables -A INPUT -p tcp --destination-port 22 -m mac --mac-source XX:XX:XX:XX:XX:XX -j ACCEPT
root@xxxx:~/#: iptables --list
[code]....
NSA's Guide to the Secure Configuration of Red Hat Enterprise Linux 5 recommands restricting device ownership to root only.
So my question is why should we restrict device ownership to root? And what does device ownership mean anyway in Linux?
Can I restrict the number of ssh connections to my Linux box - by username or by ip or both?
View 3 Replies View RelatedI use 'grep -Ri "mypattern" .' to search for all files in the current directory recursively that contain "mypattern". But this command returns every single occurence, so that if a given file has several occurences of the pattern, the screen fills up pretty quick. More than likely, there's a way to restrict the output so that it only displays each file once, no matter how many occurences it contains, but I couldn't find how to do it.
View 2 Replies View Relatedhow can i restrict a single particular user from logging into the server not more than 5 times?
The conditions may be:
1) wrong password
2) can login only 5 times on one day etc.
Is there way we can restrict root to su to normal user. Or at least a way to prompt for the password when root tries to su <username>.
View 3 Replies View RelatedHow to restrict users to send mail to outside domains in qmail server, i have centos and qmail installed
View 14 Replies View RelatedI want to limit delete of a particular folder in the user's home folder and to restrict any add/change/delete on files in that restricted directory.
/home/myuser
/home/myuser/_protected //no delete
/home/myuser/_protected/1.txt //only read
How can I do that on Ubuntu server?
If there is a general NFS share in the LAN and for example this share has three files - a, b, c is there any way to restrict file access to the root user of one particular host(falcon) in the same LAN environment while the normal users from the same host(falcon) should be able to access the NFS share & files a, b, c.
View 1 Replies View Relatedis there any way so that we can restrict root to delete a file/directories and What is extended file attributes.
View 12 Replies View RelatedI create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:
Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END
[code]...
I need to restrict users if their download file size exceeds xxx amount, set later download speed to "256kbps".
OS: Centos 5.5
Squid 3.1.8
The first step of my project is to figure out what music files are in my Music folder.
Here is the beginning of my script. If I put the script in the Music folder, it works and generates my 'catalog' file. However, if I put the script in a different directory (say, my Scripts directory), I don't get any errors, but I also get no 'catalog' file.
Code:
#!/bin/bash
##find /usr/src -not ( -name "*,v" -o -name ".*,v" )
find /home/XX/Music -type f -print -name '*.mp3' > catalog
why do I not get my 'catalog' file if I place the script in a different directory?