Ubuntu :: Use The Sudo Command To Edit Anything Out Side The Home Directory?
Jan 29, 2011
I am here with a troublesome question about my new Ubuntu set up. Well as I've found out that you have to use the Sudo command to edit anything out side the home directory. Well I am using L.A.M.P. Server on my computer so I can host a small forums. Well for example like lets say I install Word press Blog onto my lamp server and I want to install a theme well when i go to install a theme i can not because WPB can't install the theme because of the security stuff on Ubuntu!
Well I want to know if there is some kind of command or program i can use that will get rid of all the security stuff were i can edit stuff nice and easy. Like something that can give me FULL control over the OS so no more commands because I am going to be running a Vbulliten forums which needs themes and plug ins, well i want be able to install them because this OS will not let me!
Ubuntu 10.04. As part of my nightly backup script I archive my home directory with the following command tar -cvpzf /quitelarge/_mirror/mirror1/home-ken.gz /home/ken 2>> /quitelarge/_mirror/tar-error.log
It seems to work fine and I have recovered files from the archive on occasion. Actually I keep 7 rolling daily backups and a monthly burn to DVD. I had an sftp connection made by Nautilus to my server. Ubuntu for whatever reason places an icon on the desktop showing the connection. When I ran the script it decided to archive everything on my server - all 1.4 TB. I caught the problem when home-ken.gz was about 5 GB. I stopped the process, closed the sftp connection, rolled back the backups and tried again. This time I got a file of the expected size - about 45 MB.
In the error log I did find that the tar process was trying to suck the entire contents of the server into the archive file. tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound/ICH5/pcm0c/sub0: file changed as we read it tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound/ICH5/pcm0c: file changed as we read it tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound/ICH5: file changed as we read it tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/asound: file changed as we read it tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/scsi: file changed as we read it tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/acpi/event: Cannot open: Permission denied tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/acpi/fadt: Cannot open: Permission denied tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/acpi/dsdt: Cannot open: Permission denied tar: /home/ken/.gvfs/sftp for ken on taylor10/proc/irq/21/smp_affinity: Cannot open: Permission denied
Is there an option I can place on the tar command to tell it NOT to follow the ssh connection which is sitting on my desktop? The closest thing I see in the documentation is -h which tells tar to "follow symlinks; archive and dump the files they point to." I am NOT specifying -h so if the ssh connection is treated as a symlink by tar I would still not expect the remote contents to be tarred.
Today I accidentally removed my home directory which contains no. of other directories having my work done in last 3 years. I used the command rm -rf * . I looked for the problem in the google got some links pertaining to my problem, but got no solution. One among these links is: [URL]. Can I get back my lost data (so many directories in my home)
I have an interdependent collection of scripts in my ~/bin directory as well as a developed ~/.vim directory and some other libraries and such in other subdirectories. I've been versioning all of this using git, and have realized that it would be potentially very easy and useful to do development and testing of new and existing scripts, vim plugins, etc. using a cloned repo, and then pull the working code into my actual home directory with a merge.
The easiest way to do this would seem to be to just change & export $HOME, eg
cd ~/testing; git clone ~ home export HOME=~/testing/home cd ~ screen -S testing-home # start vim, write/revise plugins, edit scripts, etc. # test revisions
However since I've never tried this before I'm concerned that some programs, environment variables, etc., may end up using my actual home directory instead of the exported one. Is this a viable strategy? Are there just a few outliers that I should be careful about?
Why would rsync insert a user's home directory path in variable expansion when run via cron, but not when run manually. The gory details... Red Hat Enterprise Linux AS release 4 (Nahant Update 6) Linux 2.6.9-67.0.20.ELsmp The script (parts anyway, and simplified)...
-the command to copy the file Practice.txt to a new name of Myfile.txt while in the home directory-found -command to create a directory in the home directory-found -say i just created a new directory called "test". whats the command to delete the test directory.-found -command to create a blank, text file without using an editor. -the exact syntax in Linux you would need to rename the file to a new name-found
is there a way to edit which commands require a sudo? or some programs, like the CPU frequency monitor on panel, requires a password to change. where would i start if i want to change this?
I need to have regular user run this command sync; echo 3 > /proc/sys/vm/drop_caches
but it requires root privileges that I cannot give.
So I figured they could run the command as "sudo". I looked in /etc/sudoers and wasn't sure what I needed to edit for the users to run the following command
I have ubuntu 10.04 on the home screen page in the left have colum you have a list of menu items when you install ubuntu, I happen to deselect one of teh menu items. I now cannot reinstate the menus I have included a screen-shot of the home screen so you can see the menu items I have available on the left hand side
I have a dual-boot macbook with an OS X partition and an ubuntu partition. When I first installed ubuntu, I changed my home folder to my OS X home directory to synchronize all my files from both. My home directory is now /media/sda2/Users/username/. In a regular home folder, the icons for Documents, Music, Pictures, Movies, etc. are different (not just with emblems, but actually different icons). But when I changed my home folder, these subfolders' icons stayed the same as regular folder icons and I can't figure out a way to change that default setting. I know how to change the icons for each folder manually, but these changes don't appear everywhere (i.e. nautilus, places, etc). Furthermore, every time I change my icon theme, I would have to manually reassign icons for these folders. Is there a way to globally change the folder icons for these folders?
I need to specify a different path to home directories on a particular server than what LDAP contains for the users, besides using a symlink. E.g. "/Users/jdoe" vs "/home/jdoe" I don't want to change the actual LDAP attributes, just want a particular server to point them in the right direction (Ubuntu 10.04).
I'm assuming it's something I could probably set in pam configurations?
I am having trouble running commands by using sudo. I configured visudo file with localuser ALL=(ALL) ALL but I can't run any command, it tells me command not found.
I have a strange problem when I do SSH to a FEDORA9 based Linux Server.
[Code]....
When I login using "adah" username in TELNET I am automatically directed to my home directory at location "/media/disk-1/home/adah". But when I use SSH to login using the same username I get the following message Code: Could not chdir to home directory /home/adahaj: Permission denied
I have a secondary disk which holds a /home directory structure from a previous install of Linux. I installed a new version on a new primary drive and mounted this secondary drive as the new /home. Problem is, even though the users are the same names and I can access the home directories for the users, I cannot login directly to their home directories, as I get the following error: -
Code:
login as: [me] [me]@[machine]'s password: Last login: Wed Jan 6 18:34:33 2010 from [machine] Could not chdir to home directory /home/[me]: Permission denied [[me]@[machine] /]$
Now, since the usernames are correct and the users are in the passwd file with the correct home directory paths, could it be user ID's that are different or something else? It's not as though I cannot access the home directories for the users, simply that I cannot log directly into them from a login prompt.
Is there anything special about a home directory before users' home directories are stored there, or is just as typical as any other "empty" folder?Let me just cut to the chase, but please no ear ringing about the folly of messing around as root, particularly with directories at root level. I know it's considered stupidity, but I deleted my home directory.
Is there an easy way to restore a working home directory? I tried copying /etc/skel under root, but I'm not sure what a home directory should look like once it has been restored. Besides . & .., there were .screenrc & .xsession in my home directory when I copied /etc/skel. Are these files suppose to be in "/home" or "/home/~" or both?
I have Ubuntu Karmic. I chose to install with an encrypted home directory. Recently I got a warning that I only had 2GB of drive space left. This is mostly because of my videos. So I went and bought a new hard drive and partitioned it and made 1 ext4 partition and copied my videos all to the new hard drive. I added a line in my fstab to mount the new hard drive to ~/videos, but when I reboot the computer, there is a screen saying something like "error mounting /home/me/videos, press S to skip or something else to reboot". If I press S to skip, then when my system comes up there is a video directory but it's empty because my other hard drive didn't get mounted. I can run sudo mount /dev/sdb video/ and it will mount fine and I can see all my videos, so why can't fstab mount it? Does this have something to do with my encrypted home directory?
Jun 1 12:15:42 desktop sudo: pam_sm_authenticate: Called Jun 1 12:15:42 desktop sudo: pam_sm_authenticate: username = [bob] Jun 1 12:15:42 desktop sudo: pam_sm_authenticate: /home/bob is already mounted
what's causing (at the root?) of this?
Maybe this is related:
Quote:
desktop gdm-session-worker[1396]: pam_succeed_if(gdm:auth): requirement "user ingroup nopasswdlogin" not met by user "bob" Jun 1 09:25:46 desktop gdm-session-worker[1396]: pam_unix(gdm:session): session opened for user bob by (uid=0) Jun 1 09:25:46 desktop gdm-session-worker[1396]: pam_ck_connector(gdm:session): nox11 mode, ignoring PAM_TTY :0
I'm using Mac OS X's Terminal.app shell to compile and run Fortran programs. One such program resides outside of my home directory (it is in the Applications folder, which resides on my hard drive but seems to be outside of my home folder). How can I navigate into this directory using Terminal.app to run the programs that reside there?
In Ubuntu 9.10, sudo was working properly except it would not let me run speedy as sudo. I would get an error message, which I believe stated "No such file or directory. However, I could run the command as my regular user (being prompted it needed escalated privileges), and I could run the user as root. So I tried to "fix" it so that I could run it via the sudo command. My fix, in turn, ended up breaking sudo. I edited a file which contained the directories for PATH (I made a backup of said file), and that didn't work. It further broke sudo. So I attempted to restore the backup file, however, sudo was still just as broken.
Now, whenever I try to execute any command with sudo I get: tim@linux-hp:~$ sudo -i [sudo] password for tim: env: -i: No such file or directory tim@linux-hp:~$ sudo gedit env: gedit: No such file or directory tim@linux-hp:~$ sudo apt-get update env: apt-get: No such file or directory tim@linux-hp:~$ sudo nautilus env: nautilus: No such file or directory tim@linux-hp:~$ sudo update-manager env: update-manager: No such file or directory tim@linux-hp:~$ sudo speedy deploy env: speedy: No such file or directory
I have since upgraded to Ubuntu 10.04 Alpha 3, with mild hopes that the upgrade would remedy my problem, but alas - it did not. How to get sudo back to a working condition?
I have two (or more) video files that I want to play side by side. I could do that simply by opening them in two seperate windows, but that would also seperate all the controls (play/pause/forward/...). I want to play them in a synchronized fashion so that pause/forwarding/... works on both videos simultaneously so that they always stay at the same timecode and they don't go out of sync. How would I accomplish that in Linux?
This is needed for viewing only, so compositing them into a new video file first should be avoided if possible, but if there isn't an easy way to do that, I welcome answers doing it with composition as well.
If a file gets created in the user's Desktop folder, or if a drive is added to the machine and a Desktop icon is correspondingly created, they will by default appear on the left side of the desktop (unless, in the case of the latter, the specific drive has been created before and dragged to the right side, in which case GNOME will remember to put it in the same place).
Because I have a terminal window embedded onto my Desktop in the top left corner and occupying most of the screen), I keep my icons on the right side of the Desktop instead of the left (Mac style) - Any time I add a new drive or a file is sent to the Desktop, however, I have to kill the terminal window to be able to click on the icon, then drag it back to the right side, then restart the terminal.
Is there any way to tweak GNOME so that these icons are added from the top right corner and down instead of from the top left, automatically?
I installed proftpd on my Ubuntu 10.10 install. I also run multiple websites that I want to allow ftp access to for 2 different users. The websites are located in /home/www/. This is where the guide I was following told me to put them. I also don't have a user named www.How can I give write permission to upload, delete, and edit all the files in /home/www/ for multiple users? They can connect to the ftp server and see the file, just not change them.
have been trying to setup a dual boot system with ubuntu and XP running side by side on my Thinkpad T41.tried it a few times and always causes the same problem. i have 40 gig HDD, on which i create a 13 gig NTFS partition and leave the rest as free space. then install XP on the NTFS partition. no problems.
then i boot from the ubuntu disk (9.10 Karmic) and install using the "use free space" option at the partition section. ubuntu installs ok, and boots fine from GRUB 2.0. BUT when i select the XP option from GRUB's list, it starts to boot XP, i get the standard XP loading screen for three seconds and then it crashes to a blue screen critical problem, and restarts the system. when i then boot from the xp cd and go into recovery mode CHKDSK will not recognise the disk, and DISKPART shows one HDD at 35 gig which it cannot access.
this means i cant run FIXBOOT and get my xp install running again. every time i do this process it produces the same problem. tried at first with xp installed on whole HDD, and reducing the xp partition size. killed XP. then tried ubuntu first and xp second - but this caused the same inaccessible disk problem - xp would not recognise the partitions and would not install. so i slipstreamed my XP install disk to SP2 hoping this would make it recognise the partitions, but no luck there. so had to format all and repartition the 13 gig NTFS for xp. installed xp again without difficulty but ubuntu install killed my xp in the same way.