Sponsored Content
Top Forums Web Development Help with opening/viewing doc file via linux terminal Post 302579770 by Corona688 on Tuesday 6th of December 2011 01:54:01 PM
Old 12-06-2011
Quote:
Originally Posted by chams
By the way, I don't understand why using sudo is dangerous (really, I'm a Linux dummy Smilie )
It runs openoffice as administrator. This is a big deal.

User accounts don't just organize your files, they exist to protect each other from unauthorized or accidental access. They can only access files they own or are allowed to access. Now, administrator can access anything on demand, up to and including your hard drive's boot sector, just by writing to the wrong files! Running any program as root means that, if you make a mistake, the consequences could be dire:
Code:
# "creative uses of rm", http://kluter.home.xs4all.nl/funnies/Section1.html

From: tzs@stein.u.washington.edu (Tim Smith)
Organization: University of Washington, Seattle

I was working on a line printer spooler, which lived in /etc.  I wanted
to remove it, and so issued the command "rm /etc/lpspl."  There was only
one problem.  Out of habit, I typed "passwd" after "/etc/" and removed
the password file.  Oops.

I called up the person who handled backups, and he restored the password
file.

A couple of days later, I did it again!  This time, after he restored it,
he made a link, /etc/safe_from_tim.

About a week later, I overwrote /etc/passwd, rather than removing it.

After he restored it again, he installed a daemon that kept a copy of
/etc/passwd, on another file system, and automatically restored it if
it appeared to have been damaged.

Fortunately, I finished my work on /etc/lpspl around this time, so we
didn't have to see if I could find a way to wipe out a couple of
filesystems...

It's not just humans that make mistakes either, buggy programs crash too, especially big complicated ones. If you don't need to trust something with root, you just don't. Running openoffice as root isn't something I'd reccomend at all.

Last edited by Corona688; 12-06-2011 at 03:00 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Viewing unix jaz disk in Linux Mandrake..Can I??

Can I utilize Linux to read a Unix formatted Jaz drive in linux mandrake... Basically are the ext2 files compatible... I seem to be having a rather nasty time due to my ignorance on the platform... Help would be much apprecited Thanks !! T.J.:( ;) (1 Reply)
Discussion started by: mpmania
1 Replies

2. UNIX for Dummies Questions & Answers

Opening a file from the terminal

Hi, this is such a simple question (I think), but I don't know the answer, obviously. If I'm using the terminal, and I'm remotely logged on to another computer, and I'm in my directory on that computer, what command would I use to...open a file? For example, a .exe file, or a .txt file...all I want... (6 Replies)
Discussion started by: Djaunl
6 Replies

3. Linux

Opening a TXT file in LINUX / UNIX

Hey Friends, When I open (More <filename>) a big txt file in UNIX /LINUX it asks me to press any key to see remaining file. Can I see it in a stretch? I mean I jst want to let the contains of file scroll up completely. Is there any way out? Plz help. Thanx in advance Anushree. (2 Replies)
Discussion started by: anushree.a
2 Replies

4. IP Networking

start a new terminal from a script after opening VPN

Hi all, I am trying to write a script that launch the cisco vpn client from the command line and then connects to a remote host using ssh. When i connect to the cisco vpn using vpnclient client connect the last lines of output from that client is Encryption: 168-bit 3-DES Authentication:... (0 Replies)
Discussion started by: borderblaster
0 Replies

5. Linux

Opening a GUI from a putty window on Linux

Hi, I have a linux which I am accessing using putty.I have written some code in TCL-Tk & developed a GUI based app.I knew that it is difficult to open a GUI based app. from putty,but there must be some way to do that. If anybody knows any such workarounds kindly let me know. Shell I am using is... (4 Replies)
Discussion started by: forstudy3
4 Replies

6. UNIX for Dummies Questions & Answers

Opening a terminal with bash

Hi, The computer that I use is on a network and has the exact same installation as other computers on the network (Ubuntu 10.04 LTS). When I open a new terminal window by default it opens a tcsh shell. I don't have the root privilege to modify it. Is it possible to open a terminal window that... (8 Replies)
Discussion started by: gaurab
8 Replies

7. UNIX for Dummies Questions & Answers

Help with opening/viewing doc file via linux terminal

I am currently trying to open a .doc file in my workstation via terminal. This is my code: root@ojt:/home/ojt/Desktop# cat arts_life.doc and it gave me a bunch of unknown characters together with the contents of the doc file. What I actually want to happen is that it will open the... (2 Replies)
Discussion started by: chams
2 Replies

8. Shell Programming and Scripting

Can I view doc files from terminal

Sometimes I'm working from terminal for long periods of time and I come across a doc file I don't recognize. I've been trying to figure out how to view it instead of opening up word. I've tried cat but it jumps into binary and my terminal goes nuts. Is there a way I can do this from... (4 Replies)
Discussion started by: syregnar86
4 Replies

9. UNIX and Linux Applications

Groups are disappearing on opening of new konsole/terminal

Hi when I open a new KDE/terminal all my project groups are disappearing. help is much appreciated. Thanks Sujay (2 Replies)
Discussion started by: sujaybatni
2 Replies

10. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies
PTS(4)							     Linux Programmer's Manual							    PTS(4)

NAME
ptmx, pts - pseudo-terminal master and slave DESCRIPTION
The file /dev/ptmx is a character file with major number 5 and minor number 2, usually of mode 0666 and owner.group of root.root. It is used to create a pseudo-terminal master and slave pair. When a process opens /dev/ptmx, it gets a file descriptor for a pseudo-terminal master (PTM), and a pseudo-terminal slave (PTS) device is created in the /dev/pts directory. Each file descriptor obtained by opening /dev/ptmx is an independent PTM with its own associated PTS, whose path can be found by passing the descriptor to ptsname(3). Before opening the pseudo-terminal slave, you must pass the master's file descriptor to grantpt(3) and unlockpt(3). Once both the pseudo-terminal master and slave are open, the slave provides processes with an interface that is identical to that of a real terminal. Data written to the slave is presented on the master descriptor as input. Data written to the master is presented to the slave as input. In practice, pseudo-terminals are used for implementing terminal emulators such as xterm(1), in which data read from the pseudo-terminal master is interpreted by the application in the same way a real terminal would interpret the data, and for implementing remote-login pro- grams such as sshd(8), in which data read from the pseudo-terminal master is sent across the network to a client program that is connected to a terminal or terminal emulator. Pseudo-terminals can also be used to send input to programs that normally refuse to read input from pipes (such as su(1), and passwd(1)). FILES
/dev/ptmx, /dev/pts/* NOTES
The Linux support for the above (known as Unix98 pty naming) is done using the devpts file system, that should be mounted on /dev/pts. Before this Unix98 scheme, master ptys were called /dev/ptyp0, ... and slave ptys /dev/ttyp0, ... and one needed lots of preallocated device nodes. SEE ALSO
getpt(3), grantpt(3), ptsname(3), unlockpt(3), pty(7) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2002-10-09 PTS(4)
All times are GMT -4. The time now is 09:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy