grurban
asked on
how do I login as admin on ubuntu server samba conf
I need to have a way to login as admin on a new install of ubuntu server. I tried to log in as user root with my build password and that does not work. My problem is I need to change the samba server's conf file. Using sudo it says I don't have permissions when I log in with my regular user id. It did let me wipe out the permissions on the dir /etc/ which I somehow did by accident. 3 reload of the server.
Hi!
What are the permissions on the samba conf file? Can you list the permissions with 'ls -l' and post the result here?
Regards, Tobias
What are the permissions on the samba conf file? Can you list the permissions with 'ls -l' and post the result here?
Regards, Tobias
if you have managed to wipe your /etc/ directory clean then your SUDO rights are also gone.
best would be run a rescue through CD and install the missing parts or do a minimal installation without formatting the partitions
would be too tedious otherwise to create all system critical files like shadow, passwd, groups, sudoers and a whole load of other things
best would be run a rescue through CD and install the missing parts or do a minimal installation without formatting the partitions
would be too tedious otherwise to create all system critical files like shadow, passwd, groups, sudoers and a whole load of other things
ASKER
I didn't wipe the directorys, I somehow changed the permissions to -rwxrwxrwx. I want to logon as root so the I have those permissions when I bring up gui desktop. that way I can use the wisiwyg editors. I have rebuilt the system entirely again. Now ready to mess up again.
Don't log in as root in Ubuntu.
Either use 'su -' or sudoers.
Ref: http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch09_:_Linux_Users_and_Sudo
Regards, Tobias
Either use 'su -' or sudoers.
Ref: http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch09_:_Linux_Users_and_Sudo
Regards, Tobias
The key difference I think you're missing grurban is the difference between
su
and
sudo
The former simply elevates a login shell to root status (and the best way to so that is actually "su -" not just plain "su").
The latter allows a user to run root-required programs without getting full-scale root privileges
The "su -" command will prompt you for the ROOT password...
The "sudo" command will prompt you for your OWN password...
After running the "su -" program, you can do whatever root can do -- you ARE root!
After running a "sudo" program, you are returned to your restricted user... you have to use sudo again (or su!) to regain root elevation again.
I hope this explains things a little.
Dan
IT4SOHO
OH! And it is considered VERY risky to leave root login access on SSH (which is why it is disabled by default). The CORRECT (SAFE)way to login as root via SSH is to login as your "regular" user account, then use "su -" to become a root user.
I have taught that to EVERY system admin course I have ever taught (Linux, HP/UX, Solaris, AIX... the lot of them!)
su
and
sudo
The former simply elevates a login shell to root status (and the best way to so that is actually "su -" not just plain "su").
The latter allows a user to run root-required programs without getting full-scale root privileges
The "su -" command will prompt you for the ROOT password...
The "sudo" command will prompt you for your OWN password...
After running the "su -" program, you can do whatever root can do -- you ARE root!
After running a "sudo" program, you are returned to your restricted user... you have to use sudo again (or su!) to regain root elevation again.
I hope this explains things a little.
Dan
IT4SOHO
OH! And it is considered VERY risky to leave root login access on SSH (which is why it is disabled by default). The CORRECT (SAFE)way to login as root via SSH is to login as your "regular" user account, then use "su -" to become a root user.
I have taught that to EVERY system admin course I have ever taught (Linux, HP/UX, Solaris, AIX... the lot of them!)
ASKER
How do I do this and use the gui editor from the desktop?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You should be able to login as root on console. you would then need to modify the /etc/ssh/sshd_config and uncomment the AllowRootLogin yes option. once sshd restarts it would allow root to login via ssh.
You may need to use the LiveCd and then update the /etc/passwd and /etc/shadow as well as /etc/sudoers for use with sudo.
It is not clear from what you've said when your regular user id allowed you to wipe permissions on the /etc dir.