Unix Technical Forum

Login to system

This is a discussion on Login to system within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi When i try to login system gives me this messages: 1. information about last login 2. information about ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 07:27 AM
Szczepan
 
Posts: n/a
Default Login to system

Hi

When i try to login system gives me this messages:
1. information about last login
2. information about mail
and then
-bash: /etc/profile : Permision denied

prompt look this : -bash-2.05b$

before prompt was compsed with username and hostname

Could someone tell me what can I do about this?



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 07:27 AM
Blumf
 
Posts: n/a
Default Re: Login to system

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Szczepan wrote:

> When i try to login system gives me this messages:

....
> and then
> -bash: /etc/profile : Permision denied

....
> Could someone tell me what can I do about this?


Have you been chmod'ing any files in /etc? In particular /etc/profile? It
should have read permission for all users, i.e.

$ ls -l /etc/profile
- -rw-r--r-- 1 root root 2408 Jun 4 2002 /etc/profile

Blumf

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAM0h4Mid3IcxolsoRAhamAKCG77jVmwwMwuh2YfNO0W bZxKPTVgCfR3sj
SHvM/iEjigI6aFpgS1ymlkU=
=Oijj
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 07:28 AM
Toni
 
Posts: n/a
Default Re: Login to system


> Szczepan wrote:
>
> > When i try to login system gives me this messages:

> ...
> > and then
> > -bash: /etc/profile : Permision denied

> ...
> > Could someone tell me what can I do about this?

>
> Have you been chmod'ing any files in /etc? In particular /etc/profile? It
> should have read permission for all users, i.e.
>
> $ ls -l /etc/profile
> - -rw-r--r-- 1 root root 2408 Jun 4 2002 /etc/profile
>

My /etc/profile has exactly same rights as yours.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 07:29 AM
Alan Hicks
 
Posts: n/a
Default Re: Login to system

In alt.os.linux.slackware, Toni dared to utter,
>>
>> Have you been chmod'ing any files in /etc? In particular /etc/profile? It
>> should have read permission for all users, i.e.
>>

> My /etc/profile has exactly same rights as yours.
>


Ok then, what are the permissions on /etc then?
Mine are:

drwxr-xr-x 44 root root 4392 Jan 31 19:02 etc/

If you've removed the execute permission for your user, your user won't
be able to enter that directory and consequently can't read
/etc/profile, no matter what your permissions are set to on that file.

--
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 07:30 AM
Toni
 
Posts: n/a
Default Re: Login to system

> Ok then, what are the permissions on /etc then?
> Mine are:
>
> drwxr-xr-x 44 root root 4392 Jan 31 19:02 etc/
>
> If you've removed the execute permission for your user, your user won't
> be able to enter that directory and consequently can't read
> /etc/profile, no matter what your permissions are set to on that file.
>


Yes my /etc directory did not had execute permission for other user.
No it has and everything works fine. When slackware is installed for the
first time then /etc has such rights as you wrote(excetue perrmision for
other users)?
I do not remeber if I was changing rights for this folder. So what could
happend that
/etc directory permisions have changed?

I was only modyfing passwd and shadow files for example:
i created new user and after that i changed his uid and gid for 0.


Thanks for help


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008, 07:38 AM
Faux_Pseudo
 
Posts: n/a
Default Re: Login to system

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

__...---I alt.os.linux.slackware, Toni wrote the followin ---...___
> I was only modyfing passwd and shadow files for example:
> i created new user and after that i changed his uid and gid for 0.


Rule number one: don't ever edit those files by hand. It could cause
big big trouble.

Rule number two: The only user who should have a uid of 0 is root. In fact
some programs and scripts will look at the uid and the username and if they
find that uid 0 is not root they won't run. Or in the case of some security
software they will do other things[0] that are not so kind.

You were porblibly trying to make life easier for yourself by doing this.
There are safer and better ways to do it. look at the man pages for
su, sudo, chgrp, chown, and chmod befor continuing on your path. Otherwise
you will find yourself doing a reinstall in no time flat as your file system
becomes a zoo of work arounds for your work arounds.

[0] see the last script on <ur:http://www.c2i2.com/~dentonj/system-hardening>

- --
.-')) _ UIN= 66618055 _ (('-. | It's a damn poor mind that
' ..- .:" ) ( ":. -.. ' | can only think of one way to
((,,_;'.;' ';. ';_,,)) | spell a word.
((_.;'*Faux_Pseudo*':._)) | - Andrew Jackson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAN4WmSJec2PH9pbURAonIAJ9DRkflnhZAKoDrdkVXGT CbH/dqIgCeN893
OSButNLv+pocUOAJGEyUk+s=
=ii2V
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-19-2008, 07:38 AM
Ron Matthews
 
Posts: n/a
Default Re: Login to system

Faux_Pseudo <Faux_Pseudo@ip68-230-192-17.rd.hr.cox.net> wrote:

[silliness deleted unread]

Faux_Pseudo is a phoney by definition.

Killfile him.

cordially, even to pure shit,

rm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-19-2008, 07:42 AM
Sysiphus
 
Posts: n/a
Default Re: Login to system

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Faux_Pseudo thought it a good use of my time to say:

> Rule number two: The only user who should have a uid of 0 is root. In fact
> some programs and scripts will look at the uid and the username and if they
> find that uid 0 is not root they won't run. Or in the case of some security
> software they will do other things[0] that are not so kind.



Indeed. Slack is one of those that do not like others having uid 0. had it
I not been watching when given root access on a remote server, and had we
logged out from the telnet session, neither I nor root could have logged in.

Actually the guy who turned me on to Slack performed this amazing feat of
stupidity. gave me "david" uid 0. Said "thought I'd give you root access".
I inquired about just putting me in wheel and editing the sudoers file, he
said "what's sudoers?" I said "Give me that keyboard before you send us all
to white man's hell"[0]

[0] loosely quoted from "Modern Problems"

- --
Slackware, for when your sick and tired of being insulted by yet another
stupid installation tool. -- Andy McDowell

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAOUEqERStuZltPNoRAsrvAJ9+Ss77o2HENyNFtvxP5+ mKkEDmKwCgiQw6
ruS7iMR5dI+QgDZhqBsdeC0=
=De2W
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:29 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com